jdeveloper - compile anon inner class with exception

From: john <john.dixon_at_littlewoods.co.uk>
Date: 30 Nov 2005 05:00:20 -0800
Message-ID: <1133355620.162971.24570_at_g14g2000cwa.googlegroups.com>



following code segment produces different anon class file ( OuterClass$1) when compiled in jdevloper and DOS

public static PreparedStatementCreator
newPreparedStatementCreator(final String sql) {

   return new PreparedStatementCreator() {

	public PreparedStatement createPreparedStatement(Connection conn)
throws      SQLException {
	PreparedStatement ps = conn.prepareStatement(sql);
	return ps;
	      }

    };
}

The difference between the two class files produced is that with DOS the inner class is created with an empty constructor that throws an SQLException. With Jdeveloper the constructor does not throw any Exception.

v. confused - can anybody help? Received on Wed Nov 30 2005 - 14:00:20 CET

Original text of this message