Fix checkstyle errors

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@116080 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
aheritier 2004-09-26 13:47:13 +00:00
parent 4725c43903
commit 8511c60892
3 changed files with 60 additions and 19 deletions

View File

@ -1,5 +1,22 @@
package org.apache.maven.javadoc;
/* ====================================================================
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*/
import org.apache.commons.collections.set.ListOrderedSet;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils;
@ -41,7 +58,7 @@ import java.util.TreeMap;
* Converts the javadoc warnings into an xml (xdoc format) file.
*
* @author Steven Caswell (stevencaswell at apache.org)
* @version $Id: JavadocWarningsTextToXml.java,v 1.4 2004/09/05 21:00:34 felipeal Exp $
* @version $Id: JavadocWarningsTextToXml.java,v 1.5 2004/09/26 13:47:13 aheritier Exp $
*/
public class JavadocWarningsTextToXml
{
@ -85,7 +102,6 @@ public class JavadocWarningsTextToXml
*
* @throws IOException if an exception occurs opening, reading, or writing
* files
* @throws IllegalArgumentException if arguments aren't correctly setted.
*/
public static void main(final String[] args)
throws IOException
@ -108,17 +124,17 @@ public class JavadocWarningsTextToXml
* Sets the name of the input file. This file is expected to be a report
* generated by Javadoc.
*
* @param inputFileName the input file name
* @param inputFileNameValue the input file name
*/
public void setInputFileName(final String inputFileName)
public void setInputFileName(final String inputFileNameValue)
{
if (this.isVerbose())
{
System.out.println("Setting input file name: '" + inputFileName
System.out.println("Setting input file name: '" + inputFileNameValue
+ "'");
}
this.inputFileName = inputFileName;
this.inputFileName = inputFileNameValue;
}
/**
@ -134,11 +150,11 @@ public class JavadocWarningsTextToXml
/**
* Sets the output encoding.
*
* @param outputEncoding the output encoding
* @param outputEncodingValue the output encoding
*/
public void setOutputEncoding(final String outputEncoding)
public void setOutputEncoding(final String outputEncodingValue)
{
this.outputEncoding = outputEncoding;
this.outputEncoding = outputEncodingValue;
}
/**
@ -154,17 +170,17 @@ public class JavadocWarningsTextToXml
/**
* Sets the output file name.
*
* @param outputFileName the output file name
* @param outputFileNameValue the output file name
*/
public void setOutputFileName(final String outputFileName)
public void setOutputFileName(final String outputFileNameValue)
{
if (this.isVerbose())
{
System.out.println("Setting output file name: '" + outputFileName
System.out.println("Setting output file name: '" + outputFileNameValue
+ "'");
}
this.outputFileName = outputFileName;
this.outputFileName = outputFileNameValue;
}
/**
@ -180,11 +196,11 @@ public class JavadocWarningsTextToXml
/**
* Sets the verbose mode. <br>
*
* @param verbose the verbose mode.
* @param verboseValue the verbose mode.
*/
public void setVerbose(final boolean verbose)
public void setVerbose(final boolean verboseValue)
{
this.verbose = verbose;
this.verbose = verboseValue;
if (this.isVerbose())
{
@ -199,7 +215,6 @@ public class JavadocWarningsTextToXml
* reading or the output file cannot be opened for writing
* @throws IOException if an error occurs reading or writing
* @throws UnsupportedEncodingException if an unknown encoding was specified
* @throws IllegalArgumentException If a needed property isn't setted.
*/
public void build()
throws FileNotFoundException, IOException, UnsupportedEncodingException
@ -232,6 +247,11 @@ public class JavadocWarningsTextToXml
return verbose;
}
/**
* Build a Map from the javadoc report lines.
* @param input the lines
* @return the Map of files with javadoc errors.
*/
private Map buildMap(final String[] input)
{
if (this.isVerbose())
@ -308,6 +328,12 @@ public class JavadocWarningsTextToXml
return files;
}
/**
* Build the output on the disk.
* @param fileMap The map containing the results.
* @throws FileNotFoundException If the file cannot be created.
* @throws UnsupportedEncodingException If the encoding isn't supported.
*/
private void buildOutput(final Map fileMap)
throws FileNotFoundException, UnsupportedEncodingException
{
@ -327,6 +353,12 @@ public class JavadocWarningsTextToXml
out.close();
}
/**
* Extract warning lines from the javadoc result.
* @return a table of lines.
* @throws FileNotFoundException If the javadoc result can't be read.
* @throws IOException If there's a problem while reading the javadoc result.
*/
private String[] readInput()
throws FileNotFoundException, IOException
{
@ -361,6 +393,11 @@ public class JavadocWarningsTextToXml
return (String[]) lines.toArray(new String[lines.size()]);
}
/**
* Write the file map on the output
* @param fileMap The filemap to translate in XML.
* @param out The output to write.
*/
private void writeOutput(final Map fileMap, final PrintWriter out)
{
if (this.isVerbose())

View File

@ -0,0 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<title>Package documentation</title>
<body><p>This package contains the Javadoc plugin classes.</p></body>
</html>

View File

@ -1,6 +1,5 @@
package org.apache.maven.javadoc;
/* ====================================================================
* Copyright 2001-2004 The Apache Software Foundation.
*
@ -31,7 +30,7 @@ import java.io.FileReader;
* Test case.
*
* @author Steven Caswell
* @version $Id: JavadocWarningsTextToXmlTest.java,v 1.2 2004/09/05 21:00:34 felipeal Exp $
* @version $Id: JavadocWarningsTextToXmlTest.java,v 1.3 2004/09/26 13:47:13 aheritier Exp $
*/
public class JavadocWarningsTextToXmlTest extends TestCase
{