Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

NulIOException.java 620B

1234567891011121314151617181920212223
  1. import org.aspectj.testing.Tester;
  2. class Super {
  3. Super(Object o){}
  4. }
  5. /** windows treats filename "nul" specially, like /dev/null on unix */
  6. public class NulIOException extends Super {
  7. public static void main(String[] args) {
  8. Object o = new NulIOException(nul); // parms: IOException
  9. Tester.check(false, "expecting compiler error");
  10. Object p = nul; // reference: expect CE here, not IOException
  11. }
  12. NulIOException() { super(nul); }
  13. // super parms: expect CE here, not IOException
  14. NulIOException(Object o) { super(o); }
  15. // don't attempt to read nul on windows
  16. }