JSR 337: Java SE 8: Annex 1
Final Release Specification
API Specification Change Summary
Iris Clark
2014/2/13 09:01 -0800 [d439b5ed4ff2]

This document describes the API specification changes made in Java SE 8 relative to Java SE 7, except for features or changes specified in related Component JSRs.

Contents

All changes to the specification made between Java SE 7 and Java SE 8, including trivial changes such as corrections of typographical errors and misspellings, are indicated in Annex 2, where insertions are conveniently shown on a light green background and deletions are shown struck through on a light red background.

Significant features, enhancements, bug fixes, and clarifications are described in the following sections of this document.

Core Libraries
User InterfaceTool Interface

Core Libraries

Beans

Beans: Specify behavior on null argument for methods in PersistenceDelegate & DefaultPersistenceDelegate

The specification for all methods in java.beans.PersistenceDelegate and java.beans.DefaultPersistenceDelegate that have an encoder as a parameter was modified to throw a NullPointerException if the encoder is null. This is the complete list of affected methods: PersistenceDelegate.writeObject(), PersistenceDelegate.instantiate(), PersistenceDelegate.initialize(), DefaultPersistenceDelegate.instantiate(), and DefaultPersistenceDelegate.initialize().

The bug associated with this change is 6412286.

Beans: Specify behavior on null argument for PropertyChangeEvent constructor

The specification of the java.beans.PropertyChangeEvent() constructor was modified to document the long-standing behavior for it to throw IllegalArgumentException if the bean that fired the event is null.

The bug associated with this change is 7087429.

Beans: Re-write the BeanInfo interface

The specification of the java.beans.BeanInfo interface was entirely re-written to eliminate grammatically incorrect and confusing sentences. The intent of the specification was not changed.

The bug associated with this change is 7121905.

Collections

Collections: Update Collections

The following methods were added to java.util.Collections:

Collections: Add warning for some deep traversal operations

The interface specification for java.util.Collection and java.util.Map was refined to provide a warning that deep traversal operations on self-referential collections/maps may fail. While some implementations may optionally handle the self-referential scenario, most current implementations do not.

The bug associated with this change is 7057785.

Collections: Refine Collection.removeIf() UnsupportedOperationException conditions

The general description for java.util.Collection.removeIf() was refined to indicate that an UnsupportedOperationException will be thrown if removal is not supported or the particular matching element cannot be removed.

The bug associated with this change is 8023339.

Collections: Add PriorityQueue(Comparator)

A new constructor, java.util.PriorityQueue(Comparator) was added to create a new PriorityQueue which orders its elements according to the specified comparator.

The enhancement associated with this change is 6799426.

Collections: Remove reference to Deque.push() return value

The specification for java.util.Deque.push() was updated to eliminate the phrase “returning true upon success” since the method has a void return type.

The bug associated with this change is 7178639.

Collections: Add in-place methods to Iterable, Collection, & List

Default methods java.lang.Iterable.forEach(), java.util.Collection.removeIf(), java.util.List.sort(), and java.util.List.replaceAll() were added to make operations over collections more concise for users of functional interfaces.

The enhancement associated with this change is 8001647.

Collections: Implement Parallel Array Sorting

Utility methods in java.util.Arrays that use the Fork/Join parallelism common pool to provide sorting of arrays in parallel were added. Sort method were defined for all primitive array types except boolean, Comparable object types, and arbitrary Object types using a supplied java.util.Comparator. The sorting algorithm is guaranteed to be stable for elements of reference types. New methods include java.util.Arrays.parallelSort(T[]) and java.util.Arrays.parallelSort(byte[]).

Additional details may be found in JEP 103 Parallel Array Sorting.

The enhancements associated with this change are 8003981 and 8014076.

Collections: Add Arrays.parallelPrefix()

Eight overloads of java.util.Arrays.parallelPrefix() were added to accumulate, in parallel, each element of the given array in place, using the supplied function.

The enhancement associated with this change is 8012647.

IO & NIO

I/O & NIO: Clarify Console.reader() behavior for line termination

The specification of java.io.Console.reader() was clarified to indicate that a line termination is required for characters to be returned. Prior to this change, the specification only said that characters beyond line termination weren’t returned per invocation.

The bug associated with this change is 6341345.

I/O & NIO: Clarify File attribute methods to describe behavior when run as a superuser

The specification for all java.io.File methods which set or query the read, write, or execute attributes (e.g. java.io.File.setReadOnly(), java.io.File.setWritable(), java.io.File.canExecute()) was updated to document the expected behavior when run as a superuser. Since the superuser may ignore these permissions, the results of invocation may not be predicted by the file’s actual permissions.

The bug associated with this change is 6931128.

I/O & NIO: Define behavior of AutoCloseable & Closeable when resources aren’t successfully released

An advisory note was added to java.lang.AutoCloseable (and a reminder in java.io.Closeable) to recommend that implementations release resources prior to throwing the exception. Following this advice means that resources will be released in a timely manner, particularly if used with try-with-resources. When multiple resources are involved, or one stream wraps another, this helps to keep the state of the resources synchronized.

The bug associated with this change is 7015589.

I/O & NIO: Update InputStream.skip() & FileInputStream.skip() to describe result for negative value

The java.io.InputStream.skip() specification was updated to indicate that subclasses may have different implementations for negative values. The java.io.FileInputStream.skip() specification was updated to describe the current long-standing behavior. The method will try to skip backwards but will throw an IOException if the backing file does not support backward skip. A negative value will be returned if it skipped backwards.

The enhancement associated with this change is 8011136.

I/O & NIO: Add methods to Files

JSR 335: Lambda Expressions for the Java Programming Language added the method java.nio.file.Files.lines(Path,Charset), to read lines of a text files as a Stream. A version of this method that has only the Path as a parameter, java.nio.file.Files.lines(Path), was added so that it may be used without method references. This method uses UTF-8 as the Charset for encoding and decoding.

These four additional methods which also use UTF-8 as the Charset were added: java.nio.file.Files.newBufferedReader(Path), java.nio.file.Files.newBufferedWriter(Path,OpenOption…), java.nio.file.Files.readAllLines(Path), and java.nio.file.Files.write(Path,Iterable,OpenOption…).

The enhancement associated with this change is 8015314.

I/O & NIO: Update Files.move() to describe precision loss of last-modified-time

The specification of java.nio.file.Files.move() was updated to that the last-modified-time may be copied to the target file with some potential precision loss.

The enhancement associated with this change is 8006645.

java.lang

java.lang: Update the primitive wrapper classes

The following changes were made to the primitive wrapper classes:

java.lang: Update String, StringBuilder, & StringBuffer

The following changes were made to String and related classes.

java.lang: Update SecurityManager

java.lang: Retire Thread.stop(Throwable)

The implementation of Thread.stop(Throwable) was modified to always throw UnsupportedOperationException.

Compatibility Note: All Thread.stop() methods are inherently unsafe as the cause threads to have objects in an inconsistent state or by handling Throwables that it was never intended to handle. This method has been deprecated since 1998 (Java SE 1.2) and research on Maven Central, grepcode.com, and other places has indicated that the method is relatively unused.

java.lang: Add ThreadLocal.withInitial()

A public static factory method, ThreadLocal.withInitial(java.util.function.Supplier) was added. The method returns an instance of ThreadLocal that obtains its initial value from a java.util.function.Supplier. Existence of this method enables initialization deferral and removes a layer of indirection when a Supplier is doing something like incrementing a serial number for each instance.

The enhancement associated with this change is 8003246.

java.lang: Implement mechanism to forcibly destroy a Process

Three new methods, waitFor(), destroyForcibly(), and isAlive() were added to the abstract class. These new methods provide the means to terminate the subprocess represented by the Process object.

The enhancement associated with this change is 4244896.

java.lang: Update Math & StrictMath

The following changes were made to java.lang.Math and java.lang.StrictMath.

java.lang: Add new InternalError & VirtualMachineError constructors

Two new constructors supporting exception chaining were added to both InternalError and VirtualMachineError. This is the complete list of new constructors: InternalError(String, Throwable), InternalError(Throwable), VirtualMachineError(String, Throwable), and VirtualMachineError(Throwable).

The enhancement associated with this change is 7080020.

java.lang: Support Native Libraries

The specifications for java.lang.System.Load(), java.lang.Runtime.load(), java.lang.System.loadLibrary(), and java.lang.Runtime.loadLibrary() were changed to describe how the native library will be located and statically linked. Additional conditions for throwing an UnsatisfiedLinkError were added.

The enhancement associated with this change is 8005716.

java.lang: Clarify that support of -javaagent is not required

The java.lang.instrument specification was clarified to indicate that implementations with a command-line interface are not required to provide a way to start agents from the command-line.

The bug associated with this change is 8006565.

java.lang: Update LockInfo to remove ConstructorProperties annotation & add LockInfo.from()

The following changes were made to LockInfo.

These changes were necessary to remove an API dependency on java.beans.PropertyChangeListener which itself is tightly bound to areas of the platform such as applet, AWT, and Swing. This dependence makes it impossible to have a small footprint environment which does not include the entire client/desktop stack. This change was made in preparation for modules in a future release. For more information about changes for the modular platform see JEP 162 Prepare for Modularization.

The enhancement associated with this change is 7193302.

Reflection

Reflection: Update Class

Reflection: Implement method parameter reflection

Several changes were necessary to implement parameter reflection.

Additional enhancements associated with this change are 8004729, 8007073, 8004728, 8007405, and 8014249.

Reflection: Update Proxy

The following changes were made to java.lang.reflect.Proxy.

Reflection: Add abstract superclass Executable

Common functionality of java.lang.reflect.Method and java.lang.reflect.Constructor is captured with the addition of java.lang.reflect.Executable which declares the 14 common methods. The declarations of Method and Constructor were modified to have Executable as their only direct supertype.

The enhancement associated with this is 7007535.

Reflection: Add GenericSignaturFormatError constructor

A new constructor, java.lang.reflect.GenericSignatureFormatError(String) was added.

The enhancement associated with this change is 7055295.

Reflection: Add missing access check to TypeVariable.getGenericDeclaration()

java.lang.reflect.TypeVariable.getGenericDeclaration() was missing an access check so the signature of the method was modified to throw a SecurityException.

Reflection: Define Array.newInstance() maximum dimension

The specification of the two overloads of Array.newInstance() was modified to explicitly state that the number of array dimensions must not exceed 255. A @throws IllegalArgumentException will be thrown if an attempt is made to instantiate an array which exceeds this value.

The bug associated with this change is 7044282.

Reflection: Add @Native annotation

A new annotation type, java.lang.annotation.Native was added so that constant fields annotated with @Native could be identified by tools which generate native header files.

The bug associated with this change is 8000404.

Reflection: Add support for repeating annotations

Multiple changes were necessary to implement repeating annotations:

Additional details may be found in JEP 120 Repeating Annotations.

Additional enhancements associated with these changes are 8005712, 8008279, 7188442.

Reflection: Upgrade AnnotatedElement.isAnnotationPresent() to be a default method

The default method of java.lang.reflect.AnnotatedElement.isAnnotationPresent() was specified as follows:

getAnnotations(annotationClass) != null

The enhancement associated with this change is 8007113.

Reflection: Clarify “present” & annotation ordering

The class documentation and the following six methods in AnnotationElement were updated to use better terminology to describe the presence of annotations as tested by different methods on the interface: isAnnotationPresent(), getAnnotation(Class), getAnnotations(), getAnnotationsByType(), getDeclaredAnnotation(), and getDeclaredAnnotationByType().

The enhancement associated with this change is 8010679.

Reflection: Update TypeVariable to extend AnnotatedElement

The declaration of the java.lang.reflect.TypeVariable interface was modified to extend AnnotatedElement.

The enhancement associated with this change is 7086192.

Reflection: Specify IncompleteAnnotationException constructor’s behavior on null input

java.lang.annotation.IncompleteAnnotationException(Class,String) was modified to throw a NullPointerException when either parameter is null

The bug associated with this change is 7021922.

Reflection: Modify declaration of GenericDeclaration

The declaration of java.lang.reflect.GenericDeclaration interface was modified to extend AnnotatedElement. All concrete implementations of GenericDeclaration already implement AnnotatedElement.

The enhancement associated with this change is 8014836.

Reflection: Modify model for the intersection type

A new javax.lang.model.type.IntersectionType was added as part of JSR 335: Lambda Expressions for the Java Programming Language to represent the upper bounds of a type variable. The specification of javax.lang.model.type.DeclaredType, javax.lang.model.type.IntersectionType, and javax.lang.model.type.TypeVariable were updates to replace older usage of javax.lang.model.type.DeclaredType to model the intersection types.

The bug associated with this change is 6657966.

java.lang.invoke

java.lang.invoke: Specification maintenance

The following changes were made to align the specification with long-standing behavior.

The bug associated with this change is 8024438.

java.lang.invoke: Specify behavior for method "<init>"

The existing behavior of four methods in java.lang.invoke.MethodHandles.Lookup was documented. When Lookup.findStatic(), Lookup.findVirtual(), Lookup.findConstructor(), or Lookup.findSpecial() is invoked on a method named “<init>”a java.lang.reflect.NoSuchMethodException is thrown.

The bug associated with this change is 8001108.

java.lang.invoke: Specify arity limits in MethodHandle and MethodHandles

Because of JVM limits on the arity of methods, any non-static method may have at most 254 arguments, for a total argument count of 255 (including receiver). The limit is lower if any of the arguments are doubles or longs.

Updates were made to the following entities to specify arity limits for method arguments: java.lang.invoke.MethodHandle class specification and its methods MethodHandle.asSpreader() and MethodHandle.asCollector(), java.lang.invoke.MethodHandles.Lookup class specification and its methods Lookup.spreadInvoker(), Lookup.exactInvoker(), Lookup.invoker(), Lookup.dropArguments(), and Lookup.filterArguments().

The bug associated with this change is 8019417.

java.lang.invoke: Document behavior for method handle arity mismatch

The existing behavior of java.lang.invoke.MethodHandles.spreadInvoker() and java.lang.invoke.MethodHandle.asSpreader() was documented. An IllegalArgumentException is thrown when the passed array is of unexpected length. A null array is now considered a degenerate case so it also throws an IllegalArgumentException instead of a NullPointerException.

The bug associated with this change is 8001109.

java.lang.invoke: Add MethodHandles.collectArguments()

java.lang.invoke.MethodHandles.collectArguments(mh, pos, collector) was added to produce a method handle which acts as follows:

lambda(a*, b*, c*) { x = collector(b*); return mh(a*, x, c*)}

Where the span of arguments b* is located by pos and the arity of the collector.

The enhancement associated with this change is 8001110.

java.lang.invoke: Upgrade MethodHandleInfo to public

java.lang.invoke.MethodHandleInfo was made a public interface containing 9 fields describing the reference kind and 8 methods to examine direct method handles. Methods handles that are not direct are left for the future. New methods MethodHandles.Lookup.revealDirect() which cracks a direct method handle and MethodHandles.Lookup.reflectAs() which acts as a bridge to core reflection were also added.

The enhancement associated with this change is 8008688.

java.lang.invoke: Remove specification requiring eager initialization in Lookup

Specification that demanded that java.lang.invoke.MethodHandles.Lookup.findStatic() and similar factory methods eagerly initialize were removed. Specification was added to affirms that the bytecode behavior, by stating that initialization happens when the method handle is invoked (if ever). This is the complete list of affected methods: Lookup.findStatic(), Lookup.findConstructor(), Lookup.findStaticGetter(), Lookup.findStaticSetter(), Lookup.unreflectConstructor(), Lookup.unreflectGetter(), and Lookup.unreflectSetter().

The bug associated with this change is 8024599.

java.math

java.math: Add exact primitive type conversion methods to BigInteger

Methods supporting exact conversion to primitives, java.math.BigInteger.byteValueExact(), java.math.BigInteger.shortalueExact(), java.math.BigInteger.intValueExact(), and java.math.BigInteger.longValueExact(), were added. All exact methods throw ArithmeticException if the result is out of range. These methods are similar to those which already exist for java.lang.BigDecimal.

The enhancement associated with this change is 6879143.

java.math: Declare when BigDecimal.stripTrailingZeros returns BigDecimal.ZERO

The specification of java.math.BigDecimal.stripTrailingZeros() was augmented to state that BigDecimal.ZERO will be returned if the following is true:

BigDecimal.compareMagnitude(BigDecimal.ZERO) == 0

The bug associated with this change is 6480539.

java.math: Define the range of values supported by BigInteger

The class specification of java.math.BigInteger was modified to declare the precise range of supported values. Attempts to construct a BigInteger outside of that range throw java.lang.ArithmeticException. The @throws ArithmeticException of the BigInteger.probablePrime() and BigInteger. nextProbablePrime() methods was updated to indicate when these overflow conditions will occur.

The bugs associated with this change are 6910473, 8021203, 8021204, and 80222780.

Concurrency

Concurrency: Add CountedCompleter & methods to ForkJoin{Pool,Task}

Modifications to java.util.concurrent.ForkJoinPool that allow them to be used more effectively were made. New features include support for completion-based designs that are often most appropriate for I/O bound usages. Additions include a default ForkJoin common pool, markers/tags to ForkJoinTasks, and java.util.concurrent.CountedCompleter (a ForkJoinTask with a completion action performed when triggered).

Additional details may be found in JEP 155 Concurrency Updates.

The enhancement associated with this change is 8002356.

Concurrency: Add Scalable Updatable Variables

A small set of new classes (java.util.concurrent.atomic.DoubleAccumulator, java.util.concurrent.atomic.DoubleAdder, java.util.concurrent.atomic.LongAccumulator, and java.util.concurrent.atomic.LongAdder) were added which internally employ contention-reduction techniques that provide huge throughput improvements as compared to atomic variables. This was made possible by relaxing atomicity guarantees in a way which is acceptable to most applications.

Additional details may be found in JEP 155 Concurrency Updates.

The enhancements associated with this change are 8005311 and 8026344.

Concurrency: Add CompletableFuture

An implementation of java.util.concurrent.Future, java.util.concurrent.CompletableFuture, was added. It is used for Futures which may be explicitly completed and may include dependent functions and actions that trigger when completed. This change also included the introduction of java.util.concurrent.CompletionException and the marker interface java.util.concurrent.CompletableFuture.AsynchronousCompletionTask.

Additional details may be found in JEP 155 Concurrency Updates.

The enhancement associated with this change is 8005696.

Concurrency: Add StampedLock

java.util.concurrent.locks.StampedLock was added. This class introduces a capability-based lock with three modes for controlling read/write access. The class provides more flexibility, and better performance in most cases over java.util.concurrent.locks.ReadWriteLock.

Additional details may be found in JEP 155 Concurrency Updates.

The enhancement associated with this change is 8005697.

Concurrency: Update ConcurrentHashMap

Changes to java.util.concurrent.ConcurrentHashMap and java.util.concurrent.ConcurrentHashMap.KeySetView include the following:

Additional details may be found in JEP 155 Concurrency Updates and JEP 107 Bulk Data Operations for Collections.

The enhancement associated with this change is 8005704.

Concurrency: Refine Atomic*FieldUpdater.newUpdater() RuntimeException conditions

The specification for java.util.concurrent.atomic.AtomicIntegerFieldUpdater.newUpdater(), java.util.concurrent.atomic.AtomicLongFieldUpdater.newUpdater(), and java.util.concurrent.atomic.AtomicReferenceFieldUpdater.newUpdater() was updated to document the wrapped access-control exceptions that can be thrown if the field to be updated is not accessible to the caller.

The bug associated with this change is 7103570.

Concurrency: Support ForkJoinPool parallelism

The specification of property java.util.concurrent.ForkJoinPool.common.parallelism was relaxed to allow it to be set to 0. This setting removes sharing of a static common pool of threads which may be undesirable. If this property is set to 0, then the tasks submitted to the pool are executed by the submitting thread.

java.util.concurrent.ForkJoinPool.awaitQuiescence() was added to provide a notification mechanism for any program that relies on asynchronous task processing to complete before program termination.

The enhancement associated with this change is 8008378.

Concurrency: Clarify Permissions for default pool

The specification for the common pool in java.util.concurrent.ForkJoinPool was clarified to declare that the default factory for creating worker threads will create threads that have no permissions when a SecurityManager is present.

Concurrency: Remove padding fields from ThreadLocalRandom serial form

The serialized form of java.util.concurrent.ThreadLocalRandom incorrectly included eight padding fields pad[0-7] since they weren’t declared transient. They were removed. Hence they will be set to a default value of 0L since they will not be explicitly set during object reconstitution.

The bug associated with this change is 8006409.

java.util

The following changes have been made in the java.util package, in addition to changes detailed elsewhere in this document.

java.util: Add Objects.requireNonNull()

java.util.Objects.requireNonNull() was added to check that the specified object reference is not null otherwise it throws a customized NullPointerException.

The enhancement associated with this change is 8011800.

java.util: Update Formatter

The following changes were made to Formatter.

java.util: Support Base64 Encoding & Decoding

A simple utility class, java.util.Base64, was added to provide support for base64 encoding and decoding. This supported API replaces all unsupported (or internal) APIs in the JDK which provide similar functionality including sun.misc.BASE64Encoder, sun.misc.BASE64Decoder, com.sun.org.apache.xml.internal.security.util.Base64, and com.sun.net.httpserver.Base64. Existing usages and implementation of Base64 in the JDK and user applications should be examined for opportunities to replace and use this new API.

Additional details may be found in JEP 135 Base64 Encoding & Decoding.

The enhancements associated with this change are 4235519, 8025003, 8026330, and 8028397.

java.util: Add StringJoiner

A new java.util.StringJoiner class was added. It may be used to construct a sequence of characters separated by a delimiter. Support for an optional prefix and/or suffix is provided. This class supports the new String.join() methods.

The bug associated with this change is 7172553.

java.util: Clarify ServiceLoader.iterator()

The specification for java.util.ServiceLoader.iterator() was clarified to further explain the order the Iterator locates resource files.

Additionally notes were added to both java.lang.ClassLoader.getResource() and java.lang.ClassLoader.getResources() suggesting that subclasses needing to override one method consider overriding the other method to keep them consistent with each other.

The enhancement associated with this change is 8024704.

java.util: Update Properties.{loadFrom,storeTo}XML to only require UTF-8 and UTF-16

The specification for java.util.Properties.storeToXML() and java.util.Properties.loadFromXML() was amended to only require implementations to support UTF-8 and UTF-16. Implementations may support other encodings. These changes are consistent with the XML specification. Additionally, these methods will throw a java.io.UnsupportedEncodingException when an unrecognized encoding is encountered.

These changes were made in preparation for modules in a future release and has been noted in JEP 162 Prepare for Modularization.

java.util: Inherit behavior on null argument for AbstractPreferences.remove()

java.util.prefs.AbstractPreferences.remove(String) was modified to inherit the specification for @throws NullPointerException from java.util.prefs.Preferencs.remove(String).

The bug associated with this change is 7165118.

Logging

Logging: Deprecate LogManager.{add,remove}PropertyChangeListener

Two methods, java.util.logging.LogManager.addPropertyChangeListener() and java.util.logging.LogManager.removePropertyChangeListener() were deprecated. These methods create an API dependency on java.beans.PropertyChangeListener which itself is tightly bound to areas of the platform such as applet, AWT, and Swing. This dependence makes it impossible to have a small footprint environment which does not include the entire client/desktop stack. This change was made in preparation for modules in a future release and has been noted in JEP 162 Prepare for Modularization. They will be removed when the platform is modularized.

The enhancement associated with this change is 7192274.

Logging: Enhance resource bundle handling

The documented temporary solution for locating resource bundles was replaced by the following APIs:

The enhancement associated with this change is 8013839.

Logging: Update for anonymous logger support

The specification for the two java.util.logging.Logger.getAnonymousLogger() methods was updated to document the long-standing behaviour that requires LoggingPermission("control") for Logging.setParent() to succeed. The specification of the existing SecurityException for the following methods was updated to indicate that it would be thrown if the calling thread does not have LoggingPermission("control"): java.util.logging.Logger.addHandler, java.util.logging.Logger.removeHandler, java.util.logging.Logger.setFilter, java.util.logging.Logger.setLevel, java.util.logging.Logger.setResourceBundle, and java.util.logging.Logger.setUseParentHandler.

Logging: Modify specification of handler to require fully qualified class names

The specification for each of the handler implementations (java.util.logging.ConsoleHandler, java.util.logging.FileHandler, java.util.logging.MemoryHandler, java.util.logging.SocketHandler, and java.util.logging.StreamHandler) was modified to clearly state that properties are named using the fully-qualified class name of the handler.

The bug associated with this change is 7159567.

Logging: Remove stack search of resource bundle for a Logger

The java.util.logging.Logger class specification was updated to remove the “temporary transition feature” of searching up the class stack using successive ClassLoaders to locate a java.util.ResourceBundle. Now only the Thread’s context ClassLoader and the system ClassLoader are used. All non-normative text describing the stack search was also removed.

Logging: Downgrade references to ${java.home}/lib

The reference to ${java.home} in the file location of logging.properties in java.util.logging.LogManager was updated to provide an informative, rather than normative, reference so that file may be re-located. This change was made in preparation for modules in a future release and has been noted in JEP 162 Prepare for Modularization.

Additionally, specification indicating that the Preferences API may be used to load the default configuration has been removed as this has never been true.

The enhancement associated with this change is 8003949.

Regular Expressions

Regular Expressions: Add five Perl regular expression constructs

The following fives pre-defined Perl regular expression character classes were added:

Additional details may be found in JEP 111 Additional Unicode Constructs for Regular Expressions.

The bug associated with this change is 7014640.

Regular Expressions: Add two convenience methods to Matcher

java.util.regex.Matcher.start(String) and java.util.regex.Matcher.end(String) were added to provide a more detailed group name-based match result.

The bug associated with this change is 8013252.

Regular Expressions: Specify corner-case behaviours for Pattern.split() and Patter.splitAsStream()

The specification java.util.regex.Pattern.split() and java.util.regex.Pattern.splitAsStream() was extended to define behaviour for zero-length input sequences and positive-width/zero-width match at the beginning of the input stream.

The bug associated with this change is 8027645.

Internationalization

These are the changes relating to internationalization support, primarily in the java.util and java.text packages and in java.lang.Character.

Internationalization: Support Unicode 6.2.0

The supported version of the Unicode standard for Character and String was changed from 6.0.0 to 6.2.0. As a result, 11 new constants were added to java.lang.Character.UnicodeBlock and seven enums were added to java.lang.Character.UnicodeScript. The majority of the changes occurred when updating to 6.1.0 since changes for 6.2.0 support were small.

Additional details may be found in JEP 133 Unicode 6.2.

The enhancements associated with this change are 7070436 and 7198195.

Internationalization: Update Calendar

The following changes were made to java.util.Calendar.

Internationalization: Update Locale

The following changes were made to java.util.Locale.

Internationalization: Support for multiple sets of digits & symbols per Locale

The specification for java.text.DecimalFormatSymbols(Locale) and java.text.DecimalFormatSymbols.getInstance(Locale) was augmented to allow passing different numbering system information as a Unicode extension in the Locale argument.

For instance, this may be used to obtain an Arabic number format instance in the Latin numbering system:

NumberFormat.getNumberInstance(Locale.forLanguageTag("ar-EG-u-nu-latn"))

to use an Arabic numbering system, this code should be used:

NumberFormat.getNumberInstance(Locale.forLanguageTag("ar-EG-u-nu-arab"))

The enhancement associated with this change is 7073852.

Internationalization: Change computation of default time zone

A new system property user.timezone was introduced to hold the value of the default time zone ID if it’s available. In java.util.TimeZone.getDefault(), the algorithm to determine the default was defined. java.util.TimeZone.setDefault() was missing an access check so the signature of the method was modified to throw a SecurityException.

Compatibility Note: Existing code which attempts to invoke TimeZone.setDefault() may not always succeed as it did in past releases.

Internationalization: Support generic time zone names in TimeZoneNameProvider

Generic time zone names are standard/daylight savings time neutral, for example “Pacific Time” is a generic name of “America/Los_Angeles”. A new method java.util.spi.TimeZoneNameProvider.getGenericDisplayName() was added to return the required string which is suitable for presentation to the user. The default of this implementation returns null.

The feature associated with this change is 8003267.

Internationalization: Update Currency

The following changes were made to java.util.Currency and associated support for currency.

Internationalization: Specify thread-safety for {List,Property}?ResourceBundle

The class specification for java.util.ResourceBundle, java.util.ListResourceBundle, and java.util.PropertyResourceBundle was enhanced to indicate that default implementations of all non-abstract methods in the class are thread-safe. Furthermore, any implementations of those classes must also be thread-safe.

The bug associated with this change is 8028368.

Internationalization: Add conditions for throw IllegalArgumentException in PropertyResourceBundle constructors

The specification of java.util.PropertyResourceBundle(InputStream) and java.util.PropertyResourceBundle(Reader) was updated to say that an IllegalArgumentException will be thrown if the argument contains a malformed Unicode escape sequence.

The bug associated with this change is 6251788.

Internationalization: Add ResourceBundle.Control global binding support

A new SPI for service providers, java.util.spi.ResourceBundleControlProvider, was added to enable load via service-loader by ResourceBundle.Control implementations. Additional changes were made to the specifications of the ResourceBundle class and java.util.ResourceBundle(String,Locale,ClassLoader) to include potential customizations of resource bundle loading via the new SPI.

The enhancement associated with this change is 6380549.

Networking

Networking: Remove SocketException from DatagramPacket constructor declaration

The specifications for java.net.DatagramPacket(byte[],int,int.SocketAddress) and java.net.DatagramPacket(SocketAddress) were updated to remove @throws SocketException from the declaration. It was incorrectly added to these constructors when they were originally introduced. The condition for throw results in the unchecked IllegalArgumentException.

Compatibility Note: While this change is binary- but not source-compatible, current practice suggests that its impact will be minor.

The bug associated with this change is 8022126.

Networking: Update URL

The following changes were made to java.net.URL and associated support for URLs (e.g. java.net.URLStreamHandler) and protocols.

Networking: Specify URLClassLoader behaviour on null input

The specification for all the constructors and several methods in java.net.URLClassLoader was modified to throw a NullPointerException when some parameters are null. The complete list of affected methods is as follows: URLClassLoader(URL[]), URLClassLoader(URL[],ClassLoader), URLClassLoader(URL[],ClassLoader,URLStreamHandlerFactory), URLClassLoader.newInstance(URL[]), URLClassLoader.newInstance(URL[],ClassLoader), URLClassLoader.findClass(String), and URLClassLoader.getPermissions(CodeSource).

The bug associated with this change is 7179567.

Networking: Update Socket{Impl?}.shutdownInput()

The specifications for java.net.Socket.shutdownInput() and java.net.SocketImpl.shutdownInput() were updated to indicate how the underlying stream’s available() and read() methods will behave. In both classes, available() will return 0 and read() will return -1 (end of stream).

The bug associated with this change is 7014860.

Networking: Enhance client socket binding

Client socket binding was enhanced via the following changes:

Networking: Add access check for all methods which retrieve the machine’s local address

The specification of all methods in java.net and java.nio (such as java.net.Socket.getLocalAddress() and java.nio.channels.SocketChannel.getLocalAddress() was updated to throw a SecurityException if the permission to “resolve” the localhost address is not granted.

Networking: Remove requirement of external networking

The specification of java.net.NetworkInterface.getNetworkInterfaces() was clarified to indicate that at least one NetworkInterface will always be returned however it make be a loopback interface. This implies that that external networking is not supported.

The enhancement associated with this change is 7120665.

Networking: Update SSL protocol support

The following changes were made to javax.net.ssl.

JAR & ZIP APIs

JAR & ZIP APIs: Update Pack200.{Packer,Unpacker}.{add,remove}PropertyChangeListener

Two key changes were applied to four methods, java.util.jar.Pack200.Packer.addPropertyChangeListener(), java.util.jar.Pack200.Packer.removePropertyChangeListener(), java.util.jar.Pack200.Unpacker.addPropertyChangeListener(), and java.util.jar.Pack200.Unpacker.removePropertyChangeListener().

These methods create an API dependency on java.beans.PropertyChangeListener which itself is tightly bound to areas of the platform such as applet, AWT, and Swing. This dependence makes it impossible to have a small footprint environment which does not include the entire client/desktop stack. This change was made in preparation for modules in a future release and has been noted in JEP 162 Prepare for Modularization. They will be removed when the platform is modularized.

JAR & ZIP APIs: Update Adler32 & CRC32

The following changes were made to the classes which compute checksums, java.util.zip.Adler32 and java.util.zip.CRC32.

RMI

RMI: Allow activation to be optional

A total of 23 methods and constructors in the java.rmi.activation package were modified to throw an unchecked UnsupportedOperationException if activation is not supported by the implementation. If activation is supported, its operation is unchanged. This change was made in preparation for modules in a future release.

The enhancement associated with this change is 8023447.

RMI: Deprecate unused/obsolete APIs

These unused or obsolete API classes in RMI were deprecated:

The enhancement associated with this change is 8026427.

RMI: Deprecate HTTP proxying from RMI (JRMP)

The HTTP proxying/tunneling mechanism for RMI/JRMP (not RMI IIOP for CORBA) as described in the package specification of java.rmi.server and the class specification of java.rmi.server.RMISocketFactory was deprecated. This mechanism can result in unexpectedly long time-outs and didn’t adequately enable processing for RMI requests through firewalls. Tunneling has been disabled by default via the system property java.rmi.server.disableHttp.

The enhancement associated with this change is 8023862.

RMI: Deprecate static stub generation for RMI (JRMP)

Support for statically-generated stubs from RMI/JRMP was deprecated as described in the package specification of java.rmi.server, the entire class specification of java.rmi.server.RemoteStub, and portions of java.rmi.server.UnicastRemoteObject. Since RMI stubs have been generated dynamically since Java SE 5.0, static generation is unnecessary and potentially confusing to new users. Deprecation also includes runtime support for static stubs and runtime support for RMI skeletons (the skeleton APIs were deprecated in a previous release).

The class specification of java.rmi.server.UnicastRemoteObject was re-factored to separate descriptions about the static/dynamic stub acquisition and selection between static and dynamic stubs.

Also included in this change was re-organization of some specification regarding socket factories and clarification of null for client and server socket factory parameters.

The enhancement associated with this change is 8023863.

Security

Security: Implement Limited doPrivileged

Methods were added to java.security.AccessController to enable code to assert a subset of its privileges without otherwise preventing full access-control stack walk to check for other permissions. The new doPrivileged() method variant, java.security.AccessController.doPrivileged(PrivilegedAction, AccessControlContext,Permission), takes a variable number of Permission arguments which are used to test whether the usual access control stack walk for the permission being checked should stop at the method or continue as if the doPrivileged() method had not been invoked. For consistency with existing doPrivileged() methods, three additional variants with a variable number of Permissions as the final argument were also added.

Additional details may be found in JEP 140 Limited doPrivileged.

The features associated with this change are 8014097 and 8021191.

Security: Enhance KeyStore API

The KeyStore API was enhanced with several goals in mind:

The following changes were made:

Additional details may be found in JEP 166 Overhaul JKS-JCEKS-PKCS12 Keystores.

The features associated with this change are 8005408 and 8008171.

Security: Improve support of high entropy random numbers

The API for secure random-number generation was enhanced so that it can be configured to operate within specified quality and responsiveness constraints. This following changes were applied:

Additional details may be found in JEP 123 Configurable Secure Random-Number Generation.

The features associated with this change are 8014838 and and 8025694.

java.security: Relax CodeSource.implies() check order

All references to specific check ordering were removed from java.security.CodeSource.implies(). For instance, the list of numbered checks are now a an unordered sequence of bullet points, and references to “in order” were dropped.

The bug associated with this change is 2222762.

Security: Clarify invalid input in BasicPermission

The specification of java.security.BasicPermission and several subclasses including java.net.NetPermission, java.util.PropertyPermission, and java.lang.RuntimePermission was clarified to say that non-matching wildcards do not constitute an invalid input.

This updated text from java.lang.RuntimePermission is typical of the modifications “Also, an asterisk may appear at the end of the name, following a “.”, or by itself, to signify a wildcard match. For example: “loadLibrary.*” and “*” signify a wildcard match, while “*loadLibrary” and “a*b” do not.”

The bug associated with this change is 7167056.

Security: Add SecurityPermission “insertProvider”

A new “insertProvider” SecurityPermission target name was added. The specification of java.security.Security.addProvider and java.security.Security.insertProviderAt() were updated to check the new permission, before checking the legacy insertProvider.{provider name}. Continued use of the old permission is discouraged.

The bug associated with this change is 8001319.

Security: Support NSA Suite B Cryptography algorithms

Class java.security.spec.DSAGenParameterSpec was added to support for FIPS 186-3 Digital Signature Standard (DSS). This standard defines larger DSA key sizes than what is currently supported and defines the mechanism of how the corresponding parameters are generated. The current public APIs for DSA parameter generation in java.security.interfaces.DSAKeyPairGenerator was enhanced to account for larger keys.

Additional details may be found in JEP 129 NSA Suite B Cryptographic Algorithms.

The feature associated with this change is 7044060.

Security: Implement SHA-224 message digests

A new constant for SHA-224, java.security.spec.MGF1ParameterSpec.SHA-224, was added. The class specifications for java.security.spec.MGF1ParameterSpec and java.security.spec.PSSParameterSpec were updated to include SHA-224 in their lists of supported message digest algorithms.

The feature associated with this change is 4963723.

Security: Add Principal.implies()

The new method java.security.Principal.implies() with default implementation was added to eliminate dependency on package com.sun.security.auth. This change was made in preparation for modules in a future release and has been noted in JEP 162 Prepare for Modularization.

The enhancement associated with this change is 7019834.

Security: Add Hashtable override methods to Provider

The java.security.Provider class implements the java.util.Map interface indirectly. New mutator methods added to Map need corresponding overrides in Provider to add security checks. The complete list of affected methods is as follows:

java.security.Provider.compute(), java.security.Provider.computeIfAbsent(), java.security.Provider.computeIfPresent(), java.security.Provider.merge(), java.security.Provider.putIfAbsent(), java.security.Provider.remove(), java.security.Provider.replace(K key, V oldValue, V newValue()), java.security.Provider.replace(K key, V value()), and java.security.Provider.replaceall().

Security: Update specification of X500Principal constructors

The specification of the applicable javax.security.auth.x500.X500Principal() constructors was updated to indicate that it implements the more restrictive object identifier (OID) syntax as defined in RFC 4512 which requires that OIDs contain at least 2 digits.

The bug associated with this change is 7024604.

Security: Modify KerberosPrincipal.equals() to ignore name-type

The specification of javax.security.auth.kerberos.KerberosPrincipal.equals() was modified to remove checking of the name-type since RFC 4120 6.2 declares that the name-type should be treated as a hint with no significance when checking for equivalence.

The bug associated with this change is 8015669.

Security: Add property to KeyTab to denote who-am-i-for

To restrict javax.security.auth.kerberos.KeyTab for use by a single Principal or everybody, a new property was added to denote “who-am-i-for”. Methods KeyTab.getUnboundInstance(), KeyTab.getInstance(), KeyTab.getPrincipal(), and KeyTab.isBound() were added. The specification of existing methods KeyTab.getInstance(File), KeyTab.getInstance(), and KeyTab.getKeys() was modified.

The enhancement associated with this change is 8001104.

Security: Enhance the Certificate Revocation-Checking API

The certificate revocation-checking API to support best-effort checking, end-entity certificate checking and mechanism-specific options and parameters was improved. The primary proposed API changes (all in java.security.cert) are as follows:

Additional details may be found in JEP 124 Enhance the Certificate Revocation-Checking API.

The enhancements associated with this change are 6854712, 7171570, 8010748, and 8023362.

Security: Allow creation of signature Providers which are not registered

Methods java.security.cert.Certificate.verify(PublicKey, Provider) and java.security.cert.X509CRL.verify(PublicKey, Provider) were added. These methods do not require that the Provider be registered in the provider list and so all variants of Signature.getInstance() are now consistently supported. For compatibility with existing Provider implementations, default implementation of java.security.cert.X509Certificate.verify(PublicKey, Provider) and java.security.cert.X509CRL.verify(PublicKey, Provider) were added.

The enhancement associated with this change is 7026347.

Support AEAD CipherSuites

Modify the specification of javax.crypto.Cipher to describe the uniqueness requirement on IVs used in encryption with the given key and recommend re-initialization of cipher objects with GCM parameters which has a different IV value.

Additional details may be found in JEP 115 AEAD CipherSuites.

The bug associated with this change is 6750584.

Security: Modify PBEParameterSpec to support arbitrary parameters

Two methods, javax.crypto.spec.PBEParameterSpec(byte[],int,AlgorithmParameterSpec) and javax.crypto.spec.PBEParameterSpec.getParameterSpec(), were added to support arbitrary parameters. Applications that wish to use a PBE algorithm can supply an AlgorithmParameterSpec that is appropriate for the underlying cipher.

Additional details may be found in JEP 121 Stronger Algorithms for Password-Based Encryption.

The features associated with this change are 6383200 and 8013170.

Security: Document UnsupportedOperationException for Cipher wrap/unwrap methods

The specification of methods in javax.crypto.Cipher and javax.crypto.CipherSpi was updated to document that an UnsupportedOperationException is thrown if the WRAP_MODE and/or UNWRAP_MODE are not implemented in the underlying Cipher or CipherSpi. The complete list of changes is as follows: javax.crypto.Cipher.wrap(), javax.crypto.Cipher.unwrap(), javax.crypto.Cipher.init(), javax.crypto.CipherSpi.engineWrap(), javax.crypto.CipherSpi.engineUnwrap(), and javax.crypto.CipherSpi.engineInit().

The bug associated with this change is 6750584.

Security: Generify SecretKeyFactory and SecretKeyFactorySpi

In the following method declarations, the type of the keySpec argument was parameterized with an unbounded wildcard (<?>): javax.crypto.SecretKeyFactory.getKeySpec() and javax.crypto.SecretKeyFactorySpi.engineGetKeySpec().

The bugs associated with this change are 7064075 and 7145789.

Security: Provide SASL service for multiple hostnames

The SASL service was modified to allow it to serve clients from different networks by exposing different service names. The specification of the parameter for the server name in javax.security.sasl.Sasl.createSaslServer() and javax.security.sasl.SaslServerFactory.createSaslServer() was modified to require that the name be fully qualified or null to represent a server that is not bound to any specific host name. A new constant, javax.security.sasl.Sasl.BOUND_SERVER_NAME was added to specify the bound server name for an unbound server.

The bug associated with this change is 7110803.

Security: Downgrade references to ${java.home}/lib/security/java.security

References to ${java.home} in all security APIs were updated to provide an informative, rather than normative, reference so that file may be re-located. This change was made in preparation for modules in a future release and has been noted in JEP 162 Prepare for Modularization.

The enhancement associated with this change is 8004064.

Scripting

Scripting: Update ScriptEngineManager default constructor

In the default constructor for javax.script.ScriptEngineManager, the line describing caller-based access checks was removed.

java.sql

java.sql: Add access check to DriverManger.deregisterDriver

The specification for java.sql.DriverManager.deregisterDriver() was modified to indicate that a “deregisterDriver” permission check would be performed. The existing conditions for SQLException were extended to cover this failure. A new Permission, “deregisterDriver” was added to permission table in the class specification for java.sql.SQLPermission.

The bug associated with this change is 8009732.

JAXWS

JAXWS: Generify Resource.type()

In the method declaration of javax.annotation.Resource.type(), the return type was parameterized with an unbounded wildcard.

The enhancement associated with this change is 8014083.


User Interface

Client

Client: Implement lightweight embedding in other Java UI toolkits

APIs for a lightweight frame which overrides the common Frame’s functionality enabling render to an off-screen image were introduced.

The enhancement associated with this change is 8006406.

Client: Downgrade references to ${java.home}/lib

All file or resource references to ${java.home} were updated to provide an informative, rather than normative, reference so that those files may be re-located. For example, in javax.swing.UIManger reference to ${java.home}/lib/swing.properties was replaced with swing.properties file in the lib subdirectory of the Java installation directory. Similar changes were also made to the class specification for java.awt.datatransfer.SystemFlavorMap, javax.imageio.spi.IIORegistery, javax.sound.mid.MidiSystem, and javax.sound.sampled.AudioSystem. This change was made in preparation for modules in a future release and has been noted in JEP 162 Prepare for Modularization.

The enhancement associated with this change is 8005250.

Client: Update specification of GIF stream metadata for aspect ratio

The GIF stream metadata format specification describing the calculation for the pixel aspect was aligned with the implementation.

The bug associated with this change is 5082749.

Client: Update Accessibility API

The following changes were made to APIs supporting accessibility:

The bug associated with this change is 7179482.

Client: Update AccessibleJLabel.getCharacterBounds() to specify behavior on invalid index

The specification of javax.swing.JLabel.AccessibleJLabel.getCharacterBounds() was enhanced to declare that null will be returned on invalid indices.

AWT

AWT: Update Component.setFocusTraversalKeys() and similar for inherited type checking

The specification for java.awt.Component.setFocusTraversalKeys(), java.awt.Container.setFocusTraversalKeys(), java.awt.KeyboardFocusManager.setDefaultFocusTraverslaKeys(), and javax.swing.JComponent.setFocusTraversalKeys() was updated to indicate that the unchecked ClassCastException may be thrown if the parameter representing the keystroke is not a java.awt.AWTKeyStroke rather than an IllegalArgumentException.

Compatibility Note: Existing applications may handle IllegalArgumentException differently than ClassCastException.

The bug associated with this change is 7146237.

AWT: Update Windows.*AlwaysOnTop*()

The specification for java.awt.Window.setAlwaysOnTop() was updated to include information for behaviour when invoked with a value of false. Furthermore, the specifications for java.awt.Window.setAlwaysOnTop() java.awt.Window.isAlwaysOnTopSupported() were updated to explicitly state that the window’s toolkit is used formerly toolkit was implied.

The bugs associated with this change are 7081584 and 8025225.

AWT: Update KeyboardFocusManager

Multiple methods in java.awt.KeyboardFocusManager were missing some access checks.

A new method KeyboardFocusManager.clearFocusOwner() which clears the focus owner at both the Java and native levels.

AWT: Update Scrollbar methods to account for operating system-specific behavior

The specification of java.awt.Scrollbar.getUnitIncrement() and java.awt.Scrollbar.setUnitIncrement() was modified to indicate that the unitIncrement may be ignored by the underlying controls of some operating systems.

The bug associated with this change is 7057770.

AWT: Clarify FileDialog.setFile()

The specification of java.awt.FileDialog.setFile() was clarified to describe how the selected file could be visually represented based on the native file dialog implementation.

The bug associated with this change is 8000425.

AWT: Enhance Toolkit.beep()

The specification of java.awt.Toolkit.beep() was enhanced to indicate that the beep will depend on hardware and native system settings.

The bug associated with this change is 8003965.

AWT: Use extended modifiers for MouseEvents

“Extended modifiers” were defined in java.awt.event.InputEvent.getModifiersEx(). The “modifiers” parameter description for the three public constructors of java.awt.event.MouseEvent and the package-private constructor java.awt.event.InputEvent() was updated to require use of extended modifiers.

The bug associated with this change is 7109991.

AWT: Indicate when WindowsEvent.WINDOW_CLOSED event is delivered

The specification for java.awt.event.WindowEvent.WINDOW_CLOSED was enhanced to indicate that the event will be delivered after the displayable windows has been closed after invocation of Window.dispose().

The bug associated with this change is 8020851.

AWT: Add alternate mechanism to track the event lifecycle

A new constructor, java.awt.event.InvvocationEvent(Object,Runnable,Runnable,boolean), with a Runnable listener parameter was added. Runnable.run() is invoked after the event is dispatched or disposed. The specification of the protected field java.awt.event.InvvocationEvent.notifier and the notifier parameter of in all InvocationEvent constructors were updated to include references to the new Runnable.

The enhancement associated with this change is 8025588.

AWT: Add DataFlavors for different HTML formats

Additional data flavors in the form of three new fields, java.awt.datatransfer.DataFlavor.fragmentHtmlFlavor(), java.awt.datatransfer.DataFlavor.selectionHtmlFlavor(), and java.awt.datatransfer.DataFlavor.allHtmlFlavor() were added. This allows uniform HTML content transfer on Windows and X11 platforms.

The enhancement associated with this change is 7075105.

Swing

Swing: Deprecate ImageIcon.component and ImageIcon.tracker

Two protected fields, javax.swing.ImageIcon.component() and javax.swing.ImageIcon.tracker() were deprecated. These fields were last used in JDK 6 but can not be removed since they weren’t declared private.

The bug associated with this change is 7035495.

Swing: Update JScrollBar to ignore {block,unit}Increment

The javax.swing.JScrollBar specification for the getters and setters of unitIncrement and blockIncrement was updated to indicate that some look and feels may ignore those properties. This is the complete list of affected methods: javax.swing.JScrollBar.getUnitIncrement(), javax.swing.JScrollBar.setUnitIncrement(), javax.swing.JScrollBar.getBlockIncrement(), and javax.swing.JScrollBar.setBlockIncrement().

The bug associated with this change is 7057769.

Swing: Allow JPopupMenu locations to be modified by the native windowing system

The specification for javax.swing.JPopupMenu.setLocation() was updated to indicate that the native windowing system may either ignore the request or modify it to correspond closely to desktop settings,

Swing: Add warning about focus behavior to JMenuBar

A warning was added to the javax.swing.JMenuBar class specification indication that pressing the Tab key does not transfer focus from a JMenuBar because the default value of the property focusTraversalKeysEnabled is false. To transfer focus, invoke JMenuBar.setFocusTraversalKeysEnabled(true).

The bug associated with this change is 8000326.

Swing: Update JTextComponent to allow platform-specific modifiers

The specification of javax.swing.text.JTextcomponent.setFocusAccelerator() was modified to indicate that the accelerator will be key combination of the platform-specific modifier key and the uppercase equivalent of the given character.

The bug associated with this change is 7156658.

Swing: Make BorderFactory.createTitleBorder() Look and Feel dependent

The six overloaded methods javax.swing.BorderFactory.createTitledBorder() which are relating to TitledBorder.DEFAULT_POSITION were defined to be look-and-feel dependent.

The bug associated with this change is 7149090.

Swing: Clarify method delegation for RootPaneContainer

The class specification for javax.swing.RootPaneContainer was clarified to indicate that implementing classes should override their add(), remove(), and setLayout() methods to delegate to the corresponding methods of the ContentPane. The class specification for the implementing subclasses, javax.swing.JApplet, javax.swing.JApplet, javax.swing.JDialog, javax.swing.JFrame, javax.swing.JInternalFrame, and javax.swing.JWindow, was similarly updated.

The bug associated with this change is 7165112.

Swing: Make BorderFactory.createTitleBorder() Look and Feel dependent

The six overloaded methods javax.swing.BorderFactory.createTitledBorder() which are relating to TitledBorder.DEFAULT_POSITION were defined to be look-and-feel dependent.

The bug associated with this change is 7016396.

Swing: Specify valid parameters for {Async,Composite,Glyph}?View.getNextVisualPositionFrom()

The methods which compute the next visually represented model location where one might place a caret, getNextVisualPositionFrom(), did not specify a valid range for the parameter describing the position to convert. The specification for the thrown javax.swing.text.BadLocationException was extended to describe the long-standing behaviour if the provided position is outside of that range. This is the complete list of affected methods:

javax.swing.text.View.getNextVisualPositionFrom(), javax.swing.text.AsyncBoxView.getNextVisualPositionFrom(), javax.swing.text.CompositeView.getNextVisualPositionFrom(), and javax.swing.text.GlyphView.getNextVisualPositionFrom().

The bug associated with this change is 7016396.

Swing: Generify DefaultTreeSelectionMode.notifyPathChange()

In the method declaration for javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(), the type of the changedPaths argument was parameterized with an unbounded wildcard (<?>). This change was motivated by a desire to reduce build warnings.

The bug associated with this change is 7116950.


Tool Interface

JVMTI

JVMTI: Update JVMTI specification to support statically linked agents

The Agent_OnLoad, Agent_OnUnload, and Agent_OnAttach symbols of the JVMTI Specification were modified so that when they are used in static libraries they reflect the library that contains these symbols. To accomplish this, the following changes were necessary.

Additional details may be found in JEP 178 Statically-Linked JNI Libraries.

The bug associated with this change is 8014135.