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?
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?