News for hackers. Stuff that matters.
Re:Bytecode features not available in the Java language by peeters on Friday April 17, 2015 @03:42PM (#9396719)
As far as not catching checked exceptions goes, this is actually possible in the Java language as well since the language allows throwing a generic type parameter. It's pretty difficult to do by accident though, and does at least give a compile warning.

    public class Dangerous {
    
        public static void main (String ... args) {
            Dangerous.<RuntimeException>throwUnchecked(new IOException("Forgot to catch me!"));
        }
    
        static <T extends Exception> void throwUnchecked(Exception e) throws T{
            throw (T) e;
        }
    }

There are no comments on this comment yet.