jdeveloper - compile anon inner class with exception

J

john

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top