When I compile the Spring JDBC source on OS X with JDK 1.7.0, I get this warning:
warning: CachedRowSetImpl is internal proprietary API and may be removed in
I tried
@SuppressWarnings("all")
but that didn't work.
So I resorted to a horrible, horrible kludge which I don't recommend in general, but in this specific case made the warning go away. I used reflection to instantiate a new instance of the com.sun.rowset.CachedRowSetImpl class.
I replaced this line, which caused the warning:
return new CachedRowSetImpl();
with this block:
try {
final Class<?> aClass = Class.forName("com.sun.rowset.CachedRowSetImpl");
return (CachedRowSet) aClass.newInstance();
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
throw new RuntimeException(e);
}
Please don't do this in your own code without first considering any other option.