JDK-6963723 : Project Coin: Retrofit more JDK classes for ARM
Type:Bug
Component:other-libs
Sub-Component:other
Affected Version:7
Priority:P4
Status:Closed
Resolution:Fixed
OS:generic
CPU:generic
Submitted:2010-06-24
Updated:2019-08-31
Resolved:2011-05-18
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
In addition to classes and interfaces retrofitted to support ARM as part of 6911261, other types could reasonably be made to be subtypes of AutoCloseable or Closeable.
Comments
PUBLIC COMMENTS
See
http://hg.openjdk.java.net/jdk7/tl/jdk/rev/425960cef714
07-07-2010
SUGGESTED FIX
# HG changeset patch
# User darcy
# Date 1278467910 25200
# Node ID 425960cef7148a41039f7ba8dfa83de5f68a9a12
# Parent c0d2a097eb99e94108dc56bf49d896461c5418f1
6963723: Project Coin: Retrofit more JDK classes for ARM
Reviewed-by: alanb, malenkov, prr, amenkov
--- a/src/share/classes/java/beans/XMLDecoder.java Thu Jul 01 15:30:44 2010 -0400
+++ b/src/share/classes/java/beans/XMLDecoder.java Tue Jul 06 18:58:30 2010 -0700
@@ -60,7 +60,7 @@ import org.xml.sax.helpers.DefaultHandle
*
* @author Philip Milne
*/
-public class XMLDecoder {
+public class XMLDecoder implements AutoCloseable {
private final DocumentHandler handler = new DocumentHandler();
private final InputSource input;
private Object owner;
--- a/src/share/classes/java/beans/XMLEncoder.java Thu Jul 01 15:30:44 2010 -0400
+++ b/src/share/classes/java/beans/XMLEncoder.java Tue Jul 06 18:58:30 2010 -0700
@@ -204,7 +204,7 @@ import java.nio.charset.UnsupportedChars
*
* @author Philip Milne
*/
-public class XMLEncoder extends Encoder {
+public class XMLEncoder extends Encoder implements AutoCloseable {
private final CharsetEncoder encoder;
private final String charset;
--- a/src/share/classes/java/io/ObjectInput.java Thu Jul 01 15:30:44 2010 -0400
+++ b/src/share/classes/java/io/ObjectInput.java Tue Jul 06 18:58:30 2010 -0700
@@ -36,7 +36,7 @@ package java.io;
* @see java.io.ObjectInputStream
* @since JDK1.1
*/
-public interface ObjectInput extends DataInput {
+public interface ObjectInput extends DataInput, AutoCloseable {
/**
* Read and return an object. The class that implements this interface
* defines where the object is "read" from.
--- a/src/share/classes/java/io/ObjectOutput.java Thu Jul 01 15:30:44 2010 -0400
+++ b/src/share/classes/java/io/ObjectOutput.java Tue Jul 06 18:58:30 2010 -0700
@@ -36,7 +36,7 @@ package java.io;
* @see java.io.ObjectInputStream
* @since JDK1.1
*/
-public interface ObjectOutput extends DataOutput {
+public interface ObjectOutput extends DataOutput, AutoCloseable {
/**
* Write an object to the underlying storage or stream. The
* class that implements this interface defines how the object is
--- a/src/share/classes/java/util/Scanner.java Thu Jul 01 15:30:44 2010 -0400
+++ b/src/share/classes/java/util/Scanner.java Tue Jul 06 18:58:30 2010 -0700
@@ -343,7 +343,7 @@ import sun.misc.LRUCache;
*
* @since 1.5
*/
-public final class Scanner implements Iterator<String> {
+public final class Scanner implements Iterator<String>, Closeable {
// Internal buffer used to hold input
private CharBuffer buf;
--- a/src/share/classes/javax/sound/midi/MidiDevice.java Thu Jul 01 15:30:44 2010 -0400
+++ b/src/share/classes/javax/sound/midi/MidiDevice.java Tue Jul 06 18:58:30 2010 -0700
@@ -107,7 +107,7 @@ import java.util.List;
* @author Florian Bomers
*/
-public interface MidiDevice {
+public interface MidiDevice extends AutoCloseable {
/**
--- a/src/share/classes/javax/sound/midi/Receiver.java Thu Jul 01 15:30:44 2010 -0400
+++ b/src/share/classes/javax/sound/midi/Receiver.java Tue Jul 06 18:58:30 2010 -0700
@@ -38,7 +38,7 @@ package javax.sound.midi;
*
* @author Kara Kytle
*/
-public interface Receiver {
+public interface Receiver extends AutoCloseable {
//$$fb 2002-04-12: fix for 4662090: Contradiction in Receiver specification
--- a/src/share/classes/javax/sound/midi/Transmitter.java Thu Jul 01 15:30:44 2010 -0400
+++ b/src/share/classes/javax/sound/midi/Transmitter.java Tue Jul 06 18:58:30 2010 -0700
@@ -35,7 +35,7 @@ package javax.sound.midi;
*
* @author Kara Kytle
*/
-public interface Transmitter {
+public interface Transmitter extends AutoCloseable {
/**
--- a/src/share/classes/javax/sound/sampled/Line.java Thu Jul 01 15:30:44 2010 -0400
+++ b/src/share/classes/javax/sound/sampled/Line.java Tue Jul 06 18:58:30 2010 -0700
@@ -70,7 +70,7 @@ package javax.sound.sampled;
* @see LineEvent
* @since 1.3
*/
-public interface Line {
+public interface Line extends AutoCloseable {
/**
* Obtains the <code>Line.Info</code> object describing this