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

SyncFactory.getRegisteredProviders() returns Enumeration of String instead of SyncProvider since b95

XMLWordPrintable

    • b95
    • 6
    • b98
    • generic
    • generic
    • Verified

      JCK : JCK6.0 b29
      J2SE : FAIL - *SINCE* mustang b95, PASS mustang b94, tiger u7
      Platform[s] : FAIL - seems to be all
      switch/Mode : FAIL - default

      Since mustang b95 method javax.sql.rowset.spi.SyncFactory.getRegisteredProviders() returns Enumeration of String, not SyncProvider. This violates specification:

      "The SyncFactory class provides an internal registry of available synchronization provider implementations (SyncProvider objects). This registry may be queried to determine which synchronization providers are available. The following line of code gets an enumeration of the providers currently registered.

           java.util.Enumeration e = SyncFactory.getRegisteredProviders();
       " (overview of SyncFactory class).

      Affected JCK 6.0 tests:

      api/javax_sql/rowset/spi/SyncFactory/index.html#Provider[SyncFactory0002]
      api/javax_sql/rowset/spi/SyncFactory/index.html#Provider[SyncFactory0003]
      api/javax_sql/rowset/spi/SyncFactory/index.html#Provider[SyncFactory0004]
      api/javax_sql/rowset/spi/SyncFactory/index.html#Provider[SyncFactory2004]

      Steps to reproduce:

      compile and run the following class on b94, b95 and tiger u7:


      import java.util.Enumeration;
      import javax.sql.rowset.spi.*;

      public class SyncFactoryTest{

          public static void main(String[] args) throws Exception{

              Enumeration providers = null;
              try {
                      providers = SyncFactory.getRegisteredProviders();

      for (Enumeration<Object> e = SyncFactory.getRegisteredProviders(); e.hasMoreElements();)
              System.out.println(e.nextElement().getClass().getName());

              } catch (Exception e) {
                      e.printStackTrace();
                      throw new Exception( "Unexpected exception while getting registered providers.");
              }
          }
      }

            ssharmasunw Sushmita Sharma (Inactive)
            pastepan Pavel Stepanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: