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

javax.sql.rowset.spi.SyncFactory.getLogger() does not throw exception

XMLWordPrintable

    • beta
    • sparc
    • solaris_2.6



      Name: sdR10048 Date: 09/02/2003


      Filed By : SPB JCK team (###@###.###)
      JDK : java full version "1.5.0-beta-b16"
      JCK : 1.5
      Platform[s] : Solaris
      JCK test owner : http://javaweb.eng/jct/sqe/JCK-tck/usr/owners.jto
      Failing Test [s] :
      api/javax_sql/rowset/spi/SyncFactory/index.html#Logger[SyncFactory2003]


      Spec says:
      ===================
          /**
           * Returns the logging object for applications to retrieve
           * syncrhonization events posted by SyncProvider implementations.
           *
           * @throws SyncFactoryException if no logging object has been set.
           */
          public static Logger getLogger() throws SyncFactoryException {

      Problem description
      ===================
      javax.sql.rowset.spi.SyncFactory.getLogger() does not throw SyncFacotryException as spec says. See demo.
          
      Minimized test:
      ===============
      ------- T.java -------
      import javax.sql.rowset.*;
      import javax.sql.rowset.spi.*;

      public class T {

          public static void main(String[] args) {
              try {
                  SyncFactory.setLogger(null);
                  System.out.println("getLogger(): "+SyncFactory.getLogger());
                  System.out.println("SyncFactoryException expected");
              } catch (Exception e) {
                  e.printStackTrace();
              }
          }
      }
      ------- end-of-T.java -------

      Minimized test output:
      ======================
      getLogger(): null
      SyncFactoryException expected

      ======================================================================

            ahandasunw Amit Handa (Inactive)
            dsvsunw Dsv Dsv (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: