Java Community ProcessSM Maintenance Review
for J2SETM 1.4 Release Candidate

Introduction

A small number of issues have surfaced after the Beta 3 Maintenance Review for the J2SETM 1.4 platform (Merlin). Most of these issues are around clarifications or cleanups to the specifications of new features that were added in Merlin. It appears beneficial to resolve these issues before Merlin is released, as otherwise they may become permanent misfeatures of the J2SE specification.

We are therefore proposing to make some additional small updates to the J2SE specification relative to the earlier Maintenance Reviews.

This site provides details on the proposed changes.

There will also be a separate Maintenance Review for the JSR-051 "New IO" specification to address minor errata to that specification.

Feedback

Please use the following address to provide review feedback on the platform changes described here.
merlin-jsr@eng.sun.com

Change Descriptions

Changes and enhancements to the Java 2 Platform since J2SE 1.4 Beta 3 that are included in J2SE 1.4 Release Candidate are summarized by functional area at the links below. The description of each change includes links to the affected parts of the API specification as well as to any bug reports that are relevant to the change.

Public Static Fields (added January 14, 2002)
AWT
Java 2DTM Technology
Collections
CORBA / IDL / RMI-IIOP
Drag and Drop
JNI
Networking
Swing

Also available are difference files that highlight all changes in the Javadoc API specifications between J2SE 1.4 Beta 3 and J2SE 1.4 Release Candidate. See

Specification Difference Files

Public Static Fields (added January 14, 2002)

New public static fields that have been added to the J2SE API specification in 1.4 should be declared final. For a list of fields to which the final keyword will be added, see Fields to be Made Final.

AWT

The following four new methods have been introduced in 1.4:

Previously, these methods had behaviors and specifications that did not suit the needs of most applications. The specifications previously declared them as the global mechanism to change the focus policy (by the call to KeyboardFocusManager.setDefaultFocusTraversalPolicy) of all Containers that don't have their own policies set explicitly (via the call to Container.setFocusTraversalPolicy).

This API change modifies the specification and behavior of these four methods to allow components to initialize their internal focus policies from default values specified by KeyboardFocusManager only once, on initialization. Thus components created as part of pure-AWT applications will have AWT policies from the start until the end of their existence, and will not be affected by other API called by the user.

The bug report associated with this change is 4510221.

Java 2DTM Technology

The specification for java.awt.color.ICC_ColorSpace.fromRGB(float[] rgbvalue) previously did not state the exception that would be thrown if the rgbvalue array did not have a length of three or more. This API change updates this method to specify that an ArrayIndexOutOfBoundsException is thrown under such a condition. This change also applies to the following:

java.awt.color.ColorSpace

java.awt.color.ICC_ColorSpace

The bug report associated with this change is 4507236.

Collections

As part of the enhancements made to the Collections API in 1.4 , the static method
List list(Enumeration e) 
was added to java.util.Collections. Bug 4513189 noticed that the documentation for this list clearly stated that an ArrayList is returned, so the method signature has been changed to

ArrayList list(Enumeration e)

The bug report associated with this change is 4531626.

CORBA / IDL / RMI-IIOP

Drag and Drop

JNI

The JNI version number has been incremented. The include file jni.h defines the new constant:
    #define JNI_VERSION_1_4 0x00010004

The GetVersion procedure now returns this value.

The specification of the JNI_OnLoad procedure has been revised:

    jint JNI_OnLoad(JavaVM *vm, void *reserved);

The VM calls JNI_OnLoad when the native library is loaded (for example, through System.loadLibrary). JNI_OnLoad must return the JNI version needed by the native library.

In order to use the JNI functions introduced in J2SE release 1.2 in addition to those that were available in JDK 1.1, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2.

In order to use the JNI functions introduced in J2SE release 1.4 in addition to those that were available in release 1.2, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_4.

If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded.

The bug report that corresponds with this change is 4526746.

Networking

Swing


Copyright © 2002 Sun Microsystems, Inc. All Rights Reserved.