antoine 2003/09/21 13:20:04 Modified: src/main/org/apache/tools/ant/taskdefs/optional/j2ee AbstractHotDeploymentTool.java GenericHotDeploymentTool.java src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers AntResolver.java src/main/org/apache/tools/ant/types/resolver ApacheCatalogResolver.java src/main/org/apache/tools/ant/types Assertions.java Commandline.java CommandlineJava.java src/main/org/apache/tools/bzip2 CBZip2OutputStream.java src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java Ildasm.java NetCommand.java src/main/org/apache/tools/ant/taskdefs/email EmailTask.java src/main/org/apache/tools/ant/taskdefs Exit.java Java.java RecorderEntry.java src/main/org/apache/tools/ant/util FileUtils.java JAXPUtils.java src/main/org/apache/tools/ant/taskdefs/optional/javacc JJDoc.java JJTree.java src/main/org/apache/tools/ant/taskdefs/optional/junit JUnitTestRunner.java src/main/org/apache/tools/ant/types/selectors MappingSelector.java src/main/org/apache/tools/ant/taskdefs/optional/perforce P4Submit.java src/main/org/apache/tools/ant PropertyHelper.java src/main/org/apache/tools/ant/types/optional/image Scale.java src/main/org/apache/tools/ant/taskdefs/optional/net SetProxy.java src/main/org/apache/tools/ant/taskdefs/condition Socket.java Log: Style Submitted by: Larry Shatzer (larry dot shatzer at spirent dot com) Revision Changes Path 1.9 +9 -6 ant/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/AbstractHotDeploymentTool.java Index: AbstractHotDeploymentTool.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/AbstractHotDeploymentTool.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- AbstractHotDeploymentTool.java 19 Jul 2003 08:11:04 -0000 1.8 +++ AbstractHotDeploymentTool.java 21 Sep 2003 20:20:02 -0000 1.9 @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 2002 The Apache Software Foundation. All rights + * Copyright (c) 2002-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -101,9 +101,9 @@ * @return A Path object representing the classpath to be used. */ public Path createClasspath() { - if (classpath == null) + if (classpath == null) { classpath = new Path(task.getProject()); - + } return classpath.createPath(); } @@ -126,14 +126,17 @@ * @exception org.apache.tools.ant.BuildException if the attributes are invalid or incomplete. */ public void validateAttributes() throws BuildException { - if (task.getAction() == null) + if (task.getAction() == null) { throw new BuildException("The \"action\" attribute must be set"); + } - if (!isActionValid()) + if (!isActionValid()) { throw new BuildException("Invalid action \"" + task.getAction() + "\" passed"); + } - if (classpath == null) + if (classpath == null) { throw new BuildException("The classpath attribute must be set"); + } } /** 1.11 +2 -1 ant/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/GenericHotDeploymentTool.java Index: GenericHotDeploymentTool.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/GenericHotDeploymentTool.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- GenericHotDeploymentTool.java 19 Jul 2003 08:11:04 -0000 1.10 +++ GenericHotDeploymentTool.java 21 Sep 2003 20:20:02 -0000 1.11 @@ -144,8 +144,9 @@ public void validateAttributes() throws BuildException { super.validateAttributes(); - if (className == null) + if (className == null) { throw new BuildException("The classname attribute must be set"); + } } /** 1.6 +3 -4 ant/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/AntResolver.java Index: AntResolver.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/AntResolver.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- AntResolver.java 19 Jul 2003 08:11:04 -0000 1.5 +++ AntResolver.java 21 Sep 2003 20:20:02 -0000 1.6 @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 2002 The Apache Software Foundation. All rights + * Copyright (c) 2002-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -99,8 +99,7 @@ final File dir = m_antfile.getParentFile().getCanonicalFile(); ant.setDir(dir); - } - catch (final IOException ioe) { + } catch (final IOException ioe) { throw new BuildException(ioe.getMessage(), ioe); } 1.12 +3 -5 ant/src/main/org/apache/tools/ant/types/resolver/ApacheCatalogResolver.java Index: ApacheCatalogResolver.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/resolver/ApacheCatalogResolver.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- ApacheCatalogResolver.java 19 Jul 2003 11:20:22 -0000 1.11 +++ ApacheCatalogResolver.java 21 Sep 2003 20:20:02 -0000 1.12 @@ -145,11 +145,9 @@ try { catalog.parseCatalog(file); - } - catch (MalformedURLException ex) { + } catch (MalformedURLException ex) { throw new BuildException(ex); - } - catch (IOException ex) { + } catch (IOException ex) { throw new BuildException(ex); } } 1.6 +5 -5 ant/src/main/org/apache/tools/ant/types/Assertions.java Index: Assertions.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/Assertions.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Assertions.java 1 Aug 2003 06:44:35 -0000 1.5 +++ Assertions.java 21 Sep 2003 20:20:02 -0000 1.6 @@ -187,7 +187,7 @@ * @return */ private int getFinalSize() { - return assertionList.size()+ (enableSystemAssertions!=null?1:0); + return assertionList.size() + (enableSystemAssertions != null ? 1 : 0); } /** @@ -254,16 +254,16 @@ * @throws CloneNotSupportedException */ protected Object clone() throws CloneNotSupportedException { - Assertions that=(Assertions) super.clone(); - that.assertionList=(ArrayList) assertionList.clone(); - return that; + Assertions that = (Assertions) super.clone(); + that.assertionList = (ArrayList) assertionList.clone(); + return that; } /** * base class for our assertion elements. */ - public static abstract class BaseAssertion { + public abstract static class BaseAssertion { private String packageName; private String className; 1.32 +5 -5 ant/src/main/org/apache/tools/ant/types/Commandline.java Index: Commandline.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/Commandline.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- Commandline.java 1 Aug 2003 06:44:36 -0000 1.31 +++ Commandline.java 21 Sep 2003 20:20:02 -0000 1.32 @@ -303,11 +303,11 @@ * Returns the executable and all defined arguments. */ public String[] getCommandline() { - List commands=new LinkedList(); + List commands = new LinkedList(); ListIterator list = commands.listIterator(); addCommandToList(list); final String[] result = new String[commands.size()]; - return (String[])commands.toArray(result); + return (String[]) commands.toArray(result); } /** @@ -316,7 +316,7 @@ * @since Ant 1.6 */ public void addCommandToList(ListIterator list) { - if(executable!=null) { + if (executable != null) { list.add(executable); } addArgumentsToList(list); @@ -331,7 +331,7 @@ List result = new ArrayList(arguments.size() * 2); addArgumentsToList(result.listIterator()); String [] res = new String[result.size()]; - return (String[])result.toArray(res); + return (String[]) result.toArray(res); } /** @@ -374,7 +374,7 @@ if (argument.indexOf("\"") > -1) { if (argument.indexOf("\'") > -1) { throw new BuildException("Can\'t handle single and double" - +" quotes in same argument"); + + " quotes in same argument"); } else { return '\'' + argument + '\''; } 1.47 +13 -13 ant/src/main/org/apache/tools/ant/types/CommandlineJava.java Index: CommandlineJava.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/CommandlineJava.java,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- CommandlineJava.java 13 Aug 2003 15:14:31 -0000 1.46 +++ CommandlineJava.java 21 Sep 2003 20:20:02 -0000 1.47 @@ -96,13 +96,13 @@ /** * any assertions to make? Currently only supported in forked JVMs */ - private Assertions assertions=null; + private Assertions assertions = null; /** * Indicate whether it will execute a jar file or not, in this case * the first vm option must be a -jar and the 'executable' is a jar file. */ - private boolean executeJar = false; + private boolean executeJar = false; /** * Specialized Environment class for System properties @@ -119,13 +119,13 @@ */ public String[] getVariables() throws BuildException { - List definitions=new LinkedList(); - ListIterator list=definitions.listIterator(); + List definitions = new LinkedList(); + ListIterator list = definitions.listIterator(); addDefinitionsToList(list); - if(definitions.size()==0) { + if (definitions.size() == 0) { return null; } else { - return (String[])definitions.toArray(new String[0]); + return (String[]) definitions.toArray(new String[0]); } } @@ -135,8 +135,8 @@ */ public void addDefinitionsToList(ListIterator listIt) { String[] props = super.getVariables(); - if(props!=null) { - for (int i=0; i < props.length; i++) { + if (props != null) { + for (int i = 0; i < props.length; i++) { listIt.add("-D" + props[i]); } } @@ -379,12 +379,12 @@ */ public String[] getCommandline() { //create the list - List commands=new LinkedList(); + List commands = new LinkedList(); final ListIterator listIterator = commands.listIterator(); //fill it addCommandsToList(listIterator); //convert to an array - return (String[])commands.toArray(new String[0]); + return (String[]) commands.toArray(new String[0]); } /** @@ -503,8 +503,8 @@ size++; } //assertions take up space too - if(getAssertions()!=null) { - size+=getAssertions().size(); + if (getAssertions() != null) { + size += getAssertions().size(); } return size; } @@ -582,7 +582,7 @@ if (bootclasspath != null) { c.bootclasspath = (Path) bootclasspath.clone(); } - if( assertions != null ) { + if (assertions != null) { c.assertions = (Assertions) assertions.clone(); } return c; 1.18 +8 -8 ant/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java Index: CBZip2OutputStream.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- CBZip2OutputStream.java 24 Jul 2003 14:20:56 -0000 1.17 +++ CBZip2OutputStream.java 21 Sep 2003 20:20:02 -0000 1.18 @@ -204,10 +204,10 @@ weight[nNodes] = ((weight[n1] & 0xffffff00) + (weight[n2] & 0xffffff00)) - | (1 + (((weight[n1] & 0x000000ff) > - (weight[n2] & 0x000000ff)) ? - (weight[n1] & 0x000000ff) : - (weight[n2] & 0x000000ff))); + | (1 + (((weight[n1] & 0x000000ff) + > (weight[n2] & 0x000000ff)) + ? (weight[n1] & 0x000000ff) + : (weight[n2] & 0x000000ff))); parent[nNodes] = -1; nHeap++; @@ -1246,8 +1246,8 @@ vv = runningOrder[i]; j = i; while ((ftab[((runningOrder[j - h]) + 1) << 8] - - ftab[(runningOrder[j - h]) << 8]) > - (ftab[((vv) + 1) << 8] - ftab[(vv) << 8])) { + - ftab[(runningOrder[j - h]) << 8]) + > (ftab[((vv) + 1) << 8] - ftab[(vv) << 8])) { runningOrder[j] = runningOrder[j - h]; j = j - h; if (j <= (h - 1)) { @@ -1535,9 +1535,9 @@ because the number of elems to sort is usually small, typically <= 20. */ - private int[] incs = { 1, 4, 13, 40, 121, 364, 1093, 3280, + private int[] incs = {1, 4, 13, 40, 121, 364, 1093, 3280, 9841, 29524, 88573, 265720, - 797161, 2391484 }; + 797161, 2391484}; private void allocateCompressStructures () { int n = baseBlockSize * blockSize100k; 1.16 +2 -2 ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java Index: DotnetCompile.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- DotnetCompile.java 20 Sep 2003 16:40:42 -0000 1.15 +++ DotnetCompile.java 21 Sep 2003 20:20:03 -0000 1.16 @@ -394,7 +394,7 @@ [EMAIL PROTECTED] The Parameter to CSC */ protected String getIncludeDefaultReferencesParameter() { - if(standardLib==null) { + if (standardLib == null) { return "/nostdlib" + (includeDefaultReferences ? "-" : "+"); } else { return null; @@ -868,7 +868,7 @@ if (outputFile != null && outputFile.isDirectory()) { throw new BuildException("destFile cannot be a directory"); } - if(getExecutable()==null) { + if (getExecutable() == null) { throw new BuildException("There is no executable defined for this task"); } } 1.3 +29 -29 ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ildasm.java Index: Ildasm.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ildasm.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Ildasm.java 20 Sep 2003 16:40:42 -0000 1.2 +++ Ildasm.java 21 Sep 2003 20:20:03 -0000 1.3 @@ -105,7 +105,7 @@ /** * progress bar switch */ - private boolean progressBar=false; + private boolean progressBar = false; /** * what is our encoding @@ -116,45 +116,45 @@ * /bytes flag for byte markup */ - private boolean bytes=false; + private boolean bytes = false; /** * line numbers? /linenum */ - private boolean linenumbers=false; + private boolean linenumbers = false; /** * /raweh flag for raw exception handling */ - private boolean rawExceptionHandling=false; + private boolean rawExceptionHandling = false; /** * show the source; /source */ - private boolean showSource=false; + private boolean showSource = false; /** * /quoteallnames to quote all names */ - private boolean quoteallnames=false; + private boolean quoteallnames = false; /** * /header for header information */ - private boolean header=false; + private boolean header = false; /** * when false, sets the /noil attribute * to suppress assembly info */ - private boolean assembler=true; + private boolean assembler = true; /** * include metadata * /tokens */ - private boolean metadata=false; + private boolean metadata = false; /** * what visibility do we want. @@ -171,7 +171,7 @@ /** * override for the executable */ - private String executable="ildasm"; + private String executable = "ildasm"; /** * name of the directory for resources to be created. We cannot control @@ -338,13 +338,13 @@ * verify that source and dest are ok */ private void validate() { - if(sourceFile==null || !sourceFile.exists() || !sourceFile.isFile()) { + if (sourceFile == null || !sourceFile.exists() || !sourceFile.isFile()) { throw new BuildException("invalid source"); } - if(destFile==null || destFile.isDirectory()) { + if (destFile == null || destFile.isDirectory()) { throw new BuildException("invalid dest"); } - if(resourceDir!=null + if (resourceDir != null && (!resourceDir.exists() || !resourceDir.isDirectory())) { throw new BuildException("invalid resource directory"); } @@ -355,13 +355,13 @@ * @return */ private boolean isDisassemblyNeeded() { - if(!destFile.exists()) { + if (!destFile.exists()) { return true; } - long sourceTime=sourceFile.lastModified(); - long destTime=destFile.lastModified(); - return sourceTime>(destTime+ FileUtils.newFileUtils().getFileTimestampGranularity()); - + long sourceTime = sourceFile.lastModified(); + long destTime = destFile.lastModified(); + return sourceTime > (destTime + FileUtils.newFileUtils().getFileTimestampGranularity()); + } /** * do the work @@ -373,11 +373,11 @@ command.setFailOnError(true); //fill in args command.addArgument("/text"); - command.addArgument("/out="+destFile.toString()); - if(!progressBar) { + command.addArgument("/out=" + destFile.toString()); + if (!progressBar) { command.addArgument("/nobar"); } - if(linenumbers) { + if (linenumbers) { command.addArgument("/linenum"); } if (showSource) { @@ -395,7 +395,7 @@ if (metadata) { command.addArgument("/tokens"); } - command.addArgument("/item:",item); + command.addArgument("/item:", item); if (rawExceptionHandling) { command.addArgument("/raweh"); } @@ -403,16 +403,16 @@ if (bytes) { command.addArgument("/bytes"); } - command.addArgument("/vis:",visibility); + command.addArgument("/vis:", visibility); //add the source file command.addArgument(sourceFile.getAbsolutePath()); //determine directory: resourceDir if set, //the dir of the destFile if not - File execDir=resourceDir; - if(execDir==null) { - execDir=destFile.getParentFile(); + File execDir = resourceDir; + if (execDir == null) { + execDir = destFile.getParentFile(); } command.setDirectory(execDir); @@ -421,7 +421,7 @@ command.runCommand(); } catch (BuildException e) { //forcibly delete the output file in case of trouble - if(destFile.exists()) { + if (destFile.exists()) { destFile.delete(); } //then rethrow the exception @@ -434,7 +434,7 @@ * encoding options; the default is ascii */ public static class EncodingTypes extends EnumeratedAttribute { - public final static String UNICODE= "unicode"; + public final static String UNICODE = "unicode"; public final static String UTF8 = "utf8"; public final static String ASCII = "ascii"; public String[] getValues() { @@ -451,7 +451,7 @@ * @return */ public static String getEncodingOption(String enumValue) { - if(UNICODE.equals(enumValue)) { + if (UNICODE.equals(enumValue)) { return "/unicode"; } if (UTF8.equals(enumValue)) { 1.25 +1 -1 ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java Index: NetCommand.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- NetCommand.java 20 Sep 2003 16:40:42 -0000 1.24 +++ NetCommand.java 21 Sep 2003 20:20:03 -0000 1.25 @@ -244,7 +244,7 @@ } File dir = owner.getProject().getBaseDir(); if (directory != null) { - dir=directory; + dir = directory; } ExecuteStreamHandler handler = new LogStreamHandler(owner, 1.25 +1 -2 ant/src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java Index: EmailTask.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- EmailTask.java 17 Sep 2003 20:11:43 -0000 1.24 +++ EmailTask.java 21 Sep 2003 20:20:03 -0000 1.25 @@ -602,8 +602,7 @@ if (failOnError) { throw e; } - } - catch (Exception e) { + } catch (Exception e) { log("Failed to send email", Project.MSG_WARN); if (failOnError) { throw new BuildException(e); 1.25 +8 -8 ant/src/main/org/apache/tools/ant/taskdefs/Exit.java Index: Exit.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Exit.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- Exit.java 13 Sep 2003 12:58:33 -0000 1.24 +++ Exit.java 21 Sep 2003 20:20:03 -0000 1.25 @@ -117,24 +117,24 @@ */ public void execute() throws BuildException { if (testIfCondition() && testUnlessCondition()) { - String text=null; + String text = null; if (message != null && message.length() > 0) { - text=message; + text = message; } else { - if(getProject().getProperty(ifCondition) != null) { - text="if="+ifCondition; + if (getProject().getProperty(ifCondition) != null) { + text = "if=" + ifCondition; } - if (unlessCondition!=null && unlessCondition.length()>0 + if (unlessCondition != null && unlessCondition.length() > 0 && getProject().getProperty(unlessCondition) == null) { if (text == null) { text = ""; } else { - text+=" and "; + text += " and "; } - text+="unless="+unlessCondition; + text += "unless=" + unlessCondition; } else { - if(text==null) { + if (text == null) { text = "No message"; } } 1.77 +2 -2 ant/src/main/org/apache/tools/ant/taskdefs/Java.java Index: Java.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Java.java,v retrieving revision 1.76 retrieving revision 1.77 diff -u -r1.76 -r1.77 --- Java.java 18 Sep 2003 14:21:41 -0000 1.76 +++ Java.java 21 Sep 2003 20:20:03 -0000 1.77 @@ -157,8 +157,8 @@ + "not compatible with spawn"); } if (fork) { - if(perm != null) { - log("Permissions can not be set this way in forked mode.",Project.MSG_WARN); + if (perm != null) { + log("Permissions can not be set this way in forked mode.", Project.MSG_WARN); } log(cmdl.describeCommand(), Project.MSG_VERBOSE); } else { 1.11 +2 -2 ant/src/main/org/apache/tools/ant/taskdefs/RecorderEntry.java Index: RecorderEntry.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/RecorderEntry.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- RecorderEntry.java 19 Jul 2003 08:10:59 -0000 1.10 +++ RecorderEntry.java 21 Sep 2003 20:20:03 -0000 1.11 @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 2001-2002 The Apache Software Foundation. All rights + * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -82,7 +82,7 @@ /** The output PrintStream to record to. */ private PrintStream out = null; /** The start time of the last know target. */ - private long targetStartTime = 0l; + private long targetStartTime = 0L; /** Strip task banners if true. */ private boolean emacsMode = false; 1.56 +3 -3 ant/src/main/org/apache/tools/ant/util/FileUtils.java Index: FileUtils.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/FileUtils.java,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- FileUtils.java 6 Sep 2003 07:03:33 -0000 1.55 +++ FileUtils.java 21 Sep 2003 20:20:03 -0000 1.56 @@ -114,7 +114,7 @@ /** * the granularity of timestamps under FAT */ - public static final long FAT_FILE_TIMESTAMP_GRANULARITY=2000; + public static final long FAT_FILE_TIMESTAMP_GRANULARITY = 2000; // stolen from FilePathToURI of the Xerces-J team @@ -1334,7 +1334,7 @@ } public long getFileTimestampGranularity() { - if(Os.isFamily("dos")) { + if (Os.isFamily("dos")) { return FAT_FILE_TIMESTAMP_GRANULARITY; } else { return 0; 1.9 +2 -2 ant/src/main/org/apache/tools/ant/util/JAXPUtils.java Index: JAXPUtils.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/JAXPUtils.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- JAXPUtils.java 17 Jul 2003 15:44:44 -0000 1.8 +++ JAXPUtils.java 21 Sep 2003 20:20:03 -0000 1.9 @@ -106,7 +106,7 @@ * * @since Ant 1.5 */ - public synchronized static SAXParserFactory getParserFactory() + public static synchronized SAXParserFactory getParserFactory() throws BuildException { if (parserFactory == null) { @@ -123,7 +123,7 @@ * * @since Ant 1.6 */ - public synchronized static SAXParserFactory getNSParserFactory() + public static synchronized SAXParserFactory getNSParserFactory() throws BuildException { if (nsParserFactory == null) { 1.5 +7 -7 ant/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJDoc.java Index: JJDoc.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJDoc.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- JJDoc.java 13 Sep 2003 12:37:04 -0000 1.4 +++ JJDoc.java 21 Sep 2003 20:20:03 -0000 1.5 @@ -73,7 +73,7 @@ * * @author Jene Jasper <a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a> * @author [EMAIL PROTECTED] - * @author Michael Saunders + * @author Michael Saunders * <a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a> */ public class JJDoc extends Task { @@ -156,12 +156,12 @@ } if (outputFile != null) { - cmdl.createArgument() .setValue("-" + OUTPUT_FILE + ":" + cmdl.createArgument() .setValue("-" + OUTPUT_FILE + ":" + outputFile.replace('\\', '/')); } // use the directory containing the target as the output directory - File javaFile = new File(createOutputFileName(target, outputFile, + File javaFile = new File(createOutputFileName(target, outputFile, plainText)); if (javaFile.exists() @@ -173,7 +173,7 @@ cmdl.createArgument().setValue(target.getAbsolutePath()); - cmdl.setClassname(JavaCC.getMainClass(javaccHome, + cmdl.setClassname(JavaCC.getMainClass(javaccHome, JavaCC.TASKDEF_TYPE_JJDOC)); final Path classpath = cmdl.createClasspath(getProject()); @@ -205,7 +205,7 @@ private String createOutputFileName(File target, String optionalOutputFile, boolean plainText) { String suffix = DEFAULT_SUFFIX_HTML; - String javaccFile = target.getAbsolutePath().replace('\\','/'); + String javaccFile = target.getAbsolutePath().replace('\\', '/'); if (plainText) { suffix = DEFAULT_SUFFIX_TEXT; @@ -228,12 +228,12 @@ if (currentSuffix.equals(suffix)) { optionalOutputFile = javaccFile + suffix; } else { - optionalOutputFile = javaccFile.substring(0, suffixPos) + optionalOutputFile = javaccFile.substring(0, suffixPos) + suffix; } } } else { - optionalOutputFile = optionalOutputFile.replace('\\','/'); + optionalOutputFile = optionalOutputFile.replace('\\', '/'); } return (getProject().getBaseDir() + "/" + optionalOutputFile) 1.28 +4 -4 ant/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java Index: JJTree.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- JJTree.java 22 Aug 2003 15:25:44 -0000 1.27 +++ JJTree.java 21 Sep 2003 20:20:03 -0000 1.28 @@ -308,7 +308,7 @@ String outputDirectory) { optionalOutputFile = validateOutputFile(optionalOutputFile, outputDirectory); - String jjtreeFile = target.getAbsolutePath().replace('\\','/'); + String jjtreeFile = target.getAbsolutePath().replace('\\', '/'); if ((optionalOutputFile == null) || optionalOutputFile.equals("")) { int filePos = jjtreeFile.lastIndexOf("/"); @@ -340,7 +340,7 @@ return (outputDirectory + "/" + optionalOutputFile).replace('\\', '/'); } - /* + /* * Not used anymore private boolean isAbsolute(String fileName) { return (fileName.startsWith("/") || (new File(fileName).isAbsolute())); @@ -357,8 +357,8 @@ * @return * @throws BuildException */ - private String validateOutputFile(String outputFile, - String outputDirectory) + private String validateOutputFile(String outputFile, + String outputDirectory) throws BuildException { if (outputFile == null) { return null; 1.42 +4 -4 ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java Index: JUnitTestRunner.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- JUnitTestRunner.java 27 Aug 2003 14:23:17 -0000 1.41 +++ JUnitTestRunner.java 21 Sep 2003 20:20:03 -0000 1.42 @@ -318,16 +318,16 @@ } perm = null; } else { - if(perm != null) { + if (perm != null) { perm.setSecurityManager(); } } - + try { suite.run(res); } finally { - if(perm != null) { + if (perm != null) { perm.restoreSecurityManager(); } if (savedOut != null) { @@ -413,7 +413,7 @@ res.stop(); } } - + /** * Permissions for the test run. * @since Ant 1.6 1.9 +1 -1 ant/src/main/org/apache/tools/ant/types/selectors/MappingSelector.java Index: MappingSelector.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/selectors/MappingSelector.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- MappingSelector.java 10 Sep 2003 15:29:25 -0000 1.8 +++ MappingSelector.java 21 Sep 2003 20:20:03 -0000 1.9 @@ -78,7 +78,7 @@ * */ public MappingSelector() { - granularity=(int) FileUtils.newFileUtils().getFileTimestampGranularity(); + granularity = (int) FileUtils.newFileUtils().getFileTimestampGranularity(); } 1.16 +2 -3 ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Submit.java Index: P4Submit.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Submit.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- P4Submit.java 14 Jul 2003 22:13:18 -0000 1.15 +++ P4Submit.java 21 Sep 2003 20:20:03 -0000 1.16 @@ -136,9 +136,8 @@ found = true; } } - } - // NumberFormatException or ArrayOutOfBondsException could happen here - catch (Exception e) { + // NumberFormatException or ArrayOutOfBondsException could happen here + } catch (Exception e) { String msg = "Failed to parse " + line + "\n" + " due to " + e.getMessage(); throw new BuildException(msg, e, getLocation()); 1.9 +1 -1 ant/src/main/org/apache/tools/ant/PropertyHelper.java Index: PropertyHelper.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/PropertyHelper.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- PropertyHelper.java 12 Sep 2003 20:56:45 -0000 1.8 +++ PropertyHelper.java 21 Sep 2003 20:20:03 -0000 1.9 @@ -156,7 +156,7 @@ * * @return the project's property helper. */ - public synchronized static + public static synchronized PropertyHelper getPropertyHelper(Project project) { PropertyHelper helper = (PropertyHelper) project.getReference("ant.PropertyHelper"); 1.8 +8 -11 ant/src/main/org/apache/tools/ant/types/optional/image/Scale.java Index: Scale.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/optional/image/Scale.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Scale.java 10 Sep 2003 15:29:25 -0000 1.7 +++ Scale.java 21 Sep 2003 20:20:03 -0000 1.8 @@ -83,7 +83,7 @@ /** * Sets the behaviour regarding the image proportions. */ - public void setProportions(ProportionsAttribute pa){ + public void setProportions(ProportionsAttribute pa) { proportions = pa.getValue(); } @@ -139,23 +139,20 @@ y_fl = (y_fl / image.getHeight()); } - if("width".equals(proportions)){ + if ("width".equals(proportions)) { y_fl = x_fl; - } - else if("height".equals(proportions)){ + } else if ("height".equals(proportions)) { x_fl = y_fl; - } - else if("fit".equals(proportions)){ - x_fl = y_fl = Math.min(x_fl,y_fl); - } - else if("cover".equals(proportions)){ - x_fl = y_fl = Math.max(x_fl,y_fl); + } else if ("fit".equals(proportions)) { + x_fl = y_fl = Math.min(x_fl, y_fl); + } else if ("cover".equals(proportions)) { + x_fl = y_fl = Math.max(x_fl, y_fl); } pb.add(new Float(x_fl)); pb.add(new Float(y_fl)); - log("\tScaling to " + (x_fl*100) + "% x " + (y_fl*100)+ "%"); + log("\tScaling to " + (x_fl * 100) + "% x " + (y_fl * 100) + "%"); return JAI.create("scale", pb); } 1.17 +4 -8 ant/src/main/org/apache/tools/ant/taskdefs/optional/net/SetProxy.java Index: SetProxy.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/net/SetProxy.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- SetProxy.java 19 Jul 2003 11:20:20 -0000 1.16 +++ SetProxy.java 21 Sep 2003 20:20:03 -0000 1.17 @@ -301,17 +301,13 @@ Method reset = c.getMethod("resetProperties", null); reset.invoke(null, null); return true; - } - catch (ClassNotFoundException cnfe) { + } catch (ClassNotFoundException cnfe) { return false; - } - catch (NoSuchMethodException e) { + } catch (NoSuchMethodException e) { return false; - } - catch (IllegalAccessException e) { + } catch (IllegalAccessException e) { return false; - } - catch (InvocationTargetException e) { + } catch (InvocationTargetException e) { return false; } } 1.9 +3 -5 ant/src/main/org/apache/tools/ant/taskdefs/condition/Socket.java Index: Socket.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/condition/Socket.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Socket.java 10 Sep 2003 18:20:46 -0000 1.8 +++ Socket.java 21 Sep 2003 20:20:03 -0000 1.9 @@ -108,13 +108,11 @@ s = new java.net.Socket(server, port); } catch (IOException e) { return false; - } - finally { - if (s != null){ + } finally { + if (s != null) { try { s.close(); - } - catch (IOException ioe){ + } catch (IOException ioe) { // Intentionally left blank } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]