xml-commons-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mrgla...@apache.org
Subject svn commit: r670245 - in /xml/commons/trunk/java/external/src/javax/xml/stream: FactoryConfigurationError.java XMLStreamException.java
Date Sat, 21 Jun 2008 18:03:16 GMT
Author: mrglavas
Date: Sat Jun 21 11:03:15 2008
New Revision: 670245

URL: http://svn.apache.org/viewvc?rev=670245&view=rev
Log:
Improvements to exception classes:
- make FactoryConfigurationError.nested private
- adding serialVersionUIDs
- drop Serializable from implements clause; Throwables are already serializable
- remove hard-coded text from XMLStreamException constructors; shouldn't be changing the application's
message text.

Modified:
    xml/commons/trunk/java/external/src/javax/xml/stream/FactoryConfigurationError.java
    xml/commons/trunk/java/external/src/javax/xml/stream/XMLStreamException.java

Modified: xml/commons/trunk/java/external/src/javax/xml/stream/FactoryConfigurationError.java
URL: http://svn.apache.org/viewvc/xml/commons/trunk/java/external/src/javax/xml/stream/FactoryConfigurationError.java?rev=670245&r1=670244&r2=670245&view=diff
==============================================================================
--- xml/commons/trunk/java/external/src/javax/xml/stream/FactoryConfigurationError.java (original)
+++ xml/commons/trunk/java/external/src/javax/xml/stream/FactoryConfigurationError.java Sat
Jun 21 11:03:15 2008
@@ -19,12 +19,14 @@
 
 package javax.xml.stream;
 
-import java.io.Serializable;
-
-public class FactoryConfigurationError extends Error implements Serializable {
-    Exception nested;
+public class FactoryConfigurationError extends Error {
+    
+    private static final long serialVersionUID = -2994412584589975744L;
+    
+    private Exception nested;
 
     public FactoryConfigurationError() {
+        super();
     }
 
     public FactoryConfigurationError(Exception e) {
@@ -36,7 +38,7 @@
         nested = e;
     }
 
-    public FactoryConfigurationError(java.lang.String msg) {
+    public FactoryConfigurationError(String msg) {
         super(msg);
     }
 
@@ -51,9 +53,9 @@
 
     public String getMessage() {
         String msg = super.getMessage();
-        if (msg != null)
+        if (msg != null) {
             return msg;
-
+        }
         if (nested != null) {
             msg = nested.getMessage();
             if (msg == null)

Modified: xml/commons/trunk/java/external/src/javax/xml/stream/XMLStreamException.java
URL: http://svn.apache.org/viewvc/xml/commons/trunk/java/external/src/javax/xml/stream/XMLStreamException.java?rev=670245&r1=670244&r2=670245&view=diff
==============================================================================
--- xml/commons/trunk/java/external/src/javax/xml/stream/XMLStreamException.java (original)
+++ xml/commons/trunk/java/external/src/javax/xml/stream/XMLStreamException.java Sat Jun 21
11:03:15 2008
@@ -20,11 +20,14 @@
 package javax.xml.stream;
 
 public class XMLStreamException extends Exception {
+    
+    private static final long serialVersionUID = 2018819321811497362L;
+   
     protected Throwable nested;
-
     protected Location location;
 
     public XMLStreamException() {
+        super();
     }
 
     public XMLStreamException(String msg) {
@@ -42,15 +45,13 @@
 
     public XMLStreamException(String msg, Location location,
             Throwable th) {
-        super("ParseError at [row,col]:[" + location.getLineNumber() + ","
-                + location.getColumnNumber() + "]\n" + "Message: " + msg);
+        super(msg);
         this.location = location;
         this.nested = th;
     }
 
     public XMLStreamException(String msg, Location location) {
-        super("ParseError at [row,col]:[" + location.getLineNumber() + ","
-                + location.getColumnNumber() + "]\n" + "Message: " + msg);
+        super(msg);
         this.location = location;
     }
 



Mime
View raw message