aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/nio
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/nio')
-rw-r--r--libjava/java/nio/charset/IllegalCharsetNameException.java13
-rw-r--r--libjava/java/nio/charset/UnsupportedCharsetException.java13
2 files changed, 22 insertions, 4 deletions
diff --git a/libjava/java/nio/charset/IllegalCharsetNameException.java b/libjava/java/nio/charset/IllegalCharsetNameException.java
index 762eb68..f46e63a 100644
--- a/libjava/java/nio/charset/IllegalCharsetNameException.java
+++ b/libjava/java/nio/charset/IllegalCharsetNameException.java
@@ -38,16 +38,25 @@ exception statement from your version. */
package java.nio.charset;
/**
+ * @author Michael Koch
* @since 1.4
*/
public class IllegalCharsetNameException extends IllegalArgumentException
{
/**
+ * Compatible with JDK 1.4+
+ */
+ private static final long serialVersionUID = 1457525358470002989L;
+
+ String charsetName;
+
+ /**
* Creates the exception
*/
public IllegalCharsetNameException (String charsetName)
{
- super (charsetName);
+ super ();
+ this.charsetName = charsetName;
}
/**
@@ -55,6 +64,6 @@ public class IllegalCharsetNameException extends IllegalArgumentException
*/
public String getCharsetName ()
{
- return getMessage ();
+ return charsetName;
}
}
diff --git a/libjava/java/nio/charset/UnsupportedCharsetException.java b/libjava/java/nio/charset/UnsupportedCharsetException.java
index 13aaa52..beb0be9 100644
--- a/libjava/java/nio/charset/UnsupportedCharsetException.java
+++ b/libjava/java/nio/charset/UnsupportedCharsetException.java
@@ -38,16 +38,25 @@ exception statement from your version. */
package java.nio.charset;
/**
+ * @author Michael Koch
* @since 1.4
*/
public class UnsupportedCharsetException extends IllegalArgumentException
{
/**
+ * Compatible with JDK 1.4+
+ */
+ private static final long serialVersionUID = 1490765524727386367L;
+
+ String charsetName;
+
+ /**
* Creates the exception
*/
public UnsupportedCharsetException (String charsetName)
{
- super (charsetName);
+ super ();
+ this.charsetName = charsetName;
}
/**
@@ -55,6 +64,6 @@ public class UnsupportedCharsetException extends IllegalArgumentException
*/
public String getCharsetName ()
{
- return getMessage ();
+ return charsetName;
}
}