Author: ltheussl
Date: Sun Jan 22 00:04:40 2006
New Revision: 371231
URL: http://svn.apache.org/viewcvs?rev=371231&view=rev
Log:
Source code formatting
Modified:
maven/maven-1/plugins/trunk/simian/src/main/org/apache/maven/simian/FileSimianTask.java
maven/maven-1/plugins/trunk/simian/src/test/org/apache/maven/simian/English.java
maven/maven-1/plugins/trunk/simian/src/test/org/apache/maven/simian/ExcludeMe.java
maven/maven-1/plugins/trunk/simian/src/test/org/apache/maven/simian/FileUtils.java
maven/maven-1/plugins/trunk/simian/src/test/org/apache/maven/simian/Francais.java
Modified:
maven/maven-1/plugins/trunk/simian/src/main/org/apache/maven/simian/FileSimianTask.java
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/simian/src/main/org/apache/maven/simian/FileSimianTask.java?rev=371231&r1=371230&r2=371231&view=diff
==============================================================================
---
maven/maven-1/plugins/trunk/simian/src/main/org/apache/maven/simian/FileSimianTask.java
(original)
+++
maven/maven-1/plugins/trunk/simian/src/main/org/apache/maven/simian/FileSimianTask.java
Sun Jan 22 00:04:40 2006
@@ -19,12 +19,11 @@
import au.com.redhillconsulting.simian.SimianTask;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileNotFoundException;
-
import org.apache.tools.ant.BuildException;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
/**
* Simian Task that writes the output to a file.
@@ -32,23 +31,24 @@
* @author Aslak Hellesoy
* @version $Revision$
*/
-public class FileSimianTask extends SimianTask
+public class FileSimianTask extends SimianTask
{
-
- /**
- * Make sure the directory structure exists and
- * send the output to a specified file.
- */
- public void setOutput(File output)
+ /**
+ * Make sure the directory structure exists and
+ * send the output to a specified file.
+ */
+ public void setOutput( File output )
{
output.getParentFile().mkdirs();
- try
+
+ try
{
- setOutput(new FileOutputStream(output));
- }
- catch (FileNotFoundException e)
+ setOutput( new FileOutputStream( output ) );
+ }
+ catch ( FileNotFoundException e )
{
- throw new BuildException("Couldn't set output to " +
output.getAbsolutePath(), e);
+ throw new BuildException( "Couldn't set output to "
+ + output.getAbsolutePath(), e );
}
}
}
Modified:
maven/maven-1/plugins/trunk/simian/src/test/org/apache/maven/simian/English.java
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/simian/src/test/org/apache/maven/simian/English.java?rev=371231&r1=371230&r2=371231&view=diff
==============================================================================
---
maven/maven-1/plugins/trunk/simian/src/test/org/apache/maven/simian/English.java
(original)
+++
maven/maven-1/plugins/trunk/simian/src/test/org/apache/maven/simian/English.java
Sun Jan 22 00:04:40 2006
@@ -22,13 +22,15 @@
* @author Aslak Hellesoy
* @version $Revision$
*/
-public class English {
- public void eleven() {
+public class English
+{
+ public void eleven()
+ {
String one = "one";
String two = "two";
String three = "three";
String four = "four";
- String five= "five";
+ String five = "five";
String six = "six";
String seven = "seven";
String eight = "eight";
@@ -36,24 +38,26 @@
String ten = "ten";
}
- public void ten() {
+ public void ten()
+ {
String one = "one";
String two = "two";
String three = "three";
String four = "four";
- String five= "five";
+ String five = "five";
String six = "six";
String seven = "seven";
String eight = "eight";
String nine = "nine";
}
- public void nine() {
+ public void nine()
+ {
String one = "one";
String two = "two";
String three = "three";
String four = "four";
- String five= "five";
+ String five = "five";
String six = "six";
String seven = "seven";
String eight = "eight";
Modified:
maven/maven-1/plugins/trunk/simian/src/test/org/apache/maven/simian/ExcludeMe.java
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/simian/src/test/org/apache/maven/simian/ExcludeMe.java?rev=371231&r1=371230&r2=371231&view=diff
==============================================================================
---
maven/maven-1/plugins/trunk/simian/src/test/org/apache/maven/simian/ExcludeMe.java
(original)
+++
maven/maven-1/plugins/trunk/simian/src/test/org/apache/maven/simian/ExcludeMe.java
Sun Jan 22 00:04:40 2006
@@ -22,13 +22,15 @@
* @author Eric Pugh
* @version $Revision: 170200 $
*/
-public class ExcludeMe {
- public void iShouldNotBeIncluded() {
+public class ExcludeMe
+{
+ public void iShouldNotBeIncluded()
+ {
String one = "one";
String two = "two";
String three = "three";
String four = "four";
- String five= "five";
+ String five = "five";
String six = "six";
String seven = "seven";
String eight = "eight";
@@ -36,17 +38,16 @@
String ten = "ten";
}
- public void iShouldNotBeIncluded2() {
+ public void iShouldNotBeIncluded2()
+ {
String one = "one";
String two = "two";
String three = "three";
String four = "four";
- String five= "five";
+ String five = "five";
String six = "six";
String seven = "seven";
String eight = "eight";
String nine = "nine";
}
-
-
}
Modified:
maven/maven-1/plugins/trunk/simian/src/test/org/apache/maven/simian/FileUtils.java
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/simian/src/test/org/apache/maven/simian/FileUtils.java?rev=371231&r1=371230&r2=371231&view=diff
==============================================================================
---
maven/maven-1/plugins/trunk/simian/src/test/org/apache/maven/simian/FileUtils.java
(original)
+++
maven/maven-1/plugins/trunk/simian/src/test/org/apache/maven/simian/FileUtils.java
Sun Jan 22 00:04:40 2006
@@ -17,36 +17,47 @@
* ====================================================================
*/
-import java.util.StringTokenizer;
import java.io.File;
+
import java.net.URL;
+import java.util.StringTokenizer;
+
/**
*
* @author Aslak Hellesoy
* @version $Revision$
*/
-public class FileUtils {
+public class FileUtils
+{
/**
* Returns the root directory of the package hierarchy where this class is
* located. This will either be a directory or a jar file.
*
* @return the root directory or jar file where the class is located.
*/
- public static File getRoot(Class clazz)
+ public static File getRoot( Class clazz )
{
File dir;
- URL classURL = clazz.getResource( "/" + clazz.getName().replace( '.',
'/' ) + ".class" );
+ URL classURL =
+ clazz.getResource( "/" + clazz.getName().replace( '.', '/' )
+ + ".class" );
String classFile = classURL.getFile();
- if( classFile.indexOf('!') != -1 ) {
+ if ( classFile.indexOf( '!' ) != -1 )
+ {
// Sometimes (at least on windows) we get file:F:\bla. Convert to
file:/F:/bla
- if( classFile.charAt(5) != '/' ) {
- classFile = "file:/" + classFile.substring(5);
+ if ( classFile.charAt( 5 ) != '/' )
+ {
+ classFile = "file:/" + classFile.substring( 5 );
}
- classFile = classFile.replace( '\\','/' );
- String uriSpec = classFile.substring(0, classFile.indexOf('!'));
- dir = new File( uriSpec );
+
+ classFile = classFile.replace( '\\', '/' );
+
+ String uriSpec = classFile.substring( 0, classFile.indexOf( '!' )
);
+
+ dir = new File( uriSpec );
+
// NOTE: This used to be here, but I've replaced it with the above
single
// line without understanding the ramifications. The code
below needs JDK1.4
//try {
@@ -55,15 +66,19 @@
// System.err.println("Couldn't create URI for " + uriSpec);
// throw new IllegalStateException(e.getMessage());
//}
- } else {
+ }
+ else
+ {
dir = new File( classFile ).getParentFile();
+
StringTokenizer st = new StringTokenizer( clazz.getName(), "." );
- for( int i = 0; i < st.countTokens() - 1; i++ )
+ for ( int i = 0; i < ( st.countTokens() - 1 ); i++ )
{
dir = dir.getParentFile();
}
}
+
return dir;
}
}
Modified:
maven/maven-1/plugins/trunk/simian/src/test/org/apache/maven/simian/Francais.java
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/simian/src/test/org/apache/maven/simian/Francais.java?rev=371231&r1=371230&r2=371231&view=diff
==============================================================================
---
maven/maven-1/plugins/trunk/simian/src/test/org/apache/maven/simian/Francais.java
(original)
+++
maven/maven-1/plugins/trunk/simian/src/test/org/apache/maven/simian/Francais.java
Sun Jan 22 00:04:40 2006
@@ -22,41 +22,44 @@
* @author Aslak Hellesoy
* @version $Revision$
*/
-public class Francais {
- public void neuf() {
+public class Francais
+{
+ public void neuf()
+ {
String one = "one";
String two = "two";
String three = "three";
String four = "four";
- String five= "five";
+ String five = "five";
String six = "six";
String seven = "seven";
String eight = "eight";
}
- public void dix() {
+ public void dix()
+ {
String one = "one";
String two = "two";
String three = "three";
String four = "four";
- String five= "five";
+ String five = "five";
String six = "six";
String seven = "seven";
String eight = "eight";
String nine = "nine";
}
- public void onze() {
+ public void onze()
+ {
String one = "one";
String two = "two";
String three = "three";
String four = "four";
- String five= "five";
+ String five = "five";
String six = "six";
String seven = "seven";
String eight = "eight";
String nine = "nine";
String ten = "ten";
}
-
}