jkf 2005/06/12 10:55:14
Modified: src/main/org/apache/tools/ant/taskdefs/repository
HttpRepository.java
src/main/org/apache/tools/ant/types/selectors/modifiedselector
DigestAlgorithm.java ModifiedSelector.java
src/main/org/apache/tools/ant/taskdefs/optional/ide
VAJBuildInfo.java
src/main/org/apache/tools/ant/taskdefs Concat.java
MacroInstance.java Available.java
src/main/org/apache/tools/ant IntrospectionHelper.java
src/main/org/apache/tools/ant/taskdefs/optional/ssh
ScpFromMessage.java
src/main/org/apache/tools/ant/taskdefs/optional/net FTP.java
src/main/org/apache/tools/ant/taskdefs/optional/clearcase
CCRmtype.java CCMklbtype.java
src/main/org/apache/tools/ant/helper ProjectHelper2.java
Log:
Removed unused local variables.
I think there is an error in ConCat, see added comment.
Revision Changes Path
1.8 +1 -2
ant/src/main/org/apache/tools/ant/taskdefs/repository/HttpRepository.java
Index: HttpRepository.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/repository/HttpRepository.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- HttpRepository.java 8 Jun 2005 07:22:01 -0000 1.7
+++ HttpRepository.java 12 Jun 2005 17:55:14 -0000 1.8
@@ -169,8 +169,7 @@
try {
//validate the URL
- URL repository;
- repository = new URL(url);
+ new URL(url);
} catch (MalformedURLException e) {
throw new BuildException(e);
}
1.8 +2 -3
ant/src/main/org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.java
Index: DigestAlgorithm.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- DigestAlgorithm.java 10 Jul 2004 17:15:37 -0000 1.7
+++ DigestAlgorithm.java 12 Jun 2005 17:55:14 -0000 1.8
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2004 The Apache Software Foundation
+ * Copyright 2003-2005 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.
@@ -20,7 +20,6 @@
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileOutputStream;
import java.security.DigestInputStream;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
@@ -154,7 +153,7 @@
return null;
}
FileInputStream fis = null;
- FileOutputStream fos = null;
+
byte[] buf = new byte[readBufferSize];
try {
messageDigest.reset();
1.16 +0 -6
ant/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ModifiedSelector.java
Index: ModifiedSelector.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ModifiedSelector.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ModifiedSelector.java 7 Jan 2005 15:16:54 -0000 1.15
+++ ModifiedSelector.java 12 Jun 2005 17:55:14 -0000 1.16
@@ -393,12 +393,6 @@
}
configParameter = new Vector();
- //
- // ----- Instantiate the interfaces -----
- //
- String className = null;
- String pkg = "org.apache.tools.ant.types.selectors.modifiedselector";
-
// specify the algorithm classname
if (algoName != null) {
// use Algorithm defined via name
1.17 +4 -13
ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJBuildInfo.java
Index: VAJBuildInfo.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJBuildInfo.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- VAJBuildInfo.java 9 Mar 2004 16:48:28 -0000 1.16
+++ VAJBuildInfo.java 12 Jun 2005 17:55:14 -0000 1.17
@@ -1,5 +1,5 @@
/*
- * Copyright 2001-2002,2004 The Apache Software Foundation
+ * Copyright 2001-2002,2004-2005 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.
@@ -432,19 +432,10 @@
* @param listener BuildListener for the output of the build
*/
public void executeProject(BuildListener logger) {
- Throwable error;
projectLogger = logger;
- try {
- buildThread = new Thread(this);
- buildThread.setPriority(Thread.MIN_PRIORITY);
- buildThread.start();
- } catch (RuntimeException exc) {
- error = exc;
- throw exc;
- } catch (Error err) {
- error = err;
- throw err;
- }
+ buildThread = new Thread(this);
+ buildThread.setPriority(Thread.MIN_PRIORITY);
+ buildThread.start();
}
/**
1.46 +4 -1 ant/src/main/org/apache/tools/ant/taskdefs/Concat.java
Index: Concat.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Concat.java,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- Concat.java 12 Jun 2005 15:54:14 -0000 1.45
+++ Concat.java 12 Jun 2005 17:55:14 -0000 1.46
@@ -431,6 +431,10 @@
if (!outofdate) {
for (Iterator i = existRc.iterator(); !outofdate &&
i.hasNext();) {
Resource r = (Resource) i.next();
+ //TODO jkf, Seems the following code, or code like the
+ //following code is missing, can someone confirm?
+ //outofdate = (r.getLastModified()==0L ||
+ // r.getLastModified() >
destinationFile.lastModified())
}
}
if (!outofdate) {
@@ -473,7 +477,6 @@
+ " resources to " + destinationFile);
FileOutputStream out = null;
InputStream in = null;
- byte[] buffer = new byte[BUFFER_SIZE];
try {
try {
out = new FileOutputStream(destinationFile);
1.36 +1 -1
ant/src/main/org/apache/tools/ant/taskdefs/MacroInstance.java
Index: MacroInstance.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/MacroInstance.java,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- MacroInstance.java 21 Apr 2005 11:27:08 -0000 1.35
+++ MacroInstance.java 12 Jun 2005 17:55:14 -0000 1.36
@@ -169,7 +169,7 @@
}
StringBuffer ret = new StringBuffer();
StringBuffer macroName = null;
- boolean inMacro = false;
+
int state = STATE_NORMAL;
for (int i = 0; i < s.length(); ++i) {
char ch = s.charAt(i);
1.67 +4 -5 ant/src/main/org/apache/tools/ant/taskdefs/Available.java
Index: Available.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Available.java,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- Available.java 25 Jan 2005 18:48:30 -0000 1.66
+++ Available.java 12 Jun 2005 17:55:14 -0000 1.67
@@ -414,14 +414,13 @@
*/
private boolean checkClass(String classname) {
try {
- Class requiredClass = null;
if (ignoreSystemclasses) {
loader = getProject().createClassLoader(classpath);
loader.setParentFirst(false);
loader.addJavaLibraries();
if (loader != null) {
try {
- requiredClass = loader.findClass(classname);
+ loader.findClass(classname);
} catch (SecurityException se) {
// class found but restricted name; this is
// actually the case we're looking for in JDK 1.3+,
@@ -432,15 +431,15 @@
return false;
}
} else if (loader != null) {
- requiredClass = loader.loadClass(classname);
+ loader.loadClass(classname);
} else {
ClassLoader l = this.getClass().getClassLoader();
// Can return null to represent the bootstrap class loader.
// see API docs of Class.getClassLoader.
if (l != null) {
- requiredClass = Class.forName(classname, true, l);
+ Class.forName(classname, true, l);
} else {
- requiredClass = Class.forName(classname);
+ Class.forName(classname);
}
}
return true;
1.96 +0 -8
ant/src/main/org/apache/tools/ant/IntrospectionHelper.java
Index: IntrospectionHelper.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/IntrospectionHelper.java,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- IntrospectionHelper.java 30 Mar 2005 08:35:43 -0000 1.95
+++ IntrospectionHelper.java 12 Jun 2005 17:55:14 -0000 1.96
@@ -1137,7 +1137,6 @@
"Not allowed to use the polymorphic form"
+ " for this element");
}
- Class elementClass = nestedCreator.getElementClass();
ComponentHelper helper =
ComponentHelper.getComponentHelper(project);
nestedObject = helper.createComponent(polyType);
@@ -1221,9 +1220,6 @@
boolean isPolyMorphic() {
return false;
}
- Class getElementClass() {
- return null;
- }
Object getRealObject() {
return null;
}
@@ -1269,10 +1265,6 @@
return true;
}
- Class getElementClass() {
- return constructor.getDeclaringClass();
- }
-
Object create(Project project, Object parent, Object child)
throws InvocationTargetException,
IllegalAccessException, InstantiationException {
1.13 +0 -1
ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessage.java
Index: ScpFromMessage.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessage.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ScpFromMessage.java 12 Jun 2005 15:54:15 -0000 1.12
+++ ScpFromMessage.java 12 Jun 2005 17:55:14 -0000 1.13
@@ -140,7 +140,6 @@
InputStream in) throws IOException {
int start = 0;
int end = serverResponse.indexOf(" ", start + 1);
- String command = serverResponse.substring(start, end);
start = end + 1;
end = serverResponse.indexOf(" ", start + 1);
int filesize = Integer.parseInt(serverResponse.substring(start,
end));
1.81 +2 -2
ant/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
Index: FTP.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- FTP.java 3 Jun 2005 16:46:55 -0000 1.80
+++ FTP.java 12 Jun 2005 17:55:14 -0000 1.81
@@ -893,7 +893,7 @@
public boolean isTraverseSymlinks() throws IOException,
BuildException {
if (!relativePathCalculated) {
// getRelativePath also finds about symlinks
- String relpath = getRelativePath();
+ getRelativePath();
}
return traversesSymlinks;
}
@@ -2451,7 +2451,7 @@
*/
public long getMilliseconds(int action) {
String granularityU = getValue().toUpperCase(Locale.US);
- long granularity = 0L;
+
if ("".equals(granularityU)) {
if (action == SEND_FILES) {
return GRANULARITY_MINUTE;
1.12 +1 -2
ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCRmtype.java
Index: CCRmtype.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCRmtype.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- CCRmtype.java 9 Mar 2004 16:48:16 -0000 1.11
+++ CCRmtype.java 12 Jun 2005 17:55:14 -0000 1.12
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2004 The Apache Software Foundation
+ * Copyright 2003-2005 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.
@@ -102,7 +102,6 @@
*/
public void execute() throws BuildException {
Commandline commandLine = new Commandline();
- Project aProj = getProject();
int result = 0;
// Check for required attributes
1.12 +1 -2
ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklbtype.java
Index: CCMklbtype.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklbtype.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- CCMklbtype.java 9 Mar 2004 16:48:16 -0000 1.11
+++ CCMklbtype.java 12 Jun 2005 17:55:14 -0000 1.12
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2004 The Apache Software Foundation
+ * Copyright 2003-2005 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.
@@ -112,7 +112,6 @@
*/
public void execute() throws BuildException {
Commandline commandLine = new Commandline();
- Project aProj = getProject();
int result = 0;
// Check for required attributes
1.57 +0 -1
ant/src/main/org/apache/tools/ant/helper/ProjectHelper2.java
Index: ProjectHelper2.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/helper/ProjectHelper2.java,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- ProjectHelper2.java 21 May 2005 21:39:53 -0000 1.56
+++ ProjectHelper2.java 12 Jun 2005 17:55:14 -0000 1.57
@@ -590,7 +590,6 @@
Attributes attrs,
AntXMLContext context)
throws SAXParseException {
- String id = null;
String baseDir = null;
boolean nameAttributeSet = false;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]