You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by br...@apache.org on 2005/05/23 04:41:01 UTC

svn commit: r177873 - /maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java

Author: brett
Date: Sun May 22 19:41:00 2005
New Revision: 177873

URL: http://svn.apache.org/viewcvs?rev=177873&view=rev
Log:
use primitive types

Modified:
    maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java

Modified: maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java?rev=177873&r1=177872&r2=177873&view=diff
==============================================================================
--- maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java (original)
+++ maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java Sun May 22 19:41:00 2005
@@ -38,16 +38,13 @@
 
     private Compiler compiler = new JavacCompiler();
     
-    // TODO: use boolean when supported
     /**
      * Whether to include debugging information in the compiled class files.
-     * <br/>
-     * <br/>
      * The default value is true.
      * 
      * @parameter expression="${maven.compiler.debug}"
      */
-    private String debug = Boolean.TRUE.toString();
+    private boolean debug = true;
     
     /**
      * The -source argument for the Java compiler
@@ -63,14 +60,13 @@
      */
     private String target;
     
-    // TODO: Use long when supported
     /**
      * The granularity in milliseconds of the last modification
      * date for testing whether a source needs recompilation
      * 
      * @parameter alias="${lastModGranularityMs}"
      */
-    private String staleMillis = "0";
+    private int staleMillis = 0;
     
     protected abstract List getClasspathElements();
 
@@ -121,10 +117,7 @@
             compilerConfiguration.addCompilerOption( "-target", target );
         }
 
-        if ( debug != null && Boolean.valueOf( debug ).booleanValue() )
-        {
-            compilerConfiguration.setDebug( true );
-        }
+        compilerConfiguration.setDebug( debug );
 
         List messages = null;
         try
@@ -158,24 +151,9 @@
     private Set computeStaleSources()
         throws MojoExecutionException
     {
-        long staleTime = 0;
-
-        if ( staleMillis != null && staleMillis.length() > 0 )
-        {
-            try
-            {
-                staleTime = Long.parseLong( staleMillis );
-            }
-            catch ( NumberFormatException e )
-            {
-                throw new MojoExecutionException( "Invalid staleMillis plugin parameter value: \'" + staleMillis
-                    + "\'", e );
-            }
-
-        }
         SuffixMapping mapping = new SuffixMapping( ".java", ".class" );
 
-        SourceInclusionScanner scanner = new StaleSourceScanner( staleTime );
+        SourceInclusionScanner scanner = new StaleSourceScanner( staleMillis );
 
         scanner.addSourceMapping( mapping );
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org