From 1beb540cd6584dc7246fecda16a0d10bd6ff6f3a Mon Sep 17 00:00:00 2001 From: Peter Reilly Date: Fri, 24 Sep 2004 08:17:34 +0000 Subject: [PATCH] checkstyle git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276881 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/Main.java | 35 ++++++++++++++----------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/src/main/org/apache/tools/ant/Main.java b/src/main/org/apache/tools/ant/Main.java index fb2276749..2da9bbad6 100644 --- a/src/main/org/apache/tools/ant/Main.java +++ b/src/main/org/apache/tools/ant/Main.java @@ -117,7 +117,7 @@ public class Main implements AntMain { /** * optional thread priority */ - private Integer threadPriority=null; + private Integer threadPriority = null; /** * Prints the message of the Throwable if it (the message) is not @@ -410,18 +410,18 @@ public class Main implements AntMain { keepGoingMode = true; } else if (arg.equals("-nice")) { try { - threadPriority=Integer.decode(args[i + 1]); + threadPriority = Integer.decode(args[i + 1]); } catch (ArrayIndexOutOfBoundsException aioobe) { throw new BuildException( - "You must supply a niceness value (1-10)"+ - " after the -nice option"); + "You must supply a niceness value (1-10)" + + " after the -nice option"); } catch (NumberFormatException e) { - throw new BuildException("Unrecognized niceness value: " + - args[i + 1]); + throw new BuildException("Unrecognized niceness value: " + + args[i + 1]); } i++; - if(threadPriority.intValue()Thread.MAX_PRIORITY) { + if (threadPriority.intValue() < Thread.MIN_PRIORITY + || threadPriority.intValue() > Thread.MAX_PRIORITY) { throw new BuildException( "Niceness value is out of the range 1-10"); } @@ -631,7 +631,7 @@ public class Main implements AntMain { if (threadPriority != null) { try { project.log("Setting Ant's thread priority to " - + threadPriority,Project.MSG_VERBOSE); + + threadPriority, Project.MSG_VERBOSE); Thread.currentThread().setPriority(threadPriority.intValue()); } catch (SecurityException swallowed) { //we cannot set the priority here. @@ -814,12 +814,15 @@ public class Main implements AntMain { msg.append(" -quiet, -q be extra quiet" + lSep); msg.append(" -verbose, -v be extra verbose" + lSep); msg.append(" -debug, -d print debugging information" + lSep); - msg.append(" -emacs, -e produce logging information without adornments" + lSep); - msg.append(" -lib specifies a path to search for jars and classes" + lSep); + msg.append(" -emacs, -e produce logging information without adornments" + + lSep); + msg.append(" -lib specifies a path to search for jars and classes" + + lSep); msg.append(" -logfile use given file for log" + lSep); msg.append(" -l ''" + lSep); msg.append(" -logger the class which is to perform logging" + lSep); - msg.append(" -listener add an instance of class as a project listener" + lSep); + msg.append(" -listener add an instance of class as a project listener" + + lSep); msg.append(" -noinput do not allow interactive input" + lSep); msg.append(" -buildfile use given buildfile" + lSep); msg.append(" -file ''" + lSep); @@ -832,8 +835,9 @@ public class Main implements AntMain { msg.append(" -inputhandler the class which will handle input requests" + lSep); msg.append(" -find (s)earch for buildfile towards the root of" + lSep); msg.append(" -s the filesystem and use it" + lSep); - msg.append(" -nice number A niceness value for the main thread:" + lSep + - " 1 (lowest) to 10 (highest); 5 is the default" + lSep); + msg.append(" -nice number A niceness value for the main thread:" + lSep + + " 1 (lowest) to 10 (highest); 5 is the default" + + lSep); msg.append(" -nouserlib Run ant within using the jar files from ${user.home}/" + ".ant/lib"); System.out.println(msg.toString()); @@ -1018,7 +1022,8 @@ public class Main implements AntMain { msg.append(" "); msg.append(names.elementAt(i)); if (descriptions != null) { - msg.append(spaces.substring(0, maxlen - ((String) names.elementAt(i)).length() + 2)); + msg.append( + spaces.substring(0, maxlen - ((String) names.elementAt(i)).length() + 2)); msg.append(descriptions.elementAt(i)); } msg.append(lSep);