Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8235961

Default javax.sql.rowset.spi.SyncResolver impl returned by SyncProviderException throws unspecified NPE, UOE

    XMLWordPrintable

Details

    • b03

    Backports

      Description

        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)

        Attachments

          Issue Links

            Activity

              People

                lancea Lance Andersen
                dbessono Dmitry Bessonov
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: