groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pascalschumac...@apache.org
Subject groovy git commit: remove unused or obsolete code (closes #291)
Date Sat, 12 Mar 2016 21:18:50 GMT
Repository: groovy
Updated Branches:
  refs/heads/master 78b6cc54a -> 2d9c02254


remove unused or obsolete code (closes #291)


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

Branch: refs/heads/master
Commit: 2d9c0225462edea0a73279b6216ece4f6024d517
Parents: 78b6cc5
Author: oreissig <oreissig+github@gmail.com>
Authored: Sat Mar 12 20:22:05 2016 +0100
Committer: pascalschumacher <pascalschumacher@gmx.net>
Committed: Sat Mar 12 21:29:42 2016 +0100

----------------------------------------------------------------------
 .../java/org/codehaus/groovy/ant/Groovy.java    | 10 --------
 .../codehaus/groovy/ant/UberCompileTask.java    |  2 --
 .../org/codehaus/groovy/ant/VerifyClass.java    |  2 --
 .../groovy/groovydoc/GroovyClassDoc.java        |  3 ---
 .../codehaus/groovy/groovydoc/GroovyDoc.java    |  6 -----
 .../groovydoc/GroovyDocErrorReporter.java       |  3 ---
 .../groovydoc/GroovyExecutableMemberDoc.java    |  4 ----
 .../groovy/groovydoc/GroovyFieldDoc.java        |  1 -
 .../groovy/groovydoc/GroovyPackageDoc.java      |  4 ----
 .../codehaus/groovy/groovydoc/GroovyType.java   | 11 ---------
 .../groovydoc/ClasspathResourceManager.java     |  2 +-
 .../groovydoc/GroovyDocTemplateEngine.java      | 25 --------------------
 .../groovy/tools/groovydoc/GroovyDocTool.java   |  4 +---
 .../tools/groovydoc/GroovyRootDocBuilder.java   |  2 +-
 .../SimpleGroovyAbstractableElementDoc.java     |  4 +---
 .../src/main/java/groovy/json/JsonLexer.java    |  3 ---
 .../groovy/json/internal/BaseJsonParser.java    |  2 --
 .../java/groovy/json/internal/Exceptions.java   |  1 -
 .../java/groovy/json/internal/NumberValue.java  | 16 -------------
 .../java/groovy/json/internal/ValueList.java    |  2 +-
 .../groovy/jsr223/GroovyScriptEngineImpl.java   | 13 +---------
 .../groovy/macro/matcher/ASTFinder.java         |  4 ----
 .../macro/transform/MacroInvocationTrap.java    |  2 --
 .../java/groovy/servlet/TemplateServlet.java    |  4 ----
 .../mock/interceptor/MockProxyMetaClass.java    | 10 ++++----
 25 files changed, 10 insertions(+), 130 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovy.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovy.java b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovy.java
index f2cc4d4..d1abc05 100644
--- a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovy.java
+++ b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovy.java
@@ -25,7 +25,6 @@ import groovy.lang.MissingMethodException;
 import groovy.lang.Script;
 import groovy.util.AntBuilder;
 import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.DirectoryScanner;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.taskdefs.Java;
 import org.apache.tools.ant.types.Commandline;
@@ -299,15 +298,6 @@ public class Groovy extends Java {
             throw new BuildException("Source file does not exist!", getLocation());
         }
 
-        // TODO: any of this used?
-        // deal with the filesets
-        for (int i = 0; i < filesets.size(); i++) {
-            FileSet fs = filesets.elementAt(i);
-            DirectoryScanner ds = fs.getDirectoryScanner(getProject());
-            File srcDir = fs.getDir(getProject());
-            String[] srcFiles = ds.getIncludedFiles();
-        }
-
         try {
             PrintStream out = System.out;
             try {

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/UberCompileTask.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/UberCompileTask.java
b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/UberCompileTask.java
index 25d9873..8ea1c4c 100644
--- a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/UberCompileTask.java
+++ b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/UberCompileTask.java
@@ -43,8 +43,6 @@ import java.io.IOException;
 public class UberCompileTask
     extends Task
 {
-    private final LoggingHelper log = new LoggingHelper(this);
-
     private Path src;
 
     private File destdir;

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/VerifyClass.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/VerifyClass.java
b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/VerifyClass.java
index 2e53c9d..f660d40 100644
--- a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/VerifyClass.java
+++ b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/VerifyClass.java
@@ -27,7 +27,6 @@ import org.objectweb.asm.tree.AbstractInsnNode;
 import org.objectweb.asm.tree.ClassNode;
 import org.objectweb.asm.tree.MethodNode;
 import org.objectweb.asm.tree.analysis.Analyzer;
-import org.objectweb.asm.tree.analysis.Frame;
 import org.objectweb.asm.tree.analysis.SimpleVerifier;
 import org.objectweb.asm.util.CheckClassAdapter;
 import org.objectweb.asm.util.TraceMethodVisitor;
@@ -115,7 +114,6 @@ public class VerifyClass extends MatchingTask {
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
-                final Frame[] frames = a.getFrames();
 
                 if (!failed) {
                     failed = true;

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyClassDoc.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyClassDoc.java
b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyClassDoc.java
index 7d5ca1d..9c34a73 100644
--- a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyClassDoc.java
+++ b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyClassDoc.java
@@ -66,9 +66,6 @@ public interface GroovyClassDoc extends GroovyType, GroovyProgramElementDoc
{
     GroovyClassDoc superclass();
 
     GroovyType superclassType();
-//    GroovyTypeVariable[] typeParameters(); // not supported in groovy
-//    GroovyParamTag[] typeParamTags(); // not supported in groovy
-
 
     String getFullPathName(); // not in Java Doclet API
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyDoc.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyDoc.java
b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyDoc.java
index 16923fa..7bffe8c 100644
--- a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyDoc.java
+++ b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyDoc.java
@@ -22,10 +22,8 @@ public interface GroovyDoc extends Comparable {
 
     String commentText();
 
-    //    GroovyTag[] firstSentenceTags();
     String getRawCommentText();
 
-    //    GroovyTag[] inlineTags();
     boolean isAnnotationType();
 
     boolean isAnnotationTypeElement();
@@ -55,12 +53,8 @@ public interface GroovyDoc extends Comparable {
     boolean isOrdinaryClass();
 
     String name();
-//    GroovySourcePosition position();
 
-    //    GroovySeeTag[] seeTags();
     void setRawCommentText(String arg0);
-//    GroovyTag[] tags();
-//    GroovyTag[] tags(String arg0);
 
     String firstSentenceCommentText();
 }

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyDocErrorReporter.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyDocErrorReporter.java
b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyDocErrorReporter.java
index 49a607a..3c925ad 100644
--- a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyDocErrorReporter.java
+++ b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyDocErrorReporter.java
@@ -20,9 +20,6 @@ package org.codehaus.groovy.groovydoc;
 
 public interface GroovyDocErrorReporter{
     void printError(String arg0);
-//    void printError(GroovySourcePosition arg0, String arg1);
     void printNotice(String arg0);
-//    void printNotice(GroovySourcePosition arg0, String arg1);
     void printWarning(String arg0);
-//    void printWarning(GroovySourcePosition arg0, String arg1);
 }

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyExecutableMemberDoc.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyExecutableMemberDoc.java
b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyExecutableMemberDoc.java
index ce7111b..5bbb0d4 100644
--- a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyExecutableMemberDoc.java
+++ b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyExecutableMemberDoc.java
@@ -24,11 +24,7 @@ public interface GroovyExecutableMemberDoc extends GroovyMemberDoc {
     boolean isSynchronized();
     boolean isVarArgs();
     GroovyParameter[] parameters();
-//    GroovyParamTag[] paramTags();
     String signature();
     GroovyClassDoc[] thrownExceptions();
     GroovyType[] thrownExceptionTypes();
-//    GroovyThrowsTag[] throwsTags();
-//    GroovyTypeVariable[] typeParameters();
-//    GroovyParamTag[] typeParamTags();
 }

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyFieldDoc.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyFieldDoc.java
b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyFieldDoc.java
index 63312d7..40eb2f5 100644
--- a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyFieldDoc.java
+++ b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyFieldDoc.java
@@ -24,6 +24,5 @@ public interface GroovyFieldDoc extends GroovyMemberDoc {
     String constantValueExpression();
     boolean isTransient();
     boolean isVolatile();
-//    GroovySerialFieldTag[] serialFieldTags();
     GroovyType type();
 }

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyPackageDoc.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyPackageDoc.java
b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyPackageDoc.java
index 50d2abc..af7b187 100644
--- a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyPackageDoc.java
+++ b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyPackageDoc.java
@@ -36,10 +36,6 @@ public interface GroovyPackageDoc extends GroovyDoc {
      */
     GroovyClassDoc[] allClasses(boolean filter);
 
-//    GroovyAnnotationTypeDoc[] annotationTypes();
-
-//    GroovyAnnotationDesc[] annotations();
-
     /**
      * Included enum types in this package.
      *

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyType.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyType.java
b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyType.java
index 51166dc..1786b8d 100644
--- a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyType.java
+++ b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyType.java
@@ -19,17 +19,6 @@
 package org.codehaus.groovy.groovydoc;
 
 public interface GroovyType {
-//    GroovyAnnotationTypeDoc asAnnotationTypeDoc();
-//
-//    GroovyClassDoc asClassDoc();
-//
-//    GroovyParameterizedType asParameterizedType();
-//
-//    GroovyTypeVariable asTypeVariable();
-//
-//    GroovyWildcardType asWildcardType();
-//
-//    String dimension();
 
     boolean isPrimitive();
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/ClasspathResourceManager.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/ClasspathResourceManager.java
b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/ClasspathResourceManager.java
index 80bd85d..e3d9213 100644
--- a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/ClasspathResourceManager.java
+++ b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/ClasspathResourceManager.java
@@ -33,7 +33,7 @@ public class ClasspathResourceManager implements ResourceManager {
         this.classLoader = classLoader;
     }
 
-    public InputStream getInputStream(String resourceName) throws IOException {
+    public InputStream getInputStream(String resourceName) {
         return classLoader.getResourceAsStream(resourceName);
     }
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyDocTemplateEngine.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyDocTemplateEngine.java
b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyDocTemplateEngine.java
index e2d2776..f962865 100644
--- a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyDocTemplateEngine.java
+++ b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyDocTemplateEngine.java
@@ -43,7 +43,6 @@ import java.util.Properties;
  */
 public class GroovyDocTemplateEngine {
     private TemplateEngine engine;
-    private GroovyDocTool tool; // TODO use it or lose it
     private ResourceManager resourceManager;
     private Properties properties;
     private Map<String, Template> docTemplates; // cache
@@ -62,7 +61,6 @@ public class GroovyDocTemplateEngine {
                                    String[] packageTemplates,
                                    String[] classTemplates,
                                    Properties properties) {
-        this.tool = tool;
         this.resourceManager = resourceManager;
         this.properties = properties;
         this.docTemplatePaths = Arrays.asList(docTemplates);
@@ -142,29 +140,6 @@ public class GroovyDocTemplateEngine {
         return docTemplatePaths.iterator();
     }
 
-/*
-    String applyClassTemplatesWithVelocity(GroovyClassDoc classDoc) {
-//        Iterator templates = classTemplates.iterator();
-//        while (templates.hasNext)
-        String templatePath = (String) classTemplates.get(0); // todo (iterate)
-            
-        String templateWithBindingApplied = "";
-        try {
-//            Template t = new GStringTemplateEngine().createTemplate(template);
-            VelocityTemplateEngine t = new VelocityTemplateEngine(new File(".").getAbsolutePath());
-
-            Map binding = new HashMap();
-            binding.put("classDoc", classDoc);
-            
-//            templateWithBindingApplied = t.make(binding).toString();
-            templateWithBindingApplied = t.apply(templatePath,binding);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return templateWithBindingApplied;
-    }
-*/
-
     public void copyBinaryResource(String template, String destFileName) {
         if (resourceManager instanceof ClasspathResourceManager) {
             OutputStream outputStream = null;

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyDocTool.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyDocTool.java
b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyDocTool.java
index fa53962..9d0e34e 100644
--- a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyDocTool.java
+++ b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyDocTool.java
@@ -18,8 +18,6 @@
  */
 package org.codehaus.groovy.tools.groovydoc;
 
-import antlr.RecognitionException;
-import antlr.TokenStreamException;
 import org.codehaus.groovy.groovydoc.GroovyRootDoc;
 import org.codehaus.groovy.tools.shell.util.Logger;
 
@@ -76,7 +74,7 @@ public class GroovyDocTool {
         }
     }
 
-    public void add(List<String> filenames) throws RecognitionException, TokenStreamException,
IOException {
+    public void add(List<String> filenames) throws IOException {
         if (templateEngine != null) {
             // only print out if we are being used for template generation
             log.debug("Loading source files for " + filenames);

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyRootDocBuilder.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyRootDocBuilder.java
b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyRootDocBuilder.java
index cbb79f6..08f3868 100644
--- a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyRootDocBuilder.java
+++ b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyRootDocBuilder.java
@@ -152,7 +152,7 @@ public class GroovyRootDocBuilder {
         return parser;
     }
 
-    public void buildTree(List<String> filenames) throws IOException, RecognitionException,
TokenStreamException {
+    public void buildTree(List<String> filenames) throws IOException {
         setOverview();
 
         List<File> sourcepathFiles = new ArrayList<File>();

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyAbstractableElementDoc.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyAbstractableElementDoc.java
b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyAbstractableElementDoc.java
index f8909f3..d5156df 100644
--- a/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyAbstractableElementDoc.java
+++ b/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyAbstractableElementDoc.java
@@ -18,9 +18,7 @@
  */
 package org.codehaus.groovy.tools.groovydoc;
 
-import org.codehaus.groovy.groovydoc.GroovyProgramElementDoc;
-
-public class SimpleGroovyAbstractableElementDoc extends SimpleGroovyProgramElementDoc implements
GroovyProgramElementDoc {
+public class SimpleGroovyAbstractableElementDoc extends SimpleGroovyProgramElementDoc {
     private boolean abstractElement;
 
     public SimpleGroovyAbstractableElementDoc(String name) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-json/src/main/java/groovy/json/JsonLexer.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-json/src/main/java/groovy/json/JsonLexer.java b/subprojects/groovy-json/src/main/java/groovy/json/JsonLexer.java
index 93b8c23..b5ab018 100644
--- a/subprojects/groovy-json/src/main/java/groovy/json/JsonLexer.java
+++ b/subprojects/groovy-json/src/main/java/groovy/json/JsonLexer.java
@@ -25,7 +25,6 @@ import groovy.io.LineColumnReader;
 import java.io.IOException;
 import java.io.Reader;
 import java.util.Iterator;
-import java.util.regex.Pattern;
 
 /**
  * The lexer reads JSON tokens in a streaming fashion from the underlying reader.
@@ -44,8 +43,6 @@ public class JsonLexer implements Iterator<JsonToken> {
     private static final char ZERO     = '0';
     private static final char NINE     = '9';
 
-    private static final Pattern p = Pattern.compile("\\\\u(\\p{XDigit}{4})");
-
     private LineColumnReader reader;
 
     /**

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-json/src/main/java/groovy/json/internal/BaseJsonParser.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-json/src/main/java/groovy/json/internal/BaseJsonParser.java
b/subprojects/groovy-json/src/main/java/groovy/json/internal/BaseJsonParser.java
index 13cb2a8..0f23e41 100644
--- a/subprojects/groovy-json/src/main/java/groovy/json/internal/BaseJsonParser.java
+++ b/subprojects/groovy-json/src/main/java/groovy/json/internal/BaseJsonParser.java
@@ -137,8 +137,6 @@ public abstract class BaseJsonParser implements JsonParser {
         }
     }
 
-    private final CharBuf builder = CharBuf.create(20);
-
     public Object parse(File file, String charset) {
         Reader reader = null;
         try {

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-json/src/main/java/groovy/json/internal/Exceptions.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-json/src/main/java/groovy/json/internal/Exceptions.java b/subprojects/groovy-json/src/main/java/groovy/json/internal/Exceptions.java
index aaf2dfe..6617031 100644
--- a/subprojects/groovy-json/src/main/java/groovy/json/internal/Exceptions.java
+++ b/subprojects/groovy-json/src/main/java/groovy/json/internal/Exceptions.java
@@ -22,7 +22,6 @@ import groovy.json.JsonException;
 
 import java.io.PrintStream;
 import java.io.PrintWriter;
-import java.util.Arrays;
 import java.util.Collections;
 
 /**

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-json/src/main/java/groovy/json/internal/NumberValue.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-json/src/main/java/groovy/json/internal/NumberValue.java b/subprojects/groovy-json/src/main/java/groovy/json/internal/NumberValue.java
index 88098cc..fe543ab 100644
--- a/subprojects/groovy-json/src/main/java/groovy/json/internal/NumberValue.java
+++ b/subprojects/groovy-json/src/main/java/groovy/json/internal/NumberValue.java
@@ -105,12 +105,9 @@ public class NumberValue extends java.lang.Number implements Value {
                 return bigDecimalValue();
             case INTEGER:
                 int sign = 1;
-                boolean negative = false;
                 if (buffer[startIndex] == '-') {
                     startIndex++;
                     sign = -1;
-                    negative = true;
-
                 }
 
                 if (isInteger(buffer, startIndex, endIndex - startIndex)) {
@@ -196,19 +193,6 @@ public class NumberValue extends java.lang.Number implements Value {
         return (short) intValue();
     }
 
-    private static float fpowersOf10[] = {
-            1.0f,
-            10.0f,
-            100.0f,
-            1000.0f,
-            10000.0f,
-            100000.0f,
-            1000000.0f,
-            10000000.0f,
-            100000000.0f,
-            1000000000.0f,
-    };
-
     public double doubleValue() {
         return CharScanner.parseDouble(this.buffer, startIndex, endIndex);
     }

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-json/src/main/java/groovy/json/internal/ValueList.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-json/src/main/java/groovy/json/internal/ValueList.java b/subprojects/groovy-json/src/main/java/groovy/json/internal/ValueList.java
index eb5c825..fcb011d 100644
--- a/subprojects/groovy-json/src/main/java/groovy/json/internal/ValueList.java
+++ b/subprojects/groovy-json/src/main/java/groovy/json/internal/ValueList.java
@@ -26,7 +26,7 @@ import java.util.List;
 /**
  * @author Rick Hightower
  */
-public class ValueList extends AbstractList<Object> implements List<Object> {
+public class ValueList extends AbstractList<Object> {
 
     List<Object> list = new ArrayList<Object>(5);
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-jsr223/src/main/java/org/codehaus/groovy/jsr223/GroovyScriptEngineImpl.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-jsr223/src/main/java/org/codehaus/groovy/jsr223/GroovyScriptEngineImpl.java
b/subprojects/groovy-jsr223/src/main/java/org/codehaus/groovy/jsr223/GroovyScriptEngineImpl.java
index e823f65..3398160 100644
--- a/subprojects/groovy-jsr223/src/main/java/org/codehaus/groovy/jsr223/GroovyScriptEngineImpl.java
+++ b/subprojects/groovy-jsr223/src/main/java/org/codehaus/groovy/jsr223/GroovyScriptEngineImpl.java
@@ -58,7 +58,6 @@ import groovy.lang.Tuple;
 
 import org.codehaus.groovy.control.CompilationFailedException;
 import org.codehaus.groovy.control.CompilerConfiguration;
-import org.codehaus.groovy.syntax.SyntaxException;
 import org.codehaus.groovy.util.ManagedConcurrentValueMap;
 import org.codehaus.groovy.util.ReferenceBundle;
 import org.codehaus.groovy.runtime.InvokerHelper;
@@ -151,9 +150,6 @@ public class GroovyScriptEngineImpl extends AbstractScriptEngine implements
Comp
             Class clazz = getScriptClass(script);
             if (clazz == null) throw new ScriptException("Script class is null");
             return eval(clazz, ctx);
-        } catch (SyntaxException e) {
-            throw new ScriptException(e.getMessage(),
-                    e.getSourceLocator(), e.getLine());
         } catch (Exception e) {
             if (debug) e.printStackTrace();
             throw new ScriptException(e);
@@ -180,11 +176,6 @@ public class GroovyScriptEngineImpl extends AbstractScriptEngine implements
Comp
         try {
             return new GroovyCompiledScript(this,
                     getScriptClass(scriptSource));
-        } catch (SyntaxException e) {
-            throw new ScriptException(e.getMessage(),
-                    e.getSourceLocator(), e.getLine());
-        } catch (IOException e) {
-            throw new ScriptException(e);
         } catch (CompilationFailedException ee) {
             throw new ScriptException(ee);
         }
@@ -363,9 +354,7 @@ public class GroovyScriptEngineImpl extends AbstractScriptEngine implements
Comp
     }
 
     Class getScriptClass(String script)
-            throws SyntaxException,
-            CompilationFailedException,
-            IOException {
+            throws CompilationFailedException {
         Class clazz = classMap.get(script);
         if (clazz != null) {
             return clazz;

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-macro/src/main/groovy/org/codehaus/groovy/macro/matcher/ASTFinder.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-macro/src/main/groovy/org/codehaus/groovy/macro/matcher/ASTFinder.java
b/subprojects/groovy-macro/src/main/groovy/org/codehaus/groovy/macro/matcher/ASTFinder.java
index 05f3bba..409a523 100644
--- a/subprojects/groovy-macro/src/main/groovy/org/codehaus/groovy/macro/matcher/ASTFinder.java
+++ b/subprojects/groovy-macro/src/main/groovy/org/codehaus/groovy/macro/matcher/ASTFinder.java
@@ -19,10 +19,7 @@
 package org.codehaus.groovy.macro.matcher;
 
 import org.codehaus.groovy.ast.ASTNode;
-import org.codehaus.groovy.ast.AnnotatedNode;
-import org.codehaus.groovy.ast.ClassCodeVisitorSupport;
 import org.codehaus.groovy.ast.ClassNode;
-import org.codehaus.groovy.ast.ConstructorNode;
 import org.codehaus.groovy.ast.FieldNode;
 import org.codehaus.groovy.ast.MethodNode;
 import org.codehaus.groovy.ast.ModuleNode;
@@ -41,7 +38,6 @@ import org.codehaus.groovy.ast.stmt.ExpressionStatement;
 import org.codehaus.groovy.ast.stmt.ForStatement;
 import org.codehaus.groovy.ast.stmt.IfStatement;
 import org.codehaus.groovy.ast.stmt.ReturnStatement;
-import org.codehaus.groovy.ast.stmt.Statement;
 import org.codehaus.groovy.ast.stmt.SwitchStatement;
 import org.codehaus.groovy.ast.stmt.SynchronizedStatement;
 import org.codehaus.groovy.ast.stmt.ThrowStatement;

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-macro/src/main/groovy/org/codehaus/groovy/macro/transform/MacroInvocationTrap.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-macro/src/main/groovy/org/codehaus/groovy/macro/transform/MacroInvocationTrap.java
b/subprojects/groovy-macro/src/main/groovy/org/codehaus/groovy/macro/transform/MacroInvocationTrap.java
index b75a768..a8cac37 100644
--- a/subprojects/groovy-macro/src/main/groovy/org/codehaus/groovy/macro/transform/MacroInvocationTrap.java
+++ b/subprojects/groovy-macro/src/main/groovy/org/codehaus/groovy/macro/transform/MacroInvocationTrap.java
@@ -18,12 +18,10 @@
  */
 package org.codehaus.groovy.macro.transform;
 
-import groovy.lang.Closure;
 import org.codehaus.groovy.ast.ASTNode;
 import org.codehaus.groovy.ast.ClassCodeVisitorSupport;
 import org.codehaus.groovy.ast.ClassHelper;
 import org.codehaus.groovy.ast.ClassNode;
-import org.codehaus.groovy.ast.CodeVisitorSupport;
 import org.codehaus.groovy.ast.InnerClassNode;
 import org.codehaus.groovy.ast.MethodInvocationTrap;
 import org.codehaus.groovy.ast.expr.ArgumentListExpression;

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-servlet/src/main/java/groovy/servlet/TemplateServlet.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-servlet/src/main/java/groovy/servlet/TemplateServlet.java
b/subprojects/groovy-servlet/src/main/java/groovy/servlet/TemplateServlet.java
index 3e3d778..f40de09 100644
--- a/subprojects/groovy-servlet/src/main/java/groovy/servlet/TemplateServlet.java
+++ b/subprojects/groovy-servlet/src/main/java/groovy/servlet/TemplateServlet.java
@@ -123,10 +123,6 @@ public class TemplateServlet extends AbstractHttpServlet {
         long length;
         Template template;
 
-        public TemplateCacheEntry(File file, Template template) {
-            this(file, template, false); // don't get time millis for sake of speed
-        }
-
         public TemplateCacheEntry(File file, Template template, boolean timestamp) {
             if (template == null) {
                 throw new NullPointerException("template");

http://git-wip-us.apache.org/repos/asf/groovy/blob/2d9c0225/subprojects/groovy-test/src/main/java/groovy/mock/interceptor/MockProxyMetaClass.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-test/src/main/java/groovy/mock/interceptor/MockProxyMetaClass.java
b/subprojects/groovy-test/src/main/java/groovy/mock/interceptor/MockProxyMetaClass.java
index b5463dd..99b7a37 100644
--- a/subprojects/groovy-test/src/main/java/groovy/mock/interceptor/MockProxyMetaClass.java
+++ b/subprojects/groovy-test/src/main/java/groovy/mock/interceptor/MockProxyMetaClass.java
@@ -20,8 +20,6 @@ package groovy.mock.interceptor;
 
 import groovy.lang.*;
 
-import java.beans.IntrospectionException;
-
 /**
  * The ProxyMetaClass for the MockInterceptor.
  * Instance and class methods are intercepted, but constructors are not to allow mocking
of aggregated objects.
@@ -44,14 +42,14 @@ public class MockProxyMetaClass extends ProxyMetaClass {
     /**
      * @param adaptee the MetaClass to decorate with interceptability
      */
-    public MockProxyMetaClass(MetaClassRegistry registry, Class theClass, MetaClass adaptee)
throws IntrospectionException {
+    public MockProxyMetaClass(MetaClassRegistry registry, Class theClass, MetaClass adaptee)
{
         this(registry, theClass, adaptee, false);
     }
 
     /**
      * @param adaptee the MetaClass to decorate with interceptability
      */
-    public MockProxyMetaClass(MetaClassRegistry registry, Class theClass, MetaClass adaptee,
boolean interceptConstruction) throws IntrospectionException {
+    public MockProxyMetaClass(MetaClassRegistry registry, Class theClass, MetaClass adaptee,
boolean interceptConstruction) {
         super(registry, theClass, adaptee);
         this.interceptConstruction = interceptConstruction;
     }
@@ -59,14 +57,14 @@ public class MockProxyMetaClass extends ProxyMetaClass {
     /**
      * convenience factory method for the most usual case.
      */
-    public static MockProxyMetaClass make(Class theClass) throws IntrospectionException {
+    public static MockProxyMetaClass make(Class theClass) {
         return make(theClass, false);
     }
 
     /**
      * convenience factory method allowing interceptConstruction to be set.
      */
-    public static MockProxyMetaClass make(Class theClass, boolean interceptConstruction)
throws IntrospectionException {
+    public static MockProxyMetaClass make(Class theClass, boolean interceptConstruction)
{
         MetaClassRegistry metaRegistry = GroovySystem.getMetaClassRegistry();
         MetaClass meta = metaRegistry.getMetaClass(theClass);
         return new MockProxyMetaClass(metaRegistry, theClass, meta, interceptConstruction);


Mime
View raw message