Jalopy source code formatting - fix a bunch of pmd and checkstyle warnings
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@370221 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
6328abca7c
commit
b8079e792e
32 files changed
+2352
-1903
No files matched your search
@@ -18,9 +18,10 @@ package org.apache.maven.util;
|
||||
*/
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.IOException;
|
||||
|
||||
|
||||
/**
|
||||
* A class to asynchronously read the provided InputStream and
|
||||
@@ -33,7 +34,7 @@ public class AsyncStreamReader extends Thread
|
||||
{
|
||||
/** buffer to dump output to */
|
||||
private StringBuffer streamBuffer = new StringBuffer();
|
||||
|
||||
|
||||
/** stream to read from */
|
||||
private BufferedReader stream;
|
||||
|
||||
@@ -41,34 +42,36 @@ public class AsyncStreamReader extends Thread
|
||||
* Create a reader to process the provided stream
|
||||
* @param anInputStream any input stream
|
||||
*/
|
||||
public AsyncStreamReader(InputStream anInputStream)
|
||||
public AsyncStreamReader( InputStream anInputStream )
|
||||
{
|
||||
if (anInputStream == null)
|
||||
if ( anInputStream == null )
|
||||
{
|
||||
throw new NullPointerException("input stream parameter is null");
|
||||
throw new NullPointerException( "input stream parameter is null" );
|
||||
}
|
||||
stream = new BufferedReader(new InputStreamReader(anInputStream));
|
||||
|
||||
stream = new BufferedReader( new InputStreamReader( anInputStream ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Read lines from the input stream provided, appending to a buffer
|
||||
* for retrieval via the toString() method
|
||||
* for retrieval via the toString() method
|
||||
*/
|
||||
public void run()
|
||||
{
|
||||
String line;
|
||||
|
||||
try
|
||||
{
|
||||
while ((line = stream.readLine()) != null)
|
||||
while ( ( line = stream.readLine() ) != null )
|
||||
{
|
||||
if (okToConsume(line))
|
||||
if ( okToConsume( line ) )
|
||||
{
|
||||
streamBuffer.append(line);
|
||||
streamBuffer.append('\n');
|
||||
streamBuffer.append( line );
|
||||
streamBuffer.append( '\n' );
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (IOException ioe)
|
||||
catch ( IOException ioe )
|
||||
{
|
||||
ioe.printStackTrace();
|
||||
}
|
||||
@@ -89,9 +92,9 @@ public class AsyncStreamReader extends Thread
|
||||
* @param line the line to check.
|
||||
* @return if its ok to add this line to the buffer.
|
||||
*/
|
||||
protected boolean okToConsume(String line)
|
||||
protected boolean okToConsume( String line )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
} // end of AsyncStreamReader
|
||||
}
|
||||
// end of AsyncStreamReader
|
||||
Reference in new issue
Block a user