Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

Invoker.java 449B

123456789101112131415
  1. public class Invoker {
  2. public static void main(String[] args) throws Throwable {
  3. try {
  4. new C();
  5. }
  6. catch (Throwable t) {
  7. boolean failedCorrectly =
  8. t.toString().contains("Unresolved compilation problem") &&
  9. t.toString().contains("The method main cannot be declared static");
  10. if (failedCorrectly)
  11. return;
  12. throw new RuntimeException("Constructor call should have failed!", t);
  13. }
  14. }
  15. }