Author: peterreilly Date: Sat Aug 11 05:46:56 2007 New Revision: 564907 URL: http://svn.apache.org/viewvc?view=rev&rev=564907 Log: checkstyle
Modified: ant/core/trunk/src/main/org/apache/tools/ant/launch/Locator.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/launch/Locator.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/launch/Locator.java?view=diff&rev=564907&r1=564906&r2=564907 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/launch/Locator.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/launch/Locator.java Sat Aug 11 05:46:56 2007 @@ -28,6 +28,7 @@ import java.text.StringCharacterIterator; import java.util.Locale; +// CheckStyle:LineLengthCheck OFF - urls are long! /** * The Locator is a utility class which is used to find certain items * in the environment. @@ -44,6 +45,7 @@ * Be very careful when making changes to this class, as a break will upset a lot of people. * @since Ant 1.6 */ +// CheckStyle:LineLengthCheck ON - urls are long! public final class Locator { /** * encoding used to represent URIs @@ -59,7 +61,9 @@ private static char[] gAfterEscaping2 = new char[128]; private static char[] gHexChs = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; - public static final String ERROR_NOT_FILE_URI = "Can only handle valid file: URIs, not "; + /** Error string used when an invalid uri is seen */ + public static final String ERROR_NOT_FILE_URI + = "Can only handle valid file: URIs, not "; // initialize the above 3 arrays static { @@ -202,9 +206,11 @@ Throwable e2 = e.getTargetException(); if (e2 instanceof IllegalArgumentException) { // Bad URI, pass this on. - // no, this is downgraded to a warning after various JRE bugs surfaced. Hand off + // no, this is downgraded to a warning after various + // JRE bugs surfaced. Hand off // to our built in code on a failure - //throw new IllegalArgumentException("Bad URI " + uri + ":" + e2.getMessage(), e2); + //throw new IllegalArgumentException( + // "Bad URI " + uri + ":" + e2.getMessage(), e2); e2.printStackTrace(); } else { @@ -235,7 +241,7 @@ // Ignore malformed exception } if (url == null || !("file".equals(url.getProtocol()))) { - throw new IllegalArgumentException(ERROR_NOT_FILE_URI +uri); + throw new IllegalArgumentException(ERROR_NOT_FILE_URI + uri); } StringBuffer buf = new StringBuffer(url.getHost()); if (buf.length() > 0) { @@ -262,8 +268,9 @@ } catch (UnsupportedEncodingException exc) { // not sure whether this is clean, but this method is // declared not to throw exceptions. - throw new IllegalStateException("Could not convert URI "+uri+" to path: " - + exc.getMessage()); + throw new IllegalStateException( + "Could not convert URI " + uri + " to path: " + + exc.getMessage()); } return path; } @@ -415,7 +422,8 @@ } // couldn't find compiler - try to find tools.jar // based on java.home setting - String libToolsJar= File.separator + "lib" + File.separator + "tools.jar"; + String libToolsJar + = File.separator + "lib" + File.separator + "tools.jar"; String javaHome = System.getProperty("java.home"); File toolsJar = new File(javaHome + libToolsJar); if (toolsJar.exists()) { @@ -424,7 +432,7 @@ } if (javaHome.toLowerCase(Locale.US).endsWith(File.separator + "jre")) { javaHome = javaHome.substring(0, javaHome.length() - 4); - toolsJar = new File(javaHome + libToolsJar ); + toolsJar = new File(javaHome + libToolsJar); } if (!toolsJar.exists()) { System.out.println("Unable to locate tools.jar. " Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java?view=diff&rev=564907&r1=564906&r2=564907 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java Sat Aug 11 05:46:56 2007 @@ -281,16 +281,16 @@ */ protected String[] filterJvmCompilerArgs(String[] compilerArgs) { int len = compilerArgs.length; - List args=new ArrayList(len); - for(int i=0;i<len;i++) { - String arg=compilerArgs[i]; - if(!arg.startsWith("-J")) { + List args = new ArrayList(len); + for (int i = 0; i < len; i++) { + String arg = compilerArgs[i]; + if (!arg.startsWith("-J")) { args.add(arg); } else { - attributes.log("Dropping "+arg+" from compiler arguments"); + attributes.log("Dropping " + arg + " from compiler arguments"); } } - int count=args.size(); + int count = args.size(); return (String[]) args.toArray(new String[count]); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]