You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2018/04/03 12:05:32 UTC

groovy git commit: fix some serializable incompatible issues (some more)

Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_5_X 082c31222 -> 2fe876fa9


fix some serializable incompatible issues (some more)


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/2fe876fa
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/2fe876fa
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/2fe876fa

Branch: refs/heads/GROOVY_2_5_X
Commit: 2fe876fa995e714fab87e14734f14d58918188de
Parents: 082c312
Author: Paul King <pa...@asert.com.au>
Authored: Tue Apr 3 22:05:24 2018 +1000
Committer: Paul King <pa...@asert.com.au>
Committed: Tue Apr 3 22:05:24 2018 +1000

----------------------------------------------------------------------
 gradle/pomconfigurer.gradle                     |  3 +
 .../org/codehaus/groovy/GroovyBugError.java     | 55 +++++++------
 .../groovy/antlr/ASTParserException.java        |  3 +-
 .../groovy/antlr/ASTRuntimeException.java       |  4 +-
 .../codehaus/groovy/antlr/GroovySourceAST.java  |  5 +-
 .../org/codehaus/groovy/antlr/LexerFrame.java   |  2 +-
 .../groovy/control/ConfigurationException.java  | 85 +++++++-------------
 .../codehaus/groovy/control/ErrorCollector.java |  9 +--
 .../MultipleCompilationErrorsException.java     |  4 +-
 .../codehaus/groovy/runtime/GStringImpl.java    |  2 +-
 .../codehaus/groovy/runtime/WritableFile.java   |  5 +-
 .../codehaus/groovy/syntax/ReadException.java   |  3 +-
 .../codehaus/groovy/syntax/SyntaxException.java |  2 +-
 13 files changed, 74 insertions(+), 108 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/2fe876fa/gradle/pomconfigurer.gradle
----------------------------------------------------------------------
diff --git a/gradle/pomconfigurer.gradle b/gradle/pomconfigurer.gradle
index 1ecaf40..de35cdf 100644
--- a/gradle/pomconfigurer.gradle
+++ b/gradle/pomconfigurer.gradle
@@ -559,6 +559,9 @@ project.ext.pomConfigureClosureWithoutTweaks = {
                 name 'Tim Tiemens'
             }
             contributor {
+                name 'Mike Spille'
+            }
+            contributor {
                 name 'Paolo Di Tommaso'
             }
             contributor {

http://git-wip-us.apache.org/repos/asf/groovy/blob/2fe876fa/src/main/java/org/codehaus/groovy/GroovyBugError.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/GroovyBugError.java b/src/main/java/org/codehaus/groovy/GroovyBugError.java
index 89d855d..d234bb5 100644
--- a/src/main/java/org/codehaus/groovy/GroovyBugError.java
+++ b/src/main/java/org/codehaus/groovy/GroovyBugError.java
@@ -19,15 +19,13 @@
 package org.codehaus.groovy;
 
 /**
- * This class represents an error that is thrown when a bug is 
+ * This class represents an error that is thrown when a bug is
  * recognized inside the runtime. Basically it is thrown when
  * a constraint is not fulfilled that should be fulfilled.
- * 
- * @author Jochen Theodorou
  */
 public class GroovyBugError extends AssertionError {
 
-    private static final long serialVersionUID = 7170193853899664927L;
+    private static final long serialVersionUID = -9165076784700059275L;
     // message string
     private String message;
     // optional exception
@@ -35,74 +33,75 @@ public class GroovyBugError extends AssertionError {
 
     /**
      * constructs a bug error using the given text
+     *
      * @param message the error message text
      */
-    public GroovyBugError( String message ) {
+    public GroovyBugError(String message) {
         this(message, null);
     }
-    
+
     /**
      * Constructs a bug error using the given exception
+     *
      * @param exception cause of this error
      */
-    public GroovyBugError( Exception exception ) {
+    public GroovyBugError(Exception exception) {
         this(null, exception);
     }
-    
+
     /**
      * Constructs a bug error using the given exception and
-     * a text with additional information about the cause 
-     * @param msg additional information about this error
+     * a text with additional information about the cause
+     *
+     * @param msg       additional information about this error
      * @param exception cause of this error
      */
-    public GroovyBugError( String msg, Exception exception ) {
+    public GroovyBugError(String msg, Exception exception) {
         this.exception = exception;
         this.message = msg;
     }
 
     /**
-     * Returns a String representation of this class by calling <code>getMessage()</code>.  
+     * Returns a String representation of this class by calling <code>getMessage()</code>.
+     *
      * @see #getMessage()
      */
     public String toString() {
         return getMessage();
     }
-    
+
     /**
-     * Returns the detail message string of this error. The message 
+     * Returns the detail message string of this error. The message
      * will consist of the bug text prefixed by "BUG! " if there this
      * instance was created using a message. If this error was
-     * constructed without using a bug text the message of the cause 
+     * constructed without using a bug text the message of the cause
      * is used prefixed by "BUG! UNCAUGHT EXCEPTION: "
-     *  
+     *
      * @return the detail message string of this error.
      */
     public String getMessage() {
-        if( message != null )
-        {
-            return "BUG! "+message;
-        }
-        else
-        {
+        if (message != null) {
+            return "BUG! " + message;
+        } else {
             return "BUG! UNCAUGHT EXCEPTION: " + exception.getMessage();
         }
     }
-    
+
     public Throwable getCause() {
         return this.exception;
-    }    
-    
+    }
+
     /**
      * Returns the bug text to describe this error
      */
-    public String getBugText(){
-        if( message != null ){
+    public String getBugText() {
+        if (message != null) {
             return message;
         } else {
             return exception.getMessage();
         }
     }
-    
+
     /**
      * Sets the bug text to describe this error
      */

http://git-wip-us.apache.org/repos/asf/groovy/blob/2fe876fa/src/main/java/org/codehaus/groovy/antlr/ASTParserException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/antlr/ASTParserException.java b/src/main/java/org/codehaus/groovy/antlr/ASTParserException.java
index 372b04d..a74ed93 100644
--- a/src/main/java/org/codehaus/groovy/antlr/ASTParserException.java
+++ b/src/main/java/org/codehaus/groovy/antlr/ASTParserException.java
@@ -23,10 +23,9 @@ import org.codehaus.groovy.syntax.ParserException;
 
 /**
  * Thrown when trying to parse the AST
- *
  */
 public class ASTParserException extends ParserException {
-    private static final long serialVersionUID = 2537232761345194260L;
+    private static final long serialVersionUID = 7307319325760515017L;
     private final AST ast;
 
     public ASTParserException(ASTRuntimeException e) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/2fe876fa/src/main/java/org/codehaus/groovy/antlr/ASTRuntimeException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/antlr/ASTRuntimeException.java b/src/main/java/org/codehaus/groovy/antlr/ASTRuntimeException.java
index 032c24d..11f082b 100644
--- a/src/main/java/org/codehaus/groovy/antlr/ASTRuntimeException.java
+++ b/src/main/java/org/codehaus/groovy/antlr/ASTRuntimeException.java
@@ -21,10 +21,10 @@ package org.codehaus.groovy.antlr;
 import antlr.collections.AST;
 
 /**
- * @author <a href="mailto:jstrachan@protique.com">James Strachan</a>
+ * Used within the Groovy's AntlrParserPlugin
  */
 public class ASTRuntimeException extends RuntimeException {
-    private static final long serialVersionUID = 3980229202392379560L;
+    private static final long serialVersionUID = 238104771184624613L;
     private final AST ast;
 
     public ASTRuntimeException(AST ast, String message) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/2fe876fa/src/main/java/org/codehaus/groovy/antlr/GroovySourceAST.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/antlr/GroovySourceAST.java b/src/main/java/org/codehaus/groovy/antlr/GroovySourceAST.java
index fc62836..80da241 100644
--- a/src/main/java/org/codehaus/groovy/antlr/GroovySourceAST.java
+++ b/src/main/java/org/codehaus/groovy/antlr/GroovySourceAST.java
@@ -28,12 +28,9 @@ import java.util.List;
 /**
  * We have an AST subclass so we can track source information.
  * Very odd that ANTLR doesn't do this by default.
- *
- * @author Mike Spille
- * @author Jeremy Rayner <gr...@ross-rayner.com>
  */
 public class GroovySourceAST extends CommonAST implements Comparable, SourceInfo {
-    private static final long serialVersionUID = 2019901428136117486L;
+    private static final long serialVersionUID = 9116765466538981906L;
     private int line;
     private int col;
     private int lineLast;

http://git-wip-us.apache.org/repos/asf/groovy/blob/2fe876fa/src/main/java/org/codehaus/groovy/antlr/LexerFrame.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/antlr/LexerFrame.java b/src/main/java/org/codehaus/groovy/antlr/LexerFrame.java
index 94dd173..8bce286 100644
--- a/src/main/java/org/codehaus/groovy/antlr/LexerFrame.java
+++ b/src/main/java/org/codehaus/groovy/antlr/LexerFrame.java
@@ -47,7 +47,7 @@ import java.util.Hashtable;
  * Swing application to graphically display the tokens produced by the lexer.
  */
 public class LexerFrame extends JFrame implements ActionListener {
-    private static final long serialVersionUID = 4753761422597441243L;
+    private static final long serialVersionUID = 2715693043143492893L;
     private final JSplitPane jSplitPane1 = new JSplitPane();
     private final JScrollPane jScrollPane1 = new JScrollPane();
     private final JScrollPane jScrollPane2 = new JScrollPane();

http://git-wip-us.apache.org/repos/asf/groovy/blob/2fe876fa/src/main/java/org/codehaus/groovy/control/ConfigurationException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/control/ConfigurationException.java b/src/main/java/org/codehaus/groovy/control/ConfigurationException.java
index 9e226ad..5778209 100644
--- a/src/main/java/org/codehaus/groovy/control/ConfigurationException.java
+++ b/src/main/java/org/codehaus/groovy/control/ConfigurationException.java
@@ -20,74 +20,47 @@ package org.codehaus.groovy.control;
 
 import org.codehaus.groovy.GroovyExceptionInterface;
 
-
-
-
 /**
- *  Thrown when configuration data is invalid.
- *
- *  @author <a href="mailto:cpoirier@dreaming.org">Chris Poirier</a>
+ * Thrown when configuration data is invalid.
  */
-
-public class ConfigurationException extends RuntimeException implements GroovyExceptionInterface
-{
-    private static final long serialVersionUID = -630757959041134069L;
-
-    //---------------------------------------------------------------------------
-  // CONSTRUCTION AND SUCH
+public class ConfigurationException extends RuntimeException implements GroovyExceptionInterface {
+    private static final long serialVersionUID = -3844401402301111613L;
 
     protected Exception cause;   // The phase in which the failures occurred
 
-    
-   /**
-    *  Initializes the exception from a cause exception.
-    */
-    
-    public ConfigurationException( Exception cause ) 
-    {
-        super( cause.getMessage() );
+    /**
+     * Initializes the exception from a cause exception.
+     */
+    public ConfigurationException(Exception cause) {
+        super(cause.getMessage());
         this.cause = cause;
     }
-    
-    
-   /**
-    *  Initializes the exception with just a message.
-    */
-    
-    public ConfigurationException( String message )
-    {
-        super( message );
+
+    /**
+     * Initializes the exception with just a message.
+     */
+    public ConfigurationException(String message) {
+        super(message);
     }
 
-    
-    
-   /**
-    *  Returns the causing exception, if available.
-    */
-    
-    public Throwable getCause()
-    {
+    /**
+     * Returns the causing exception, if available.
+     */
+    public Throwable getCause() {
         return cause;
     }
-    
-    
-   /**
-    *  Its always fatal.
-    */
-    
-    public boolean isFatal()
-    {
+
+    /**
+     * Its always fatal.
+     */
+    public boolean isFatal() {
         return true;
     }
-    
-    
-    
-   /**
-    *  Set fatal is just ignored.
-    */
-    
-    public void setFatal( boolean fatal )
-    {
+
+    /**
+     * Set fatal is just ignored.
+     */
+    public void setFatal(boolean fatal) {
     }
-    
+
 }

http://git-wip-us.apache.org/repos/asf/groovy/blob/2fe876fa/src/main/java/org/codehaus/groovy/control/ErrorCollector.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/control/ErrorCollector.java b/src/main/java/org/codehaus/groovy/control/ErrorCollector.java
index d6c97a8..67de50a 100644
--- a/src/main/java/org/codehaus/groovy/control/ErrorCollector.java
+++ b/src/main/java/org/codehaus/groovy/control/ErrorCollector.java
@@ -27,6 +27,7 @@ import org.codehaus.groovy.syntax.CSTNode;
 import org.codehaus.groovy.syntax.SyntaxException;
 
 import java.io.PrintWriter;
+import java.io.Serializable;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
@@ -35,12 +36,10 @@ import java.util.List;
  * A base class for collecting messages and errors during processing.
  * Each CompilationUnit should have an ErrorCollector, and the SourceUnits
  * should share their ErrorCollector with the CompilationUnit.
- *
- * @author <a href="mailto:cpoirier@dreaming.org">Chris Poirier</a>
- * @author <a href="mailto:blackdrag@gmx.org">Jochen Theodorou</a>
  */
-public class ErrorCollector {
-    
+public class ErrorCollector implements Serializable {
+
+    private static final long serialVersionUID = 2844774170905056755L;
     /**
      * WarningMessages collected during processing
      */

http://git-wip-us.apache.org/repos/asf/groovy/blob/2fe876fa/src/main/java/org/codehaus/groovy/control/MultipleCompilationErrorsException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/control/MultipleCompilationErrorsException.java b/src/main/java/org/codehaus/groovy/control/MultipleCompilationErrorsException.java
index 5e0a6e7..8d7d14c 100644
--- a/src/main/java/org/codehaus/groovy/control/MultipleCompilationErrorsException.java
+++ b/src/main/java/org/codehaus/groovy/control/MultipleCompilationErrorsException.java
@@ -24,12 +24,12 @@ import java.io.PrintWriter;
 import java.io.Writer;
 
 /**
- * @author Jochen Theodorou
+ * Represents multiple other exceptions
  */
 public class MultipleCompilationErrorsException extends
         CompilationFailedException {
 
-    private static final long serialVersionUID = 2948487149304811836L;
+    private static final long serialVersionUID = 8583586586290252555L;
     protected ErrorCollector collector;
     
     public MultipleCompilationErrorsException(ErrorCollector ec) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/2fe876fa/src/main/java/org/codehaus/groovy/runtime/GStringImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/runtime/GStringImpl.java b/src/main/java/org/codehaus/groovy/runtime/GStringImpl.java
index f886ccd..7e5beec 100644
--- a/src/main/java/org/codehaus/groovy/runtime/GStringImpl.java
+++ b/src/main/java/org/codehaus/groovy/runtime/GStringImpl.java
@@ -29,7 +29,7 @@ import groovy.lang.GString;
  * @see groovy.lang.GString
  */
 public class GStringImpl extends GString {
-    private static final long serialVersionUID = -6400178815578597715L;
+    private static final long serialVersionUID = 3581289038662723858L;
     private String[] strings;
 
     /**

http://git-wip-us.apache.org/repos/asf/groovy/blob/2fe876fa/src/main/java/org/codehaus/groovy/runtime/WritableFile.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/runtime/WritableFile.java b/src/main/java/org/codehaus/groovy/runtime/WritableFile.java
index 21a9e40..b4aef73 100644
--- a/src/main/java/org/codehaus/groovy/runtime/WritableFile.java
+++ b/src/main/java/org/codehaus/groovy/runtime/WritableFile.java
@@ -27,12 +27,9 @@ import java.io.Writer;
 
 /**
  * A Writable File.
- *
- * @author John Wilson
- *
  */
 public class WritableFile extends File implements Writable {
-    private static final long serialVersionUID = 1661640530283827325L;
+    private static final long serialVersionUID = 4157767752861425917L;
     private final String encoding;
 
     public WritableFile(final File delegate) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/2fe876fa/src/main/java/org/codehaus/groovy/syntax/ReadException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/syntax/ReadException.java b/src/main/java/org/codehaus/groovy/syntax/ReadException.java
index af70dd0..930b767 100644
--- a/src/main/java/org/codehaus/groovy/syntax/ReadException.java
+++ b/src/main/java/org/codehaus/groovy/syntax/ReadException.java
@@ -25,9 +25,8 @@ import java.io.IOException;
 /**
  * Encapsulates non-specific i/o exceptions.
  */
-
 public class ReadException extends GroovyException {
-    private static final long serialVersionUID = -6171846198126205359L;
+    private static final long serialVersionUID = 848585058428047961L;
     private final IOException cause;
 
     public ReadException(IOException cause) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/2fe876fa/src/main/java/org/codehaus/groovy/syntax/SyntaxException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/syntax/SyntaxException.java b/src/main/java/org/codehaus/groovy/syntax/SyntaxException.java
index 53bb453..660c87f 100644
--- a/src/main/java/org/codehaus/groovy/syntax/SyntaxException.java
+++ b/src/main/java/org/codehaus/groovy/syntax/SyntaxException.java
@@ -26,7 +26,7 @@ import org.codehaus.groovy.ast.ASTNode;
  */
 public class SyntaxException extends GroovyException {
 
-    private static final long serialVersionUID = 5547021570604495375L;
+    private static final long serialVersionUID = 7447641806794047013L;
     /** Line upon which the error occurred. */
     private final int startLine;
     private final int endLine;