Author: peterreilly
Date: Sat Nov 18 10:15:52 2006
New Revision: 476582
URL: http://svn.apache.org/viewvc?view=rev&rev=476582
Log:
checkstyle
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/BuildEvent.java
ant/core/trunk/src/main/org/apache/tools/ant/IntrospectionHelper.java
ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java
ant/core/trunk/src/main/org/apache/tools/ant/Task.java
ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java
ant/core/trunk/src/main/org/apache/tools/ant/launch/Locator.java
ant/core/trunk/src/main/org/apache/tools/ant/listener/CommonsLoggingListener.java
ant/core/trunk/src/main/org/apache/tools/ant/types/Quantifier.java
ant/core/trunk/src/main/org/apache/tools/ant/types/optional/image/Rotate.java
ant/core/trunk/src/main/org/apache/tools/ant/types/optional/image/Scale.java
ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BZip2Resource.java
ant/core/trunk/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
Modified: ant/core/trunk/src/main/org/apache/tools/ant/BuildEvent.java
URL:
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/BuildEvent.java?view=diff&rev=476582&r1=476581&r2=476582
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/BuildEvent.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/BuildEvent.java Sat Nov 18
10:15:52 2006
@@ -189,7 +189,7 @@
*
* @return the exception associated with this exception, or
* <code>null</code> if no exception has been set.
- *
+ *
* @see BuildListener#messageLogged(BuildEvent)
* @see BuildListener#taskFinished(BuildEvent)
* @see BuildListener#targetFinished(BuildEvent)
Modified: ant/core/trunk/src/main/org/apache/tools/ant/IntrospectionHelper.java
URL:
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/IntrospectionHelper.java?view=diff&rev=476582&r1=476581&r2=476582
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/IntrospectionHelper.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/IntrospectionHelper.java Sat
Nov 18 10:15:52 2006
@@ -1217,11 +1217,14 @@
* in detail for reasons of source code readability.
*/
private abstract static class NestedCreator {
- Method method; // the method called to add/create the nested element
+ private Method method; // the method called to add/create the nested
element
NestedCreator(Method m) {
this.method = m;
}
+ Method getMethod() {
+ return method;
+ }
boolean isPolyMorphic() {
return false;
}
@@ -1247,7 +1250,7 @@
Object create(Project project, Object parent, Object ignore)
throws InvocationTargetException, IllegalAccessException {
- return method.invoke(parent, new Object[] {});
+ return getMethod().invoke(parent, new Object[] {});
}
}
@@ -1257,8 +1260,8 @@
static final int ADD = 1;
static final int ADD_CONFIGURED = 2;
- protected Constructor constructor;
- protected int behavior;
+ private Constructor constructor;
+ private int behavior; // ADD or ADD_CONFIGURED
AddNestedCreator(Method m, Constructor c, int behavior) {
super(m);
@@ -1299,7 +1302,7 @@
private void istore(Object parent, Object child)
throws InvocationTargetException,
IllegalAccessException, InstantiationException {
- method.invoke(parent, new Object[] {child});
+ getMethod().invoke(parent, new Object[] {child});
}
}
@@ -1308,7 +1311,7 @@
* in detail for reasons of source code readability.
*/
private abstract static class AttributeSetter {
- Method method; // the method called to set the attribute
+ private Method method; // the method called to set the attribute
AttributeSetter(Method m) {
this.method = m;
}
@@ -1361,8 +1364,8 @@
return new NestedCreator(addMethod) {
Object create(Project project, Object parent, Object ignore)
throws InvocationTargetException, IllegalAccessException {
- if (!method.getName().endsWith("Configured")) {
- method.invoke(parent, new Object[] {realObject});
+ if (!getMethod().getName().endsWith("Configured")) {
+ getMethod().invoke(parent, new Object[] {realObject});
}
return nestedObject;
}
@@ -1374,8 +1377,8 @@
void store(Object parent, Object child)
throws InvocationTargetException, IllegalAccessException,
InstantiationException {
- if (method.getName().endsWith("Configured")) {
- method.invoke(parent, new Object[] {realObject});
+ if (getMethod().getName().endsWith("Configured")) {
+ getMethod().invoke(parent, new Object[] {realObject});
}
}
};
Modified: ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java
URL:
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java?view=diff&rev=476582&r1=476581&r2=476582
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java Sat Nov 18
10:15:52 2006
@@ -464,8 +464,6 @@
// deprecated, it is possible to use a better (more efficient)
// mechanism to preserve the context.
- // TODO: do we need to delegate ?
-
/**
* Returns a copy of the properties table.
* @return a hashtable containing all properties
Modified: ant/core/trunk/src/main/org/apache/tools/ant/Task.java
URL:
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/Task.java?view=diff&rev=476582&r1=476581&r2=476582
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/Task.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/Task.java Sat Nov 18 10:15:52
2006
@@ -337,12 +337,11 @@
* @since 1.7
*/
public void log(Throwable t, int msgLevel) {
- if(t != null)
- {
+ if (t != null) {
log(t.getMessage(), t, msgLevel);
}
}
-
+
/**
* Logs a message with the given priority. This delegates
* the actual logging to the project.
@@ -360,7 +359,7 @@
super.log(msg, msgLevel);
}
}
-
+
/**
* Performs this task if it's still valid, or gets a replacement
* version and performs that otherwise.
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java
URL:
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java?view=diff&rev=476582&r1=476581&r2=476582
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java
Sat Nov 18 10:15:52 2006
@@ -180,6 +180,7 @@
* control back to the parent in the endElement method.
*/
static class AbstractHandler extends HandlerBase {
+ // CheckStyle:VisibilityModifier OFF - bc
/**
* Previous handler for the document.
@@ -194,6 +195,7 @@
explicitly it'll work with more compilers.
*/
ProjectHelperImpl helperImpl;
+ // CheckStyle:VisibilityModifier ON
/**
* Creates a handler and sets the parser to use it
@@ -271,7 +273,9 @@
* Handler for the root element. Its only child must be the "project"
element.
*/
static class RootHandler extends HandlerBase {
+ // CheckStyle:VisibilityModifier OFF - bc
ProjectHelperImpl helperImpl;
+ // CheckStyle:VisibilityModifier ON
public RootHandler(ProjectHelperImpl helperImpl) {
this.helperImpl = helperImpl;
Modified: ant/core/trunk/src/main/org/apache/tools/ant/launch/Locator.java
URL:
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/launch/Locator.java?view=diff&rev=476582&r1=476581&r2=476582
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/launch/Locator.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/launch/Locator.java Sat Nov 18
10:15:52 2006
@@ -38,7 +38,7 @@
/**
* encoding used to represent URIs
*/
- public static String URI_ENCODING = "UTF-8";
+ public static final String URI_ENCODING = "UTF-8";
// stolen from org.apache.xerces.impl.XMLEntityManager#getUserDir()
// of the Xerces-J team
// which ASCII characters need to be escaped
@@ -210,7 +210,7 @@
String cwd = System.getProperty("user.dir");
int posi = cwd.indexOf(":");
if ((posi > 0) && path.startsWith(File.separator)) {
- path = cwd.substring(0, posi + 1) + path;
+ path = cwd.substring(0, posi + 1) + path;
}
} catch (UnsupportedEncodingException exc) {
// not sure whether this is clean, but this method is
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/listener/CommonsLoggingListener.java
URL:
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/listener/CommonsLoggingListener.java?view=diff&rev=476582&r1=476581&r2=476582
==============================================================================
---
ant/core/trunk/src/main/org/apache/tools/ant/listener/CommonsLoggingListener.java
(original)
+++
ant/core/trunk/src/main/org/apache/tools/ant/listener/CommonsLoggingListener.java
Sat Nov 18 10:15:52 2006
@@ -290,8 +290,10 @@
System.setErr(tmpErr);
}
+ // CheckStyle:VisibilityModifier OFF - bc
PrintStream out = System.out;
PrintStream err = System.err;
+ // CheckStyle:VisibilityModifier ON
/**
* Set the the output level.
Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/Quantifier.java
URL:
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/Quantifier.java?view=diff&rev=476582&r1=476581&r2=476582
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/Quantifier.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/Quantifier.java Sat Nov
18 10:15:52 2006
@@ -51,7 +51,7 @@
/** NONE instance */
public static final Quantifier NONE = new Quantifier("none");
- private static abstract class Predicate {
+ private abstract static class Predicate {
abstract boolean eval(int t, int f);
}
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/types/optional/image/Rotate.java
URL:
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/optional/image/Rotate.java?view=diff&rev=476582&r1=476581&r2=476582
==============================================================================
---
ant/core/trunk/src/main/org/apache/tools/ant/types/optional/image/Rotate.java
(original)
+++
ant/core/trunk/src/main/org/apache/tools/ant/types/optional/image/Rotate.java
Sat Nov 18 10:15:52 2006
@@ -45,7 +45,11 @@
}
- /** [EMAIL PROTECTED] */
+ /**
+ * Rotate an image.
+ * @param image the image to rotate.
+ * @return the rotated image.
+ */
public PlanarImage performRotate(PlanarImage image) {
float tAngle = (float) (angle * (Math.PI / HALF_CIRCLE));
ParameterBlock pb = new ParameterBlock();
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/types/optional/image/Scale.java
URL:
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/optional/image/Scale.java?view=diff&rev=476582&r1=476581&r2=476582
==============================================================================
---
ant/core/trunk/src/main/org/apache/tools/ant/types/optional/image/Scale.java
(original)
+++
ant/core/trunk/src/main/org/apache/tools/ant/types/optional/image/Scale.java
Sat Nov 18 10:15:52 2006
@@ -103,7 +103,11 @@
}
}
- /** [EMAIL PROTECTED] */
+ /**
+ * Scale an image.
+ * @param image the image to scale.
+ * @return the scaled image.
+ */
public PlanarImage performScale(PlanarImage image) {
ParameterBlock pb = new ParameterBlock();
pb.addSource(image);
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BZip2Resource.java
URL:
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BZip2Resource.java?view=diff&rev=476582&r1=476581&r2=476582
==============================================================================
---
ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BZip2Resource.java
(original)
+++
ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BZip2Resource.java
Sat Nov 18 10:15:52 2006
@@ -63,7 +63,7 @@
}
/**
- * Compress on the fly using [EMAIL PROTECTED] CBZip2OuputStream}.
+ * Compress on the fly using [EMAIL PROTECTED] CBZip2OutputStream}.
* @param out the stream to wrap.
* @return the wrapped stream.
* @throws IOException if there is a problem.
Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
URL:
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/JavaEnvUtils.java?view=diff&rev=476582&r1=476581&r2=476582
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/util/JavaEnvUtils.java Sat Nov
18 10:15:52 2006
@@ -161,7 +161,7 @@
* Note that Ant now requires JDK 1.2+ so [EMAIL PROTECTED] #JAVA_1_0} and
* [EMAIL PROTECTED] #JAVA_1_1} need no longer be tested for.
* @param version the version to check against the current version.
- * @return true if the version of Java is the same or higher than the
+ * @return true if the version of Java is the same or higher than the
* given version.
* @since Ant 1.7
*/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]