[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] [generics] Patch: FYI: java.util exception fixes
From: |
Tom Tromey |
Subject: |
[cp-patches] [generics] Patch: FYI: java.util exception fixes |
Date: |
13 Aug 2005 18:46:06 -0600 |
I'm checking this in on the generics branch.
This fixes serialization for all the exception classes in java.util,
and adds a new exception that was missing.
Tom
Index: ChangeLog
from Tom Tromey <address@hidden>
* java/util/UnknownFormatConversionException.java
(serialVersionUID): New field.
(s): Renamed from 'conv' for serialization.
* java/util/MissingFormatWidthException.java (serialVersionUID):
New field.
(s): Renamed from 'width' for serialization.
* java/util/MissingFormatArgumentException.java
(serialVersionUID): New field.
(s): Renamed from 'spec' for serialization.
* java/util/IllegalFormatWidthException.java (serialVersionUID):
New field.
(w): Renamed from 'width' for serialization.
* java/util/IllegalFormatPrecisionException.java
(serialVersionUID): New field.
(p): Renamed from 'precision' for serialization.
* java/util/IllegalFormatFlagsException.java (serialVersionUID):
New field.
* java/util/IllegalFormatConversionException.java
(serialVersionUID): New field.
(c): Renamed from 'conv' for serialization.
(arg): Renamed from 'argClass' for serialization.
* java/util/IllegalFormatCodePointException.java
(serialVersionUID): New field.
(c): Renamed from 'codepoint' for serialization.
* java/util/FormatFlagsConversionMismatchException.java
(serialVersionUID): New field.
(f): Renamed from 'flags' for serialization.
(c): Renamed from 'conversion' for serialization.
* java/util/DuplicateFormatFlagsException.java (serialVersionUID):
New field.
* java/util/IllegalFormatException.java (serialVersionUID): New
field.
* java/util/FormatterClosedException.java (serialVersionUID): New
field.
* java/util/InvalidPropertiesFormatException.java: New file.
Index: java/util/DuplicateFormatFlagsException.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/java/util/Attic/DuplicateFormatFlagsException.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 DuplicateFormatFlagsException.java
--- java/util/DuplicateFormatFlagsException.java 20 Apr 2005 20:20:31 -0000
1.1.2.1
+++ java/util/DuplicateFormatFlagsException.java 14 Aug 2005 00:48:15 -0000
@@ -41,6 +41,9 @@
/** @since 1.5 */
public class DuplicateFormatFlagsException extends IllegalFormatException
{
+ private static final long serialVersionUID = 18890531L;
+
+ // Note: name fixed by serialization.
private String flags;
public DuplicateFormatFlagsException(String flags)
Index: java/util/FormatFlagsConversionMismatchException.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/java/util/Attic/FormatFlagsConversionMismatchException.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 FormatFlagsConversionMismatchException.java
--- java/util/FormatFlagsConversionMismatchException.java 20 Apr 2005 20:20:31
-0000 1.1.2.1
+++ java/util/FormatFlagsConversionMismatchException.java 14 Aug 2005 00:48:15
-0000
@@ -42,22 +42,26 @@
public class FormatFlagsConversionMismatchException
extends IllegalFormatException
{
- private String flags;
- private char conversion;
+ private static final long serialVersionUID = 19120414L;
- public FormatFlagsConversionMismatchException(String flags, char conversion)
+ // Note: name fixed by serialization.
+ private String f;
+ // Note: name fixed by serialization.
+ private char c;
+
+ public FormatFlagsConversionMismatchException(String f, char c)
{
- this.flags = flags;
- this.conversion = conversion;
+ this.f = f;
+ this.c = c;
}
public char getConversion()
{
- return conversion;
+ return c;
}
public String getFlags()
{
- return flags;
+ return f;
}
}
Index: java/util/FormatterClosedException.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/java/util/Attic/FormatterClosedException.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 FormatterClosedException.java
--- java/util/FormatterClosedException.java 20 Apr 2005 20:20:31 -0000 1.1.2.1
+++ java/util/FormatterClosedException.java 14 Aug 2005 00:48:15 -0000
@@ -41,6 +41,8 @@
/** @since 1.5 */
public class FormatterClosedException extends IllegalStateException
{
+ private static final long serialVersionUID = 1811216L;
+
public FormatterClosedException()
{
}
Index: java/util/IllegalFormatCodePointException.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/java/util/Attic/IllegalFormatCodePointException.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 IllegalFormatCodePointException.java
--- java/util/IllegalFormatCodePointException.java 20 Apr 2005 20:20:31 -0000
1.1.2.1
+++ java/util/IllegalFormatCodePointException.java 14 Aug 2005 00:48:15 -0000
@@ -41,15 +41,18 @@
/** @since 1.5 */
public class IllegalFormatCodePointException extends IllegalFormatException
{
- int codepoint;
+ private static final long serialVersionUID = 19080630L;
+
+ // Note: name fixed by serialization.
+ int c;
public IllegalFormatCodePointException(int c)
{
- this.codepoint = c;
+ this.c = c;
}
public int getCodePoint()
{
- return codepoint;
+ return c;
}
}
Index: java/util/IllegalFormatConversionException.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/java/util/Attic/IllegalFormatConversionException.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 IllegalFormatConversionException.java
--- java/util/IllegalFormatConversionException.java 20 Apr 2005 20:20:31 -0000
1.1.2.1
+++ java/util/IllegalFormatConversionException.java 14 Aug 2005 00:48:15 -0000
@@ -41,22 +41,26 @@
/** @since 1.5 */
public class IllegalFormatConversionException extends IllegalFormatException
{
- char conv;
- Class<?> argClass;
+ private static final long serialVersionUID = 17000126L;
- public IllegalFormatConversionException(char conv, Class<?> argClass)
+ // Note: name fixed by serialization.
+ char c;
+ // Note: name fixed by serialization.
+ Class<?> arg;
+
+ public IllegalFormatConversionException(char c, Class<?> arg)
{
- this.conv = conv;
- this.argClass = argClass;
+ this.c = c;
+ this.arg = arg;
}
public char getConversion()
{
- return conv;
+ return c;
}
public Class<?> getArgumentClass()
{
- return argClass;
+ return arg;
}
}
Index: java/util/IllegalFormatException.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/java/util/Attic/IllegalFormatException.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 IllegalFormatException.java
--- java/util/IllegalFormatException.java 20 Apr 2005 20:20:31 -0000 1.1.2.1
+++ java/util/IllegalFormatException.java 14 Aug 2005 00:48:15 -0000
@@ -41,6 +41,8 @@
/** @since 1.5 */
public class IllegalFormatException extends IllegalArgumentException
{
+ private static final long serialVersionUID = 18830826L;
+
IllegalFormatException()
{
}
Index: java/util/IllegalFormatFlagsException.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/java/util/Attic/IllegalFormatFlagsException.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 IllegalFormatFlagsException.java
--- java/util/IllegalFormatFlagsException.java 20 Apr 2005 20:20:31 -0000
1.1.2.1
+++ java/util/IllegalFormatFlagsException.java 14 Aug 2005 00:48:15 -0000
@@ -41,6 +41,9 @@
/** @since 1.5 */
public class IllegalFormatFlagsException extends IllegalFormatException
{
+ private static final long serialVersionUID = 790824L;
+
+ // Note: name fixed by serialization.
private String flags;
public IllegalFormatFlagsException(String flags)
Index: java/util/IllegalFormatPrecisionException.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/java/util/Attic/IllegalFormatPrecisionException.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 IllegalFormatPrecisionException.java
--- java/util/IllegalFormatPrecisionException.java 20 Apr 2005 20:20:31 -0000
1.1.2.1
+++ java/util/IllegalFormatPrecisionException.java 14 Aug 2005 00:48:15 -0000
@@ -41,16 +41,19 @@
/** @since 1.5 */
public class IllegalFormatPrecisionException extends IllegalFormatException
{
- private int precision;
+ private static final long serialVersionUID = 18711008L;
- public IllegalFormatPrecisionException(int precision)
+ // Note: name fixed by serialization.
+ private int p;
+
+ public IllegalFormatPrecisionException(int p)
{
super();
- this.precision = precision;
+ this.p = p;
}
public int getPrecision()
{
- return precision;
+ return p;
}
}
Index: java/util/IllegalFormatWidthException.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/java/util/Attic/IllegalFormatWidthException.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 IllegalFormatWidthException.java
--- java/util/IllegalFormatWidthException.java 20 Apr 2005 20:20:31 -0000
1.1.2.1
+++ java/util/IllegalFormatWidthException.java 14 Aug 2005 00:48:15 -0000
@@ -41,16 +41,19 @@
/** @since 1.5 */
public class IllegalFormatWidthException extends IllegalFormatException
{
- private int width;
+ private static final long serialVersionUID = 16660902L;
- public IllegalFormatWidthException(int width)
+ // Note: name fixed by serialization.
+ private int w;
+
+ public IllegalFormatWidthException(int w)
{
super();
- this.width = width;
+ this.w = w;
}
public int getWidth()
{
- return width;
+ return w;
}
}
Index: java/util/InvalidPropertiesFormatException.java
===================================================================
RCS file: java/util/InvalidPropertiesFormatException.java
diff -N java/util/InvalidPropertiesFormatException.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ java/util/InvalidPropertiesFormatException.java 14 Aug 2005 00:48:15 -0000
@@ -0,0 +1,57 @@
+/* InvalidPropertiesFormatException.java
+ Copyright (C) 2005 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., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 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.util;
+
+import java.io.IOException;
+
+// FIXME: serialization methods should throw NotSerializableException
+/** @since 1.5 */
+public class InvalidPropertiesFormatException extends IOException
+{
+ public InvalidPropertiesFormatException(String message)
+ {
+ super(message);
+ }
+
+ public InvalidPropertiesFormatException(Throwable cause)
+ {
+ super();
+ initCause(cause);
+ }
+}
Index: java/util/MissingFormatArgumentException.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/java/util/Attic/MissingFormatArgumentException.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 MissingFormatArgumentException.java
--- java/util/MissingFormatArgumentException.java 20 Apr 2005 20:20:31 -0000
1.1.2.1
+++ java/util/MissingFormatArgumentException.java 14 Aug 2005 00:48:15 -0000
@@ -41,15 +41,18 @@
/** @since 1.5 */
public class MissingFormatArgumentException extends IllegalFormatException
{
- private String spec;
+ private static final long serialVersionUID = 19190115L;
+
+ // Note: name fixed by serialization.
+ private String s;
public MissingFormatArgumentException(String s)
{
- this.spec = s;
+ this.s = s;
}
public String getFormatSpecifier()
{
- return spec;
+ return s;
}
}
Index: java/util/MissingFormatWidthException.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/java/util/Attic/MissingFormatWidthException.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 MissingFormatWidthException.java
--- java/util/MissingFormatWidthException.java 20 Apr 2005 20:20:31 -0000
1.1.2.1
+++ java/util/MissingFormatWidthException.java 14 Aug 2005 00:48:15 -0000
@@ -41,15 +41,18 @@
/** @since 1.5 */
public class MissingFormatWidthException extends IllegalFormatException
{
- private String width;
+ private static final long serialVersionUID = 15560123L;
+
+ // Note: name fixed by serialization.
+ private String s;
public MissingFormatWidthException(String s)
{
- this.width = s;
+ this.s = s;
}
public String getFormatSpecifier()
{
- return width;
+ return s;
}
}
Index: java/util/UnknownFormatConversionException.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/java/util/Attic/UnknownFormatConversionException.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 UnknownFormatConversionException.java
--- java/util/UnknownFormatConversionException.java 20 Apr 2005 20:20:31 -0000
1.1.2.1
+++ java/util/UnknownFormatConversionException.java 14 Aug 2005 00:48:15 -0000
@@ -41,15 +41,18 @@
/** @since 1.5 */
public class UnknownFormatConversionException extends IllegalFormatException
{
- private String conv;
+ private static final long serialVersionUID = 19060418L;
+
+ // Note: name fixed by serialization.
+ private String s;
public UnknownFormatConversionException(String s)
{
- this.conv = s;
+ this.s = s;
}
public String getConversion()
{
- return conv;
+ return s;
}
}
Index: java/util/UnknownFormatFlagsException.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/java/util/Attic/UnknownFormatFlagsException.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 UnknownFormatFlagsException.java
--- java/util/UnknownFormatFlagsException.java 20 Apr 2005 20:20:31 -0000
1.1.2.1
+++ java/util/UnknownFormatFlagsException.java 14 Aug 2005 00:48:15 -0000
@@ -41,6 +41,9 @@
/** @since 1.5 */
public class UnknownFormatFlagsException extends IllegalFormatException
{
+ private static final long serialVersionUID = 19370506L;
+
+ // Note: name fixed by serialization.
private String flags;
public UnknownFormatFlagsException(String s)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] [generics] Patch: FYI: java.util exception fixes,
Tom Tromey <=