ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r895000 - in /ant/sandbox/groovyfront/src: main/java/org/apache/ant/groovyfront/ main/java/org/apache/ant/groovyfront/jvm15backport/ test/java/org/apache/ant/groovyfront/
Date Fri, 01 Jan 2010 12:34:56 GMT
Author: hibou
Date: Fri Jan  1 12:34:55 2010
New Revision: 895000

URL: http://svn.apache.org/viewvc?rev=895000&view=rev
Log:
Stick to java 1.4 as both Groovy and Ant only require 1.4

Added:
    ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/jvm15backport/
    ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/jvm15backport/Arrays.java
  (with props)
Modified:
    ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontBinding.java
    ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontBuilder.java
    ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontMetaClass.java
    ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontParsingContext.java
    ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontProject.java
    ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontProjectHelper.java
    ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontScriptMetaClass.java
    ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontTarget.java
    ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontTask.java
    ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/SimpleNamespaceBuilder.java
    ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/SubGroovyFrontTask.java
    ant/sandbox/groovyfront/src/test/java/org/apache/ant/groovyfront/GroovyFrontAntlibTestSuite.java
    ant/sandbox/groovyfront/src/test/java/org/apache/ant/groovyfront/GroovyFrontBuilderTest.java

Modified: ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontBinding.java
URL: http://svn.apache.org/viewvc/ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontBinding.java?rev=895000&r1=894999&r2=895000&view=diff
==============================================================================
--- ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontBinding.java
(original)
+++ ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontBinding.java
Fri Jan  1 12:34:55 2010
@@ -37,7 +37,6 @@
         this.groovyFrontBuilder = grovyFrontBuilder;
     }
 
-    @Override
     public Object getVariable(final String name) {
         Object returnValue = project.getProperty(name);
         if (returnValue == null) {
@@ -52,7 +51,6 @@
         return returnValue;
     }
 
-    @Override
     public void setVariable(final String name, final Object newValue) {
         if ("project".equals(name)) {
             throw new BuildException("The variable 'project' cannot be overriden");
@@ -60,8 +58,6 @@
         project.setNewProperty(name, newValue == null ? NULL_TOSTRING : newValue.toString());
     }
 
-    @SuppressWarnings("unchecked")
-    @Override
     public Map getVariables() {
         return project.getProperties();
     }

Modified: ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontBuilder.java
URL: http://svn.apache.org/viewvc/ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontBuilder.java?rev=895000&r1=894999&r2=895000&view=diff
==============================================================================
--- ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontBuilder.java
(original)
+++ ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontBuilder.java
Fri Jan  1 12:34:55 2010
@@ -32,7 +32,6 @@
         super(project);
     }
 
-    @Override
     protected void setClosureDelegate(Closure closure, Object node) {
         super.setClosureDelegate(closure, node);
         closure.setResolveStrategy(Closure.DELEGATE_FIRST);

Modified: ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontMetaClass.java
URL: http://svn.apache.org/viewvc/ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontMetaClass.java?rev=895000&r1=894999&r2=895000&view=diff
==============================================================================
--- ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontMetaClass.java
(original)
+++ ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontMetaClass.java
Fri Jan  1 12:34:55 2010
@@ -33,7 +33,6 @@
         this.groovyFrontBuilder = groovyFrontBuilder;
     }
 
-    @Override
     public Object invokeMethod(final Object object, final String methodName, final Object[]
arguments) {
         Object returnObject = null;
         try {
@@ -48,7 +47,6 @@
         return returnObject;
     }
 
-    @Override
     public Object invokeMethod(final Object object, final String methodName, final Object
arguments) {
         if (arguments == null) {
             return invokeMethod(object, methodName, MetaClassHelper.EMPTY_ARRAY);
@@ -61,13 +59,10 @@
         }
     }
 
-    @Override
     public Object invokeMethod(final String name, final Object args) {
         return invokeMethod(this, name, args);
     }
 
-    @SuppressWarnings("unchecked")
-    @Override
     public Object invokeMethod(final Class sender, final Object receiver, final String methodName,
             final Object[] arguments, final boolean isCallToSuper, final boolean fromInsideClass)
{
         return invokeMethod(receiver, methodName, arguments);

Modified: ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontParsingContext.java
URL: http://svn.apache.org/viewvc/ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontParsingContext.java?rev=895000&r1=894999&r2=895000&view=diff
==============================================================================
--- ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontParsingContext.java
(original)
+++ ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontParsingContext.java
Fri Jan  1 12:34:55 2010
@@ -21,11 +21,9 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.tools.ant.Target;
-
 public class GroovyFrontParsingContext {
 
-    private Map<String, Target> currentTargets = new HashMap<String, Target>();
+    private Map/*<String, Target>*/ currentTargets = new HashMap/*<String, Target>*/();
 
     private String currentProjectName;
 
@@ -35,11 +33,11 @@
 
     private File buildFileParent;
 
-    public Map<String, Target> getCurrentTargets() {
+    public Map/*<String, Target>*/ getCurrentTargets() {
         return currentTargets;
     }
 
-    public void setCurrentTargets(Map<String, Target> currentTargets) {
+    public void setCurrentTargets(Map/*<String, Target>*/ currentTargets) {
         this.currentTargets = currentTargets;
     }
 

Modified: ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontProject.java
URL: http://svn.apache.org/viewvc/ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontProject.java?rev=895000&r1=894999&r2=895000&view=diff
==============================================================================
--- ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontProject.java
(original)
+++ ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontProject.java
Fri Jan  1 12:34:55 2010
@@ -55,7 +55,6 @@
         return delegate;
     }
 
-    @Override
     public void setName(String name) {
         delegate.setName(name);
         context.setCurrentProjectName(name);
@@ -74,7 +73,6 @@
         }
     }
 
-    @Override
     public String getName() {
         if (delegate.getName() != null) {
             return delegate.getName();
@@ -82,7 +80,6 @@
         return buildFileName;
     }
 
-    @Override
     public void setBaseDir(File baseDir) throws BuildException {
         if (context.isImported()) {
             return;
@@ -101,7 +98,6 @@
         }
     }
 
-    @Override
     public void setBasedir(String baseD) throws BuildException {
         if (context.isImported()) {
             return;
@@ -109,7 +105,6 @@
         setBaseDir(new File(baseD));
     }
 
-    @Override
     public void setDefault(String defaultTarget) {
         if (context.isImported()) {
             return;
@@ -117,8 +112,6 @@
         delegate.setDefault(defaultTarget);
     }
 
-    @SuppressWarnings("deprecation")
-    @Override
     public void setDefaultTarget(String defaultTarget) {
         if (context.isImported()) {
             return;
@@ -126,7 +119,6 @@
         delegate.setDefaultTarget(defaultTarget);
     }
 
-    @Override
     public void setDescription(String description) {
         if (context.isImported()) {
             return;
@@ -134,494 +126,376 @@
         delegate.setDescription(description);
     }
 
-    @Override
     public void addBuildListener(BuildListener listener) {
         delegate.addBuildListener(listener);
     }
 
-    @SuppressWarnings("unchecked")
-    @Override
     public void addDataTypeDefinition(String typeName, Class typeClass) {
         delegate.addDataTypeDefinition(typeName, typeClass);
     }
 
-    @SuppressWarnings("deprecation")
-    @Override
     public void addFilter(String token, String value) {
         delegate.addFilter(token, value);
     }
 
-    @Override
     public void addIdReference(String id, Object value) {
         delegate.addIdReference(id, value);
     }
 
-    @Override
     public void addOrReplaceTarget(String targetName, Target target) {
         delegate.addOrReplaceTarget(targetName, target);
     }
 
-    @Override
     public void addOrReplaceTarget(Target target) {
         delegate.addOrReplaceTarget(target);
     }
 
-    @Override
     public void addReference(String referenceName, Object value) {
         delegate.addReference(referenceName, value);
     }
 
-    @Override
     public void addTarget(String targetName, Target target) throws BuildException {
         delegate.addTarget(targetName, target);
     }
 
-    @Override
     public void addTarget(Target target) throws BuildException {
         delegate.addTarget(target);
     }
 
-    @SuppressWarnings("unchecked")
-    @Override
     public void addTaskDefinition(String taskName, Class taskClass) throws BuildException
{
         delegate.addTaskDefinition(taskName, taskClass);
     }
 
-    @SuppressWarnings("unchecked")
-    @Override
     public void checkTaskClass(Class taskClass) throws BuildException {
         delegate.checkTaskClass(taskClass);
     }
 
-    @SuppressWarnings("deprecation")
-    @Override
     public void copyFile(File sourceFile, File destFile, boolean filtering, boolean overwrite,
             boolean preserveLastModified) throws IOException {
         delegate.copyFile(sourceFile, destFile, filtering, overwrite, preserveLastModified);
     }
 
-    @SuppressWarnings("deprecation")
-    @Override
     public void copyFile(File sourceFile, File destFile, boolean filtering, boolean overwrite)
throws IOException {
         delegate.copyFile(sourceFile, destFile, filtering, overwrite);
     }
 
-    @SuppressWarnings("deprecation")
-    @Override
     public void copyFile(File sourceFile, File destFile, boolean filtering) throws IOException
{
         delegate.copyFile(sourceFile, destFile, filtering);
     }
 
-    @SuppressWarnings("deprecation")
-    @Override
     public void copyFile(File sourceFile, File destFile) throws IOException {
         delegate.copyFile(sourceFile, destFile);
     }
 
-    @SuppressWarnings("deprecation")
-    @Override
     public void copyFile(String sourceFile, String destFile, boolean filtering, boolean overwrite,
             boolean preserveLastModified) throws IOException {
         delegate.copyFile(sourceFile, destFile, filtering, overwrite, preserveLastModified);
     }
 
-    @SuppressWarnings("deprecation")
-    @Override
     public void copyFile(String sourceFile, String destFile, boolean filtering, boolean overwrite)
throws IOException {
         delegate.copyFile(sourceFile, destFile, filtering, overwrite);
     }
 
-    @SuppressWarnings("deprecation")
-    @Override
     public void copyFile(String sourceFile, String destFile, boolean filtering) throws IOException
{
         delegate.copyFile(sourceFile, destFile, filtering);
     }
 
-    @SuppressWarnings("deprecation")
-    @Override
     public void copyFile(String sourceFile, String destFile) throws IOException {
         delegate.copyFile(sourceFile, destFile);
     }
 
-    @Override
     public void copyInheritedProperties(Project other) {
         delegate.copyInheritedProperties(other);
     }
 
-    @Override
     public void copyUserProperties(Project other) {
         delegate.copyUserProperties(other);
     }
 
-    @Override
     public AntClassLoader createClassLoader(ClassLoader parent, Path path) {
         return delegate.createClassLoader(parent, path);
     }
 
-    @Override
     public AntClassLoader createClassLoader(Path path) {
         return delegate.createClassLoader(path);
     }
 
-    @Override
     public Object createDataType(String typeName) throws BuildException {
         return delegate.createDataType(typeName);
     }
 
-    @Override
     public Project createSubProject() {
         return delegate.createSubProject();
     }
 
-    @Override
     public Task createTask(String taskType) throws BuildException {
         return delegate.createTask(taskType);
     }
 
-    @Override
     public int defaultInput(byte[] buffer, int offset, int length) throws IOException {
         return delegate.defaultInput(buffer, offset, length);
     }
 
-    @Override
     public void demuxFlush(String output, boolean isError) {
         delegate.demuxFlush(output, isError);
     }
 
-    @Override
     public int demuxInput(byte[] buffer, int offset, int length) throws IOException {
         return delegate.demuxInput(buffer, offset, length);
     }
 
-    @Override
     public void demuxOutput(String output, boolean isWarning) {
         delegate.demuxOutput(output, isWarning);
     }
 
-    @Override
     public boolean equals(Object obj) {
         return delegate.equals(obj);
     }
 
-    @SuppressWarnings("unchecked")
-    @Override
     public void executeSortedTargets(Vector sortedTargets) throws BuildException {
         delegate.executeSortedTargets(sortedTargets);
     }
 
-    @Override
     public void executeTarget(String targetName) throws BuildException {
         delegate.executeTarget(targetName);
     }
 
-    @SuppressWarnings("unchecked")
-    @Override
     public void executeTargets(Vector names) throws BuildException {
         delegate.executeTargets(names);
     }
 
-    @Override
     public void fireBuildFinished(Throwable exception) {
         delegate.fireBuildFinished(exception);
     }
 
-    @Override
     public void fireBuildStarted() {
         delegate.fireBuildStarted();
     }
 
-    @Override
     public void fireSubBuildFinished(Throwable exception) {
         delegate.fireSubBuildFinished(exception);
     }
 
-    @Override
     public void fireSubBuildStarted() {
         delegate.fireSubBuildStarted();
     }
 
-    @Override
     public File getBaseDir() {
         return delegate.getBaseDir();
     }
 
-    @SuppressWarnings("unchecked")
-    @Override
     public Vector getBuildListeners() {
         return delegate.getBuildListeners();
     }
 
-    @Override
     public ClassLoader getCoreLoader() {
         return delegate.getCoreLoader();
     }
 
-    @SuppressWarnings("unchecked")
-    @Override
     public Hashtable getDataTypeDefinitions() {
         return delegate.getDataTypeDefinitions();
     }
 
-    @Override
     public InputStream getDefaultInputStream() {
         return delegate.getDefaultInputStream();
     }
 
-    @Override
     public String getDefaultTarget() {
         return delegate.getDefaultTarget();
     }
 
-    @Override
     public String getDescription() {
         return delegate.getDescription();
     }
 
-    @Override
     public String getElementName(Object element) {
         return delegate.getElementName(element);
     }
 
-    @Override
     public Executor getExecutor() {
         return delegate.getExecutor();
     }
 
-    @SuppressWarnings( { "unchecked", "deprecation" })
-    @Override
     public Hashtable getFilters() {
         return delegate.getFilters();
     }
 
-    @Override
     public FilterSet getGlobalFilterSet() {
         return delegate.getGlobalFilterSet();
     }
 
-    @Override
     public InputHandler getInputHandler() {
         return delegate.getInputHandler();
     }
 
-    @SuppressWarnings("unchecked")
-    @Override
     public Hashtable getProperties() {
         return delegate.getProperties();
     }
 
-    @Override
     public String getProperty(String propertyName) {
         return delegate.getProperty(propertyName);
     }
 
-    @Override
     public Object getReference(String key) {
         return delegate.getReference(key);
     }
 
-    @SuppressWarnings("unchecked")
-    @Override
     public Hashtable getReferences() {
         return delegate.getReferences();
     }
 
-    @Override
     public Resource getResource(String name) {
         return delegate.getResource(name);
     }
 
-    @SuppressWarnings("unchecked")
-    @Override
     public Hashtable getTargets() {
         return delegate.getTargets();
     }
 
-    @SuppressWarnings("unchecked")
-    @Override
     public Hashtable getTaskDefinitions() {
         return delegate.getTaskDefinitions();
     }
 
-    @Override
     public Task getThreadTask(Thread thread) {
         return delegate.getThreadTask(thread);
     }
 
-    @SuppressWarnings("unchecked")
-    @Override
     public Hashtable getUserProperties() {
         return delegate.getUserProperties();
     }
 
-    @Override
     public String getUserProperty(String propertyName) {
         return delegate.getUserProperty(propertyName);
     }
 
-    @Override
     public int hashCode() {
         return delegate.hashCode();
     }
 
-    @Override
     public void inheritIDReferences(Project parent) {
         delegate.inheritIDReferences(parent);
     }
 
-    @Override
     public void init() throws BuildException {
         delegate.init();
     }
 
-    @Override
     public void initProperties() throws BuildException {
         delegate.initProperties();
     }
 
-    @Override
     public void initSubProject(Project subProject) {
         delegate.initSubProject(subProject);
     }
 
-    @Override
     public boolean isKeepGoingMode() {
         return delegate.isKeepGoingMode();
     }
 
-    @Override
     public void log(String message, int msgLevel) {
         delegate.log(message, msgLevel);
     }
 
-    @Override
     public void log(String message, Throwable throwable, int msgLevel) {
         delegate.log(message, throwable, msgLevel);
     }
 
-    @Override
     public void log(String message) {
         delegate.log(message);
     }
 
-    @Override
     public void log(Target target, String message, int msgLevel) {
         delegate.log(target, message, msgLevel);
     }
 
-    @Override
     public void log(Target target, String message, Throwable throwable, int msgLevel) {
         delegate.log(target, message, throwable, msgLevel);
     }
 
-    @Override
     public void log(Task task, String message, int msgLevel) {
         delegate.log(task, message, msgLevel);
     }
 
-    @Override
     public void log(Task task, String message, Throwable throwable, int msgLevel) {
         delegate.log(task, message, throwable, msgLevel);
     }
 
-    @Override
     public void registerThreadTask(Thread thread, Task task) {
         delegate.registerThreadTask(thread, task);
     }
 
-    @Override
     public void removeBuildListener(BuildListener listener) {
         delegate.removeBuildListener(listener);
     }
 
-    @Override
     public String replaceProperties(String value) throws BuildException {
         return delegate.replaceProperties(value);
     }
 
-    @SuppressWarnings("deprecation")
-    @Override
     public File resolveFile(String fileName, File rootDir) {
         return delegate.resolveFile(fileName, rootDir);
     }
 
-    @Override
     public File resolveFile(String fileName) {
         return delegate.resolveFile(fileName);
     }
 
-    @Override
     public void setCoreLoader(ClassLoader coreLoader) {
         delegate.setCoreLoader(coreLoader);
     }
 
-    @Override
     public void setDefaultInputStream(InputStream defaultInputStream) {
         delegate.setDefaultInputStream(defaultInputStream);
     }
 
-    @Override
     public void setExecutor(Executor e) {
         delegate.setExecutor(e);
     }
 
-    @SuppressWarnings("deprecation")
-    @Override
     public void setFileLastModified(File file, long time) throws BuildException {
         delegate.setFileLastModified(file, time);
     }
 
-    @Override
     public void setInheritedProperty(String name, String value) {
         delegate.setInheritedProperty(name, value);
     }
 
-    @Override
     public void setInputHandler(InputHandler handler) {
         delegate.setInputHandler(handler);
     }
 
-    @Override
     public void setJavaVersionProperty() throws BuildException {
         delegate.setJavaVersionProperty();
     }
 
-    @Override
     public void setKeepGoingMode(boolean keepGoingMode) {
         delegate.setKeepGoingMode(keepGoingMode);
     }
 
-    @Override
     public void setNewProperty(String name, String value) {
         delegate.setNewProperty(name, value);
     }
 
-    @Override
     public void setProperty(String name, String value) {
         delegate.setProperty(name, value);
     }
 
-    @Override
     public void setSystemProperties() {
         delegate.setSystemProperties();
     }
 
-    @Override
     public void setUserProperty(String name, String value) {
         delegate.setUserProperty(name, value);
     }
 
-    @Override
     public String toString() {
         return delegate.toString();
     }
 
-    @SuppressWarnings("unchecked")
-    @Override
     public Hashtable getInheritedProperties() {
         return delegate.getInheritedProperties();
     }
 
-    @Override
     public boolean hasReference(String key) {
         return delegate.hasReference(key);
     }

Modified: ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontProjectHelper.java
URL: http://svn.apache.org/viewvc/ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontProjectHelper.java?rev=895000&r1=894999&r2=895000&view=diff
==============================================================================
--- ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontProjectHelper.java
(original)
+++ ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontProjectHelper.java
Fri Jan  1 12:34:55 2010
@@ -35,7 +35,6 @@
 import org.apache.tools.ant.ComponentHelper;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.ProjectHelper;
-import org.apache.tools.ant.Target;
 import org.apache.tools.ant.util.FileUtils;
 import org.codehaus.groovy.control.CompilationFailedException;
 
@@ -45,20 +44,16 @@
 
     private static final String REFID_BUILDER = "groovyfront.builder";
 
-    @Override
     public String getDefaultBuildFile() {
         return "build.groovy";
     }
 
-    @Override
     public boolean supportsBuildFile(File buildFile) {
         return buildFile.getName().toLowerCase().endsWith(".groovy");
     }
 
-    @Override
     public void parse(Project project, Object source) throws BuildException {
-        @SuppressWarnings("unchecked")
-        Vector<Object> stack = getImportStack();
+        Vector/*<Object>*/ stack = getImportStack();
         stack.addElement(source);
         GroovyFrontParsingContext context = null;
         context = (GroovyFrontParsingContext) project.getReference(REFID_CONTEXT);
@@ -68,12 +63,12 @@
         }
 
         if (getImportStack().size() > 1) {
-            Map<String, Target> currentTargets = context.getCurrentTargets();
+            Map/*<String, Target>*/ currentTargets = context.getCurrentTargets();
             String currentProjectName = context.getCurrentProjectName();
             boolean imported = context.isImported();
             try {
                 context.setImported(true);
-                context.setCurrentTargets(new HashMap<String, Target>());
+                context.setCurrentTargets(new HashMap/*<String, Target>*/());
                 parse(project, source, context);
             } finally {
                 context.setCurrentTargets(currentTargets);
@@ -82,7 +77,7 @@
             }
         } else {
             // top level file
-            context.setCurrentTargets(new HashMap<String, Target>());
+            context.setCurrentTargets(new HashMap/*<String, Target>*/());
             parse(project, source, context);
         }
     }
@@ -143,7 +138,6 @@
         script.setBinding(binding);
         script.setMetaClass(new GroovyFrontScriptMetaClass(script.getMetaClass(), groovyFrontProject,
antBuilder, context));
         new GroovyRunner() {
-            @Override
             protected void doRun() {
                 script.run();
             }

Modified: ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontScriptMetaClass.java
URL: http://svn.apache.org/viewvc/ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontScriptMetaClass.java?rev=895000&r1=894999&r2=895000&view=diff
==============================================================================
--- ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontScriptMetaClass.java
(original)
+++ ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontScriptMetaClass.java
Fri Jan  1 12:34:55 2010
@@ -20,10 +20,10 @@
 import groovy.lang.Closure;
 import groovy.lang.MetaClass;
 
-import java.util.Arrays;
 import java.util.Hashtable;
 import java.util.Map;
 
+import org.apache.ant.groovyfront.jvm15backport.Arrays;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Location;
 import org.apache.tools.ant.Project;
@@ -42,7 +42,6 @@
         this.context = context;
     }
 
-    @Override
     public Object invokeMethod(Object object, String methodName, Object[] arguments) {
         if ("target".equals(methodName)) {
             defineTarget(arguments);
@@ -74,13 +73,12 @@
         if (args.length != 2 || !(args[0] instanceof Map) || !(args[1] instanceof Closure))
{
             throw new BuildException("A target is ill formed. Expecting map, closure but
was: " + Arrays.toString(args));
         }
-        @SuppressWarnings("unchecked")
-        Map<String, String> map = (Map<String, String>) args[0];
+        Map/*<String, String>*/ map = (Map/*<String, String>*/) args[0];
         Closure closure = (Closure) args[1];
         closure.setMetaClass(new GroovyFrontMetaClass(closure.getMetaClass(), groovyFrontBuilder));
-        String name = map.get("name");
-        String description = map.get("description");
-        String depends = map.get("depends");
+        String name = (String) map.get("name");
+        String description = (String) map.get("description");
+        String depends = (String) map.get("depends");
 
         if (name == null) {
             throw new BuildException("a target name must be set");
@@ -105,7 +103,7 @@
             target.setDescription(description);
         }
 
-        Hashtable<?, ?> projectTargets = project.getTargets();
+        Hashtable/*<?, ?>*/ projectTargets = project.getTargets();
         // If the name has not already been defined, log an override
         // NB: unlike ant xml project helper, the imported file are executed before the target
definition of the main
         // file

Modified: ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontTarget.java
URL: http://svn.apache.org/viewvc/ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontTarget.java?rev=895000&r1=894999&r2=895000&view=diff
==============================================================================
--- ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontTarget.java
(original)
+++ ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontTarget.java
Fri Jan  1 12:34:55 2010
@@ -38,13 +38,11 @@
         this.groovyFrontBuilder = other.groovyFrontBuilder;
     }
 
-    @Override
     public void execute() throws BuildException {
         groovyFrontBuilder.getAntXmlContext().setCurrentTarget(this);
         final Closure c = closure;
         // if (testIfCondition() && testUnlessCondition()) {
         new GroovyRunner() {
-            @Override
             protected void doRun() {
                 c.call();
             }

Modified: ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontTask.java
URL: http://svn.apache.org/viewvc/ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontTask.java?rev=895000&r1=894999&r2=895000&view=diff
==============================================================================
--- ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontTask.java
(original)
+++ ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/GroovyFrontTask.java
Fri Jan  1 12:34:55 2010
@@ -21,7 +21,6 @@
 
 public class GroovyFrontTask extends Ant {
 
-    @Override
     protected String getDefaultBuildFile() {
         return "build.groovy";
     }

Modified: ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/SimpleNamespaceBuilder.java
URL: http://svn.apache.org/viewvc/ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/SimpleNamespaceBuilder.java?rev=895000&r1=894999&r2=895000&view=diff
==============================================================================
--- ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/SimpleNamespaceBuilder.java
(original)
+++ ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/SimpleNamespaceBuilder.java
Fri Jan  1 12:34:55 2010
@@ -34,7 +34,6 @@
         nsBuilder = NamespaceBuilder.newInstance(Collections.singletonMap(this.prefix, uri),
groovyFrontBuilder);
     }
 
-    @Override
     public Object invokeMethod(String name, Object args) {
         return nsBuilder.invokeMethod(prefix + ":" + name, args);
     }

Modified: ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/SubGroovyFrontTask.java
URL: http://svn.apache.org/viewvc/ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/SubGroovyFrontTask.java?rev=895000&r1=894999&r2=895000&view=diff
==============================================================================
--- ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/SubGroovyFrontTask.java
(original)
+++ ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/SubGroovyFrontTask.java
Fri Jan  1 12:34:55 2010
@@ -21,7 +21,6 @@
 
 public class SubGroovyFrontTask extends SubAnt {
 
-    @Override
     protected String getDefaultBuildFile() {
         return "build.groovy";
     }

Added: ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/jvm15backport/Arrays.java
URL: http://svn.apache.org/viewvc/ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/jvm15backport/Arrays.java?rev=895000&view=auto
==============================================================================
--- ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/jvm15backport/Arrays.java
(added)
+++ ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/jvm15backport/Arrays.java
Fri Jan  1 12:34:55 2010
@@ -0,0 +1,21 @@
+package org.apache.ant.groovyfront.jvm15backport;
+
+public class Arrays {
+
+	public static String toString(Object[] a) {
+		if (a == null)
+			return "null";
+		int iMax = a.length - 1;
+		if (iMax == -1)
+			return "[]";
+
+		StringBuffer b = new StringBuffer();
+		b.append('[');
+		for (int i = 0;; i++) {
+			b.append(String.valueOf(a[i]));
+			if (i == iMax)
+				return b.append(']').toString();
+			b.append(", ");
+		}
+	}
+}

Propchange: ant/sandbox/groovyfront/src/main/java/org/apache/ant/groovyfront/jvm15backport/Arrays.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ant/sandbox/groovyfront/src/test/java/org/apache/ant/groovyfront/GroovyFrontAntlibTestSuite.java
URL: http://svn.apache.org/viewvc/ant/sandbox/groovyfront/src/test/java/org/apache/ant/groovyfront/GroovyFrontAntlibTestSuite.java?rev=895000&r1=894999&r2=895000&view=diff
==============================================================================
--- ant/sandbox/groovyfront/src/test/java/org/apache/ant/groovyfront/GroovyFrontAntlibTestSuite.java
(original)
+++ ant/sandbox/groovyfront/src/test/java/org/apache/ant/groovyfront/GroovyFrontAntlibTestSuite.java
Fri Jan  1 12:34:55 2010
@@ -27,7 +27,7 @@
 public class GroovyFrontAntlibTestSuite extends TestCase {
 
     public static TestSuite suite() {
-        File script = new File("src/test/antunit/antlibTest.groovy");
+        File script = new File(new File(new File(new File("src"), "test") , "antunit"), "antlibTest.groovy");
         return new AntUnitSuite(script, GroovyFrontAntlibTestSuite.class);
     }
 

Modified: ant/sandbox/groovyfront/src/test/java/org/apache/ant/groovyfront/GroovyFrontBuilderTest.java
URL: http://svn.apache.org/viewvc/ant/sandbox/groovyfront/src/test/java/org/apache/ant/groovyfront/GroovyFrontBuilderTest.java?rev=895000&r1=894999&r2=895000&view=diff
==============================================================================
--- ant/sandbox/groovyfront/src/test/java/org/apache/ant/groovyfront/GroovyFrontBuilderTest.java
(original)
+++ ant/sandbox/groovyfront/src/test/java/org/apache/ant/groovyfront/GroovyFrontBuilderTest.java
Fri Jan  1 12:34:55 2010
@@ -17,18 +17,12 @@
  */
 package org.apache.ant.groovyfront;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import junit.framework.TestCase;
 
-import org.apache.ant.groovyfront.GroovyFrontBuilder;
-import org.apache.ant.groovyfront.GroovyFrontParsingContext;
-import org.apache.ant.groovyfront.GroovyFrontProject;
 import org.apache.tools.ant.Project;
-import org.junit.Test;
 
-public class GroovyFrontBuilderTest {
+public class GroovyFrontBuilderTest extends TestCase {
 
-    @Test
     public void testIsTaskDefined() throws Exception {
         GroovyFrontProject project = new GroovyFrontProject(new Project(), new GroovyFrontParsingContext(),
"build.groovy");
         project.init();



Mime
View raw message