Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: penberg/classpath
base: 4f8558a04c
...
head fork: penberg/classpath
compare: 6d8ebf0a1a
Checking mergeability… Don't worry, you can still create the pull request.
  • 9 commits
  • 35 files changed
  • 0 commit comments
  • 2 contributors
Commits on Mar 14, 2012
@penberg Fix java/lang/reflect/Member.getDeclaringClass() return type
Signed-off-by: Pekka Enberg <penberg@kernel.org>
1a3ef22
@penberg Add missing java/lang/System.lineSeparator() method
Signed-off-by: Pekka Enberg <penberg@kernel.org>
ab9c8ec
@penberg Add missing Java 1.7 compare() API methods to java/lang classes
Signed-off-by: Pekka Enberg <penberg@kernel.org>
ee7992d
@penberg Add missing Java 1.7 constructors to java/lang classes
Signed-off-by: Pekka Enberg <penberg@kernel.org>
e89f354
@penberg Add missing Java 1.7 ReflectiveOperationException class
Signed-off-by: Pekka Enberg <penberg@kernel.org>
a3feb13
@penberg Add missing Java 1.7 java/lang/reflect/Modifier methods
Signed-off-by: Pekka Enberg <penberg@kernel.org>
395870f
@penberg Add missing Java 1.7 AutoCloseable interface
Signed-off-by: Pekka Enberg <penberg@kernel.org>
6cab9bd
Commits on Mar 19, 2012
@gnu-andrew gnu-andrew Add key to NEWS file along the same lines as IcedTea's.
2012-03-16  Andrew John Hughes  <ahughes@redhat.com>

	* NEWS: Add key along the same lines
	as IcedTea.

Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
d44af96
@gnu-andrew gnu-andrew Merge branch 'penberg-next'
Conflicts:
	ChangeLog

Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
6d8ebf0
Showing with 448 additions and 26 deletions.
  1. +76 −0 ChangeLog
  2. +12 −0 NEWS
  3. +5 −0 gnu/java/nio/FileLockImpl.java
  4. +1 −0  java/beans/XMLDecoder.java
  5. +3 −1 java/beans/XMLEncoder.java
  6. +1 −0  java/io/Closeable.java
  7. +2 −1  java/io/ObjectInput.java
  8. +2 −1  java/io/ObjectOutput.java
  9. +13 −1 java/lang/AssertionError.java
  10. +50 −0 java/lang/AutoCloseable.java
  11. +15 −0 java/lang/Boolean.java
  12. +17 −0 java/lang/Byte.java
  13. +17 −0 java/lang/Character.java
  14. +3 −3 java/lang/ClassNotFoundException.java
  15. +3 −3 java/lang/IllegalAccessException.java
  16. +3 −3 java/lang/InstantiationException.java
  17. +17 −0 java/lang/Integer.java
  18. +15 −2 java/lang/LinkageError.java
  19. +17 −0 java/lang/Long.java
  20. +3 −3 java/lang/NoSuchFieldException.java
  21. +3 −3 java/lang/NoSuchMethodException.java
  22. +88 −0 java/lang/ReflectiveOperationException.java
  23. +17 −0 java/lang/Short.java
  24. +12 −0 java/lang/System.java
  25. +3 −3 java/lang/reflect/InvocationTargetException.java
  26. +1 −1  java/lang/reflect/Member.java
  27. +41 −1 java/lang/reflect/Modifier.java
  28. +1 −0  java/nio/channels/FileLock.java
  29. +1 −0  java/sql/Connection.java
  30. +1 −0  java/sql/ResultSet.java
  31. +1 −0  java/sql/Statement.java
  32. +1 −0  javax/sound/midi/MidiDevice.java
  33. +1 −0  javax/sound/midi/Receiver.java
  34. +1 −0  javax/sound/midi/Transmitter.java
  35. +1 −0  javax/sound/sampled/Line.java
View
76 ChangeLog
@@ -1,3 +1,79 @@
+2012-03-16 Andrew John Hughes <ahughes@redhat.com>
+
+ * NEWS: Add key along the same lines
+ as IcedTea.
+
+2012-03-12 Pekka Enberg <penberg@kernel.org>
+
+ * gnu/java/nio/FileLockImpl.java,
+ * java/beans/XMLDecoder.java,
+ * java/beans/XMLEncoder.java,
+ * java/io/Closeable.java,
+ * java/io/ObjectInput.java,
+ * java/io/ObjectOutput.java,
+ * java/lang/AutoCloseable.java,
+ * java/nio/channels/FileLock.java,
+ * java/sql/Connection.java,
+ * java/sql/ResultSet.java,
+ * java/sql/Statement.java,
+ * javax/sound/midi/MidiDevice.java,
+ * javax/sound/midi/Receiver.java,
+ * javax/sound/midi/Transmitter.java,
+ * javax/sound/sampled/Line.java:
+ Add missing interface.
+
+2012-03-12 Pekka Enberg <penberg@kernel.org>
+
+ * java/lang/reflect/Modifier.java:
+ (classModifiers): Add missing method.
+ (interfaceModifiers): Add missing method.
+ (constructorModifiers): Add missing method.
+ (methodModifiers): Add missing method.
+ (fieldModifiers): Add missing method.
+
+2012-03-12 Pekka Enberg <penberg@kernel.org>
+
+ * java/lang/ClassNotFoundException,
+ * java/lang/IllegalAccessException.java,
+ * java/lang/InstantiationException.java,
+ * java/lang/NoSuchFieldException.java,
+ * java/lang/NoSuchMethodException.java,
+ * java/lang/ReflectiveOperationException.java,
+ * java/lang/reflect/InvocationTargetException.java:
+ Add ReflectiveOperationException class.
+
+2012-03-12 Pekka Enberg <penberg@kernel.org>
+
+ * java/lang/AssertionError.java:
+ (AssertionError): Add missing constructor.
+ * java/lang/LinkageError.java:
+ (LinkageError): Add missing constructor.
+
+2012-03-12 Pekka Enberg <penberg@kernel.org>
+
+ * java/lang/Boolean.java:
+ (compare): Add missing method.
+ * java/lang/Byte.java:
+ (compare): Add missing method.
+ * java/lang/Character.java:
+ (compare): Add missing method.
+ * java/lang/Integer.java:
+ (compare): Add missing method.
+ * java/lang/Long.java:
+ (compare): Add missing method.
+ * java/lang/Short.java:
+ (compare): Add missing method.
+
+2012-03-12 Pekka Enberg <penberg@kernel.org>
+
+ * java/lang/System.java:
+ (lineSeparator): Add missing method.
+
+2012-03-12 Pekka Enberg <penberg@kernel.org>
+
+ * java/lang/reflect/Member.java:
+ (getDeclaringClass): Fix return type.
+
2012-03-07 Andrew John Hughes <ahughes@redhat.com>
* NEWS:
View
12 NEWS
@@ -1,3 +1,15 @@
+Key:
+
+SX - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=X
+RHX - https://bugzilla.redhat.com/show_bug.cgi?id=X
+DX - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=X
+GX - http://bugs.gentoo.org/show_bug.cgi?id=X
+CAX - http://server.complang.tuwien.ac.at/cgi-bin/bugzilla/show_bug.cgi?id=X
+LPX - https://bugs.launchpad.net/bugs/X
+PRX - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=X
+
+CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY
+
New in release 1.00 (XXX XX, XXXX)
New in release 0.99 (Feb 15, 2012)
View
5 gnu/java/nio/FileLockImpl.java
@@ -88,6 +88,11 @@ public boolean isValid()
return valid;
}
+ public void close() throws Exception
+ {
+ release();
+ }
+
/**
* Releases the lock if it is still valid. Marks this lock as invalid.
*/
View
1  java/beans/XMLDecoder.java
@@ -104,6 +104,7 @@
* @status updated to 1.5
*/
public class XMLDecoder
+ implements AutoCloseable
{
private Object owner;
View
4 java/beans/XMLEncoder.java
@@ -50,7 +50,9 @@
* @author Robert Schuster (robertschuster@fsfe.org)
* @since 1.4
*/
-public class XMLEncoder extends Encoder
+public class XMLEncoder
+ extends Encoder
+ implements AutoCloseable
{
Object owner;
View
1  java/io/Closeable.java
@@ -48,6 +48,7 @@
* @since 1.5
*/
public interface Closeable
+ extends AutoCloseable
{
/**
View
3  java/io/ObjectInput.java
@@ -48,7 +48,8 @@
*
* @see DataInput
*/
-public interface ObjectInput extends DataInput
+public interface ObjectInput
+ extends DataInput, AutoCloseable
{
/**
* This method returns the number of bytes that can be read without
View
3  java/io/ObjectOutput.java
@@ -48,7 +48,8 @@
*
* @see DataOutput
*/
-public interface ObjectOutput extends DataOutput
+public interface ObjectOutput
+ extends DataOutput, AutoCloseable
{
/**
* This method writes the specified byte to the output stream.
View
14 java/lang/AssertionError.java
@@ -1,5 +1,5 @@
/* AssertionError.java -- indication of a failed assertion
- Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -145,4 +145,16 @@ public AssertionError(double msg)
{
super(Double.toString(msg));
}
+
+ /**
+ * Construct an AssertionError with detail message and cause.
+ *
+ * @param msg Detail message.
+ * @param cause The cause of this exception, may be null
+ * @since 1.7
+ */
+ public AssertionError(String msg, Throwable cause)
+ {
+ super(msg, cause);
+ }
}
View
50 java/lang/AutoCloseable.java
@@ -0,0 +1,50 @@
+/* AutoCloseable.java -- Resource that must be closed after it is no longer
+ used.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.lang;
+
+/**
+ * Resource that must be closed after it is no longer used.
+ *
+ * @since 1.7
+ */
+public interface AutoCloseable
+{
+ void close() throws Exception;
+}
View
15 java/lang/Boolean.java
@@ -237,6 +237,21 @@ public int compareTo(Boolean other)
}
/**
+ * Compares two unboxed boolean values.
+ *
+ * @param x First value to compare.
+ * @param y Second value to compare.
+ * @return 0 if both Booleans represent the same value, a positive number
+ * if this Boolean represents true and the other false, and a negative
+ * number otherwise.
+ * @since 1.7
+ */
+ public static int compare(boolean x, boolean y)
+ {
+ return Boolean.valueOf(x).compareTo(Boolean.valueOf(y));
+ }
+
+ /**
* If the String argument is "true", ignoring case, return true.
* Otherwise, return false.
*
View
17 java/lang/Byte.java
@@ -370,4 +370,21 @@ public int compareTo(Byte b)
return value - b.value;
}
+ /**
+ * Compares two unboxed byte values.
+ * The result is positive if the first is greater, negative if the second
+ * is greater, and 0 if the two are equal.
+ *
+ * @param x First value to compare.
+ * @param y Second value to compare.
+ *
+ * @return positive int if the first value is greater, negative if the second
+ * is greater, and 0 if the two are equal.
+ * @since 1.7
+ */
+ public static int compare(byte x, byte y)
+ {
+ return Byte.valueOf(x).compareTo(Byte.valueOf(y));
+ }
+
}
View
17 java/lang/Character.java
@@ -4200,6 +4200,23 @@ public int compareTo(Character anotherCharacter)
}
/**
+ * Compares two unboxed char values.
+ * The result is positive if the first is greater, negative if the second
+ * is greater, and 0 if the two are equal.
+ *
+ * @param x First value to compare.
+ * @param y Second value to compare.
+ *
+ * @return positive int if the first value is greater, negative if the second
+ * is greater, and 0 if the two are equal.
+ * @since 1.7
+ */
+ public static int compare(char x, char y)
+ {
+ return Character.valueOf(x).compareTo(Character.valueOf(y));
+ }
+
+ /**
* Returns an <code>Character</code> object wrapping the value.
* In contrast to the <code>Character</code> constructor, this method
* will cache some values. It is used by boxing conversion.
View
6 java/lang/ClassNotFoundException.java
@@ -1,5 +1,5 @@
/* ClassNotFoundException.java -- thrown when class definition cannot be found
- Copyright (C) 1998, 2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002, 2005, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -47,9 +47,9 @@
* @see Class#forName(String)
* @see ClassLoader#findSystemClass(String)
* @see ClassLoader#loadClass(String, boolean)
- * @status updated to 1.4
+ * @status updated to 1.7
*/
-public class ClassNotFoundException extends Exception
+public class ClassNotFoundException extends ReflectiveOperationException
{
/**
* Compatible with JDK 1.0+.
View
6 java/lang/IllegalAccessException.java
@@ -1,6 +1,6 @@
/* IllegalAccessException.java -- thrown on attempt to reflect on
inaccessible data
- Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2001, 2002, 2005, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -71,9 +71,9 @@
* @see Field#getDouble(Object)
* @see Method#invoke(Object, Object[])
* @see Constructor#newInstance(Object[])
- * @status updated to 1.4
+ * @status updated to 1.7
*/
-public class IllegalAccessException extends Exception
+public class IllegalAccessException extends ReflectiveOperationException
{
/**
* Compatible with JDK 1.0+.
View
6 java/lang/InstantiationException.java
@@ -1,6 +1,6 @@
/* InstantiationException.java -- thrown when reflection cannot create an
instance
- Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2001, 2002, 2005, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,9 +46,9 @@
* @author Brian Jones
* @author Warren Levy (warrenl@cygnus.com)
* @see Class#newInstance()
- * @status updated to 1.4
+ * @status updated to 1.7
*/
-public class InstantiationException extends Exception
+public class InstantiationException extends ReflectiveOperationException
{
/**
* Compatible with JDK 1.0+.
View
17 java/lang/Integer.java
@@ -586,6 +586,23 @@ public int compareTo(Integer i)
}
/**
+ * Compares two unboxed int values.
+ * The result is positive if the first is greater, negative if the second
+ * is greater, and 0 if the two are equal.
+ *
+ * @param x First value to compare.
+ * @param y Second value to compare.
+ *
+ * @return positive int if the first value is greater, negative if the second
+ * is greater, and 0 if the two are equal.
+ * @since 1.7
+ */
+ public static int compare(int x, int y)
+ {
+ return Integer.valueOf(x).compareTo(Integer.valueOf(y));
+ }
+
+ /**
* Return the number of bits set in x.
* @param x value to examine
* @since 1.5
View
17 java/lang/LinkageError.java
@@ -1,6 +1,6 @@
/* LinkageError.java -- thrown when classes valid at separate compile times
cannot be linked to each other
- Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2001, 2002, 2005, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,7 +46,7 @@
*
* @author Brian Jones
* @author Tom Tromey (tromey@cygnus.com)
- * @status updated to 1.4
+ * @status updated to 1.7
*/
public class LinkageError extends Error
{
@@ -71,4 +71,17 @@ public LinkageError(String s)
{
super(s);
}
+
+ /**
+ * Construct an LinkageError with detail message and cause.
+ *
+ * @param msg Detail message.
+ * @param cause The cause of this exception, may be null
+ * @since 1.7
+ */
+ public LinkageError(String msg, Throwable cause)
+ {
+ super(msg, cause);
+ }
+
}
View
17 java/lang/Long.java
@@ -585,6 +585,23 @@ public int compareTo(Long l)
}
/**
+ * Compares two unboxed long values.
+ * The result is positive if the first is greater, negative if the second
+ * is greater, and 0 if the two are equal.
+ *
+ * @param x First value to compare.
+ * @param y Second value to compare.
+ *
+ * @return positive int if the first value is greater, negative if the second
+ * is greater, and 0 if the two are equal.
+ * @since 1.7
+ */
+ public static int compare(long x, long y)
+ {
+ return Long.valueOf(x).compareTo(Long.valueOf(y));
+ }
+
+ /**
* Return the number of bits set in x.
* @param x value to examine
* @since 1.5
View
6 java/lang/NoSuchFieldException.java
@@ -1,5 +1,5 @@
/* NoSuchFieldException.java -- thrown when reflecting a non-existant field
- Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2001, 2002, 2005, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,9 +45,9 @@
* @author Brian Jones
* @author Warren Levy (warrenl@cygnus.com)
* @since 1.1
- * @status updated to 1.4
+ * @status updated to 1.7
*/
-public class NoSuchFieldException extends Exception
+public class NoSuchFieldException extends ReflectiveOperationException
{
/**
* Compatible with JDK 1.1+.
View
6 java/lang/NoSuchMethodException.java
@@ -1,5 +1,5 @@
/* NoSuchMethodException.java -- thrown when reflecting a non-existant method
- Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2001, 2002, 2005, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -44,9 +44,9 @@
*
* @author Brian Jones
* @author Warren Levy (warrenl@cygnus.com)
- * @status updated to 1.4
+ * @status updated to 1.7
*/
-public class NoSuchMethodException extends Exception
+public class NoSuchMethodException extends ReflectiveOperationException
{
/**
* Compatible with JDK 1.0+.
View
88 java/lang/ReflectiveOperationException.java
@@ -0,0 +1,88 @@
+/* ReflectiveOperationException.java -- thrown when reflective operation fails
+ Copyright (C) 2012 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.lang;
+
+/**
+ * This exception is thrown when reflective operations fail.
+ *
+ * @since 1.7
+ */
+public class ReflectiveOperationException extends Exception
+{
+ private static final long serialVersionUID = 123456789L;
+
+ /**
+ * Create an exception without a message.
+ */
+ public ReflectiveOperationException()
+ {
+ }
+
+ /**
+ * Create an exception with a message.
+ *
+ * @param s the message
+ */
+ public ReflectiveOperationException(String s)
+ {
+ super(s);
+ }
+
+ /**
+ * Create an exception with a message and a cause.
+ *
+ * @param s the message
+ * @param cause the cause, may be null
+ */
+ public ReflectiveOperationException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ /**
+ * Create an exception with a cause.
+ *
+ * @param cause the cause, may be null
+ */
+ public ReflectiveOperationException(Throwable cause)
+ {
+ super(cause);
+ }
+
+}
View
17 java/lang/Short.java
@@ -373,6 +373,23 @@ public int compareTo(Short s)
}
/**
+ * Compares two unboxed short values.
+ * The result is positive if the first is greater, negative if the second
+ * is greater, and 0 if the two are equal.
+ *
+ * @param x First value to compare.
+ * @param y Second value to compare.
+ *
+ * @return positive int if the first value is greater, negative if the second
+ * is greater, and 0 if the two are equal.
+ * @since 1.7
+ */
+ public static int compare(short x, short y)
+ {
+ return Short.valueOf(x).compareTo(Short.valueOf(y));
+ }
+
+ /**
* Reverse the bytes in val.
* @since 1.5
*/
View
12 java/lang/System.java
@@ -97,6 +97,8 @@
*/
public static final PrintStream out = VMSystem.makeStandardOutputStream();
+ private static final String LINE_SEPARATOR = SystemProperties.getProperty("line.separator");
+
/**
* The standard output PrintStream. This is assigned at startup and
* starts its life perfectly valid. Although it is marked final, you can
@@ -713,6 +715,16 @@ public static Console console()
}
/**
+ * Returns the system-dependent line separator.
+ *
+ * @return the system-dependent line separator.
+ */
+ public static String lineSeparator()
+ {
+ return LINE_SEPARATOR;
+ }
+
+ /**
* This is a specialised <code>Collection</code>, providing
* the necessary provisions for the collections used by the
* environment variable map. Namely, it prevents
View
6 java/lang/reflect/InvocationTargetException.java
@@ -1,5 +1,5 @@
/* InvocationTargetException.java -- Wrapper exception for reflection
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -50,9 +50,9 @@
* @see Method#invoke(Object,Object[])
* @see Constructor#newInstance(Object[])
* @since 1.1
- * @status updated to 1.4
+ * @status updated to 1.7
*/
-public class InvocationTargetException extends Exception
+public class InvocationTargetException extends ReflectiveOperationException
{
/**
* Compatible with JDK 1.1+.
View
2  java/lang/reflect/Member.java
@@ -79,7 +79,7 @@
*
* @return the class that declared this member
*/
- Class getDeclaringClass();
+ Class<?> getDeclaringClass();
/**
* Gets the simple name of this member. This will be a valid Java
View
42 java/lang/reflect/Modifier.java
@@ -1,5 +1,5 @@
/* java.lang.reflect.Modifier
- Copyright (C) 1998, 1999, 2001, 2002, 2005, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2001, 2002, 2005, 2008, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -300,6 +300,46 @@ public static boolean isVolatile(int mod)
}
/**
+ * @since 1.7
+ */
+ public static int classModifiers()
+ {
+ return PUBLIC | PROTECTED | PRIVATE | STATIC | ABSTRACT | FINAL | STRICT;
+ }
+
+ /**
+ * @since 1.7
+ */
+ public static int interfaceModifiers()
+ {
+ return PUBLIC | PROTECTED | PRIVATE | STATIC | ABSTRACT | STRICT;
+ }
+
+ /**
+ * @since 1.7
+ */
+ public static int constructorModifiers()
+ {
+ return PUBLIC | PROTECTED | PRIVATE;
+ }
+
+ /**
+ * @since 1.7
+ */
+ public static int methodModifiers()
+ {
+ return PUBLIC | PROTECTED | PRIVATE | STATIC | ABSTRACT | FINAL | STRICT | SYNCHRONIZED | NATIVE;
+ }
+
+ /**
+ * @since 1.7
+ */
+ public static int fieldModifiers()
+ {
+ return PUBLIC | PROTECTED | PRIVATE | STATIC | FINAL | TRANSIENT | VOLATILE;
+ }
+
+ /**
* Get a string representation of all the modifiers represented by the
* given int. The keywords are printed in this order:
* <code>&lt;public|protected|private&gt; abstract static final transient
View
1  java/nio/channels/FileLock.java
@@ -45,6 +45,7 @@
* @since 1.4
*/
public abstract class FileLock
+ implements AutoCloseable
{
private final FileChannel channel;
private final long position;
View
1  java/sql/Connection.java
@@ -46,6 +46,7 @@
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public interface Connection
+ extends AutoCloseable
{
/**
* This transaction isolation level indicates that transactions are not
View
1  java/sql/ResultSet.java
@@ -60,6 +60,7 @@
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public interface ResultSet
+ extends AutoCloseable
{
/**
* The rows will be processed in order from first to last.
View
1  java/sql/Statement.java
@@ -44,6 +44,7 @@
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public interface Statement
+ extends AutoCloseable
{
int CLOSE_CURRENT_RESULT = 1;
int KEEP_CURRENT_RESULT = 2;
View
1  javax/sound/midi/MidiDevice.java
@@ -46,6 +46,7 @@
*
*/
public interface MidiDevice
+ extends AutoCloseable
{
/**
* Get the Info object describing this device.
View
1  javax/sound/midi/Receiver.java
@@ -47,6 +47,7 @@
*
*/
public interface Receiver
+ extends AutoCloseable
{
/**
* Send a MIDI message and timestamp. Some receivers don't support
View
1  javax/sound/midi/Transmitter.java
@@ -47,6 +47,7 @@
*
*/
public interface Transmitter
+ extends AutoCloseable
{
/**
* Set the Receiver to which MIDI events will be sent.
View
1  javax/sound/sampled/Line.java
@@ -43,6 +43,7 @@
* @since 1.3
*/
public interface Line
+ extends AutoCloseable
{
/**
* An object of this type holds information about a Line.

No commit comments for this range

Something went wrong with that request. Please try again.