ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers CompilerAdapter.java CompilerAdapterFactory.java DefaultCompilerAdapter.java Gcj.java Javac12.java Jikes.java Jvc.java Kjc.java
Date Fri, 12 Apr 2002 14:46:45 GMT
conor       02/04/12 07:46:45

  Modified:    src/main/org/apache/tools/ant IntrospectionHelper.java
               src/main/org/apache/tools/ant/taskdefs AbstractCvsTask.java
                        Ant.java AntStructure.java Available.java
                        BUnzip2.java CVSPass.java CallTarget.java
                        Checksum.java Copy.java Copydir.java Definer.java
               src/main/org/apache/tools/ant/taskdefs/compilers
                        CompilerAdapter.java CompilerAdapterFactory.java
                        DefaultCompilerAdapter.java Gcj.java Javac12.java
                        Jikes.java Jvc.java Kjc.java
  Log:
  Fix up style issues
  
  Revision  Changes    Path
  1.40      +23 -8     jakarta-ant/src/main/org/apache/tools/ant/IntrospectionHelper.java
  
  Index: IntrospectionHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/IntrospectionHelper.java,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -w -u -r1.39 -r1.40
  --- IntrospectionHelper.java	9 Apr 2002 15:27:07 -0000	1.39
  +++ IntrospectionHelper.java	12 Apr 2002 14:46:44 -0000	1.40
  @@ -212,14 +212,7 @@
   
               // not really user settable properties on tasks
               if (org.apache.tools.ant.Task.class.isAssignableFrom(bean)
  -                && args.length == 1 &&
  -                (
  -                 (
  -                  "setLocation".equals(name) && org.apache.tools.ant.Location.class.equals(args[0])
  -                  ) || (
  -                   "setTaskType".equals(name) && java.lang.String.class.equals(args[0])
  -                  )
  -                 )) {
  +                 && args.length == 1 && isHiddenSetMethod(name, args[0]))
{
                   continue;
               }
   
  @@ -353,6 +346,28 @@
           }
       }
   
  +    /** 
  +     * Certain set methods are part of the Ant core interface to tasks and 
  +     * therefore not to be considered for introspection
  +     *
  +     * @param name the name of the set method
  +     * @param type the type of the set method's parameter 
  +     * @return true if the given set method is to be hidden.
  +     */
  +    private boolean isHiddenSetMethod(String name, Class type) {
  +        if ("setLocation".equals(name) 
  +             && org.apache.tools.ant.Location.class.equals(type)) {
  +            return true;
  +        }
  +        
  +        if  ("setTaskType".equals(name) 
  +             && java.lang.String.class.equals(type)) {
  +            return true;
  +        }
  +        
  +        return false;
  +    }
  +    
       /**
        * Returns a helper for the given class, either from the cache
        * or by creating a new instance.
  
  
  
  1.8       +49 -49    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java
  
  Index: AbstractCvsTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -w -u -r1.7 -r1.8
  --- AbstractCvsTask.java	11 Apr 2002 09:52:48 -0000	1.7
  +++ AbstractCvsTask.java	12 Apr 2002 14:46:44 -0000	1.8
  @@ -187,7 +187,6 @@
       protected ExecuteStreamHandler getExecuteStreamHandler(){
   
           if(this.executeStreamHandler == null){
  -
               setExecuteStreamHandler(new PumpStreamHandler(getOutputStream(), 
                                                             getErrorStream()));
           }
  @@ -382,8 +381,7 @@
   
           String savedCommand = getCommand();
   
  -        if( this.getCommand() == null
  -            && vecCommandlines.size() == 0 ) {
  +        if (this.getCommand() == null && vecCommandlines.size() == 0) {
               // re-implement legacy behaviour:
               this.setCommand( AbstractCvsTask.default_command );
           }
  @@ -603,7 +601,9 @@
       */
       public void addConfiguredCommandline( Commandline c, 
                                             boolean insertAtStart ) {
  -        if( c == null ) { return; }
  +        if (c == null) {
  +            return; 
  +        }
           this.configureCommandline( c );
           if( insertAtStart ) {
               vecCommandlines.insertElementAt( c, 0 );
  
  
  
  1.50      +24 -18    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java
  
  Index: Ant.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -w -u -r1.49 -r1.50
  --- Ant.java	11 Apr 2002 07:38:15 -0000	1.49
  +++ Ant.java	12 Apr 2002 14:46:44 -0000	1.50
  @@ -538,7 +538,13 @@
           public Reference() {super();}
   
           private String targetid=null;
  -        public void setToRefid(String targetid) { this.targetid=targetid; }
  -        public String getToRefid() { return targetid; }
  +
  +        public void setToRefid(String targetid) {
  +            this.targetid = targetid; 
  +        }
  +
  +        public String getToRefid() { 
  +            return targetid; 
  +        }
       }
   }
  
  
  
  1.24      +8 -9      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/AntStructure.java
  
  Index: AntStructure.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/AntStructure.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -w -u -r1.23 -r1.24
  --- AntStructure.java	11 Apr 2002 07:38:15 -0000	1.23
  +++ AntStructure.java	12 Apr 2002 14:46:44 -0000	1.24
  @@ -77,7 +77,7 @@
    *
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    *
  - * @version $Revision: 1.23 $
  + * @version $Revision: 1.24 $
    *
    * @since Ant 1.1
    *
  @@ -145,8 +145,8 @@
               printTail(out);
   
           } catch (IOException ioe) {
  -            throw new BuildException("Error writing "+output.getAbsolutePath(),
  -                                     ioe, location);
  +            throw new BuildException("Error writing " 
  +                + output.getAbsolutePath(), ioe, location);
           } finally {
               if (out != null) {
                   out.close();
  @@ -346,10 +346,9 @@
           final int count = v.size();
           for (int i = 0; i < count; i++) {
               String nestedName = (String) v.elementAt(i);
  -            if (!"#PCDATA".equals(nestedName) &&
  -                !TASKS.equals(nestedName) &&
  -                !TYPES.equals(nestedName)
  -                ) {
  +            if (!"#PCDATA".equals(nestedName) 
  +                 && !TASKS.equals(nestedName) 
  +                 && !TYPES.equals(nestedName)) {
                   printElementDecl(out, nestedName, ih.getElementType(nestedName));
               }
           }
  
  
  
  1.41      +7 -6      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Available.java
  
  Index: Available.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Available.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -w -u -r1.40 -r1.41
  --- Available.java	11 Apr 2002 07:38:15 -0000	1.40
  +++ Available.java	12 Apr 2002 14:46:44 -0000	1.41
  @@ -381,7 +381,8 @@
           try {
               Class requiredClass = null;
               if( ignoreSystemclasses ) {
  -                loader = new AntClassLoader(null,getProject(),classpath,false);
  +                loader = new AntClassLoader(null, getProject(), 
  +                    classpath, false);
                   if (loader != null) {
                       try {
                           loader.findClass(classname);
  
  
  
  1.7       +3 -3      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/BUnzip2.java
  
  Index: BUnzip2.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/BUnzip2.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -w -u -r1.6 -r1.7
  
  
  
  1.12      +27 -27    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/CVSPass.java
  
  Index: CVSPass.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/CVSPass.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -w -u -r1.11 -r1.12
  --- CVSPass.java	12 Apr 2002 13:26:50 -0000	1.11
  +++ CVSPass.java	12 Apr 2002 14:46:44 -0000	1.12
  @@ -72,7 +72,7 @@
    * Adds an new entry to a CVS password file
    *
    * @author <a href="jeff@custommonkey.org">Jeff Martin</a>
  - * @version $Revision: 1.11 $
  + * @version $Revision: 1.12 $
    *
    * @since Ant 1.4
    *
  
  
  
  1.20      +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/CallTarget.java
  
  Index: CallTarget.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/CallTarget.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -w -u -r1.19 -r1.20
  
  
  
  1.21      +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Checksum.java
  
  Index: Checksum.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Checksum.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -w -u -r1.20 -r1.21
  
  
  
  1.40      +16 -14    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Copy.java
  
  Index: Copy.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Copy.java,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -w -u -r1.39 -r1.40
  --- Copy.java	11 Apr 2002 08:43:51 -0000	1.39
  +++ Copy.java	12 Apr 2002 14:46:44 -0000	1.40
  @@ -90,7 +90,7 @@
    * @author <A href="gholam@xtra.co.nz">Michael McCallum</A>
    * @author <a href="mailto:umagesh@rediffmail.com">Magesh Umasankar</a>
    *
  - * @version $Revision: 1.39 $
  + * @version $Revision: 1.40 $
    *
    * @since Ant 1.2
    *
  @@ -124,7 +124,9 @@
           fileUtils = FileUtils.newFileUtils();
       }
   
  -    protected FileUtils getFileUtils() {return fileUtils;}
  +    protected FileUtils getFileUtils() {
  +        return fileUtils;
  +    }
   
       /**
        * Sets a single source file to copy.
  @@ -490,9 +492,9 @@
        */
       protected void doFileOperations() {
           if (fileCopyMap.size() > 0) {
  -            log("Copying " + fileCopyMap.size() +
  -                " file" + (fileCopyMap.size() == 1 ? "" : "s") +
  -                " to " + destDir.getAbsolutePath() );
  +            log("Copying " + fileCopyMap.size() 
  +                + " file" + (fileCopyMap.size() == 1 ? "" : "s") 
  +                + " to " + destDir.getAbsolutePath());
   
               Enumeration e = fileCopyMap.keys();
               while (e.hasMoreElements()) {
  
  
  
  1.22      +2 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Copydir.java
  
  Index: Copydir.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Copydir.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -w -u -r1.21 -r1.22
  
  
  
  1.14      +28 -28    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Definer.java
  
  Index: Definer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Definer.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -w -u -r1.13 -r1.14
  --- Definer.java	12 Apr 2002 13:53:27 -0000	1.13
  +++ Definer.java	12 Apr 2002 14:46:44 -0000	1.14
  @@ -190,12 +190,12 @@
               AntClassLoader.initializeClass(c);
               addDefinition(name, c);
           } catch (ClassNotFoundException cnfe) {
  -            String msg = getTaskName()+" class " + value +
  -                " cannot be found";
  +            String msg = getTaskName() + " class " + value 
  +                + " cannot be found";
               throw new BuildException(msg, cnfe, location);
           } catch (NoClassDefFoundError ncdfe) {
  -            String msg = getTaskName()+" class " + value +
  -                " cannot be found";
  +            String msg = getTaskName() + " class " + value 
  +                + " cannot be found";
               throw new BuildException(msg, ncdfe, location);
           }
       }
  
  
  
  1.4       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/CompilerAdapter.java
  
  Index: CompilerAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/CompilerAdapter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -w -u -r1.3 -r1.4
  
  
  
  1.6       +15 -15    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/CompilerAdapterFactory.java
  
  Index: CompilerAdapterFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/CompilerAdapterFactory.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -w -u -r1.5 -r1.6
  
  
  
  1.23      +5 -5      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
  
  Index: DefaultCompilerAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -w -u -r1.22 -r1.23
  
  
  
  1.10      +2 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/Gcj.java
  
  Index: Gcj.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/Gcj.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -w -u -r1.9 -r1.10
  --- Gcj.java	11 Apr 2002 15:20:33 -0000	1.9
  +++ Gcj.java	12 Apr 2002 14:46:45 -0000	1.10
  @@ -98,7 +98,7 @@
           // so we'll emulate it for compatibility and convenience.
           classpath.addExtdirs(extdirs);
   
  -        if ( (bootclasspath == null) || (bootclasspath.size() == 0) ) {
  +        if (bootclasspath == null || bootclasspath.size() == 0) {
               // no bootclasspath, therefore, get one from the java runtime
               includeJavaRuntime = true;
           }
  
  
  
  1.6       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/Javac12.java
  
  Index: Javac12.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/Javac12.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -w -u -r1.5 -r1.6
  
  
  
  1.11      +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/Jikes.java
  
  Index: Jikes.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/Jikes.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -w -u -r1.10 -r1.11
  --- Jikes.java	11 Apr 2002 15:20:33 -0000	1.10
  +++ Jikes.java	12 Apr 2002 14:46:45 -0000	1.11
  @@ -97,7 +97,7 @@
           // so we'll emulate it for compatibility and convenience.
           classpath.addExtdirs(extdirs);
   
  -        if ( (bootclasspath == null) || (bootclasspath.size() == 0) ) {
  +        if (bootclasspath == null || bootclasspath.size() == 0) {
               // no bootclasspath, therefore, get one from the java runtime
               includeJavaRuntime = true;
           } else {
  
  
  
  1.7       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/Jvc.java
  
  Index: Jvc.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/Jvc.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -w -u -r1.6 -r1.7
  --- Jvc.java	11 Apr 2002 15:20:33 -0000	1.6
  +++ Jvc.java	12 Apr 2002 14:46:45 -0000	1.7
  @@ -87,7 +87,7 @@
           // so we'll emulate it for compatibility and convenience.
           classpath.addExtdirs(extdirs);
   
  -        if ( (bootclasspath == null) || (bootclasspath.size() == 0) ) {
  +        if (bootclasspath == null || bootclasspath.size() == 0) {
               // no bootclasspath, therefore, get one from the java runtime
               includeJavaRuntime = true;
           } else {
  
  
  
  1.7       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/Kjc.java
  
  Index: Kjc.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/compilers/Kjc.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -w -u -r1.6 -r1.7
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message