From b7ee72f55bd7fe3c20a2e78b4a7a4cb6b8862568 Mon Sep 17 00:00:00 2001 From: darcy Date: Tue, 6 Jul 2010 18:58:30 -0700 Subject: [PATCH] 6963723: Project Coin: Retrofit more JDK classes for ARM Reviewed-by: alanb, malenkov, prr, amenkov --- src/share/classes/java/beans/XMLDecoder.java | 2 +- src/share/classes/java/beans/XMLEncoder.java | 2 +- src/share/classes/java/io/ObjectInput.java | 2 +- src/share/classes/java/io/ObjectOutput.java | 2 +- src/share/classes/java/util/Scanner.java | 2 +- src/share/classes/javax/sound/midi/MidiDevice.java | 2 +- src/share/classes/javax/sound/midi/Receiver.java | 2 +- src/share/classes/javax/sound/midi/Transmitter.java | 2 +- src/share/classes/javax/sound/sampled/Line.java | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/share/classes/java/beans/XMLDecoder.java b/src/share/classes/java/beans/XMLDecoder.java index 4fd0f9dab..a0d5aa04f 100644 --- a/src/share/classes/java/beans/XMLDecoder.java +++ b/src/share/classes/java/beans/XMLDecoder.java @@ -60,7 +60,7 @@ import org.xml.sax.helpers.DefaultHandler; * * @author Philip Milne */ -public class XMLDecoder { +public class XMLDecoder implements AutoCloseable { private final DocumentHandler handler = new DocumentHandler(); private final InputSource input; private Object owner; diff --git a/src/share/classes/java/beans/XMLEncoder.java b/src/share/classes/java/beans/XMLEncoder.java index d4b37da58..3866a6301 100644 --- a/src/share/classes/java/beans/XMLEncoder.java +++ b/src/share/classes/java/beans/XMLEncoder.java @@ -204,7 +204,7 @@ import java.nio.charset.UnsupportedCharsetException; * * @author Philip Milne */ -public class XMLEncoder extends Encoder { +public class XMLEncoder extends Encoder implements AutoCloseable { private final CharsetEncoder encoder; private final String charset; diff --git a/src/share/classes/java/io/ObjectInput.java b/src/share/classes/java/io/ObjectInput.java index 179760b3d..3c7251820 100644 --- a/src/share/classes/java/io/ObjectInput.java +++ b/src/share/classes/java/io/ObjectInput.java @@ -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. diff --git a/src/share/classes/java/io/ObjectOutput.java b/src/share/classes/java/io/ObjectOutput.java index 33426dd39..bf55305f3 100644 --- a/src/share/classes/java/io/ObjectOutput.java +++ b/src/share/classes/java/io/ObjectOutput.java @@ -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 diff --git a/src/share/classes/java/util/Scanner.java b/src/share/classes/java/util/Scanner.java index 96f6e5bba..615250ccc 100644 --- a/src/share/classes/java/util/Scanner.java +++ b/src/share/classes/java/util/Scanner.java @@ -343,7 +343,7 @@ import sun.misc.LRUCache; * * @since 1.5 */ -public final class Scanner implements Iterator { +public final class Scanner implements Iterator, Closeable { // Internal buffer used to hold input private CharBuffer buf; diff --git a/src/share/classes/javax/sound/midi/MidiDevice.java b/src/share/classes/javax/sound/midi/MidiDevice.java index 56e4a61d8..0a8fed478 100644 --- a/src/share/classes/javax/sound/midi/MidiDevice.java +++ b/src/share/classes/javax/sound/midi/MidiDevice.java @@ -107,7 +107,7 @@ import java.util.List; * @author Florian Bomers */ -public interface MidiDevice { +public interface MidiDevice extends AutoCloseable { /** diff --git a/src/share/classes/javax/sound/midi/Receiver.java b/src/share/classes/javax/sound/midi/Receiver.java index ce6e5a1fd..3ff16565c 100644 --- a/src/share/classes/javax/sound/midi/Receiver.java +++ b/src/share/classes/javax/sound/midi/Receiver.java @@ -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 diff --git a/src/share/classes/javax/sound/midi/Transmitter.java b/src/share/classes/javax/sound/midi/Transmitter.java index 93232f131..c9b173894 100644 --- a/src/share/classes/javax/sound/midi/Transmitter.java +++ b/src/share/classes/javax/sound/midi/Transmitter.java @@ -35,7 +35,7 @@ package javax.sound.midi; * * @author Kara Kytle */ -public interface Transmitter { +public interface Transmitter extends AutoCloseable { /** diff --git a/src/share/classes/javax/sound/sampled/Line.java b/src/share/classes/javax/sound/sampled/Line.java index 9ed7c44a0..7d9424370 100644 --- a/src/share/classes/javax/sound/sampled/Line.java +++ b/src/share/classes/javax/sound/sampled/Line.java @@ -70,7 +70,7 @@ package javax.sound.sampled; * @see LineEvent * @since 1.3 */ -public interface Line { +public interface Line extends AutoCloseable { /** * Obtains the Line.Info object describing this -- GitLab