-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P2
-
Affects Version/s: 14
-
Component/s: core-libs
-
b03
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
|---|---|---|---|---|---|---|
| JDK-8236508 | 14 | Lance Andersen | P2 | Resolved | Fixed | b30 |
It was discovered that most methods of the default SyncResolver returned by SyncProviderException doesn't throw declarted SQLException but throw NPE or UOE instead:
// SyncProviderException::getSyncResolver
// Returns: In addition, the default SyncResolver implementation
// is also returned if the SyncResolver() or SyncResolver(String) constructors
// are used to instantiate the SyncResolver instance.
SyncResolver defaultSR = new SyncProviderException().getSyncResolver();
defaultSR.getStatus();
// Exception in thread "main" java.lang.NullPointerException
// at java.sql.rowset/com.sun.rowset.internal.SyncResolverImpl.getStatus(SyncResolverImpl.java:135)
defaultSR.previousConflict();
// Exception in thread "main" java.lang.UnsupportedOperationException
// at java.sql.rowset/com.sun.rowset.internal.SyncResolverImpl.previousConflict(SyncResolverImpl.java:506)
// SyncProviderException::getSyncResolver
// Returns: In addition, the default SyncResolver implementation
// is also returned if the SyncResolver() or SyncResolver(String) constructors
// are used to instantiate the SyncResolver instance.
SyncResolver defaultSR = new SyncProviderException().getSyncResolver();
defaultSR.getStatus();
// Exception in thread "main" java.lang.NullPointerException
// at java.sql.rowset/com.sun.rowset.internal.SyncResolverImpl.getStatus(SyncResolverImpl.java:135)
defaultSR.previousConflict();
// Exception in thread "main" java.lang.UnsupportedOperationException
// at java.sql.rowset/com.sun.rowset.internal.SyncResolverImpl.previousConflict(SyncResolverImpl.java:506)
- backported by
-
JDK-8236508 Default javax.sql.rowset.spi.SyncResolver impl returned by SyncProviderException throws unspecified NPE, UOE
-
- Resolved
-