United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6459927 SyncFactory.getRegisteredProviders() returns Enumeration of String instead of SyncProvider since b95
JDK-6459927 : SyncFactory.getRegisteredProviders() returns Enumeration of String instead of SyncProvider since b95

Details
Type:
Bug
Submit Date:
2006-08-14
Status:
Closed
Updated Date:
2012-03-22
Project Name:
JDK
Resolved Date:
2006-08-29
Component:
core-libs
OS:
generic
Sub-Component:
java.sql
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports

Sub Tasks

Description
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.");
        }
    }
}

                                    

Comments
EVALUATION

must be fixed for mustang GA
                                     
2006-08-14
EVALUATION

Fixed.
Looks like the correct version of the file was overridden. Syncing has now been done.
                                     
2006-08-23
EVALUATION

Verified this using jdbc4.jar from Aug 27.
                                     
2006-08-29



Hardware and Software, Engineered to Work Together