forked from pool/objectweb-anttask
OBS-URL: https://build.opensuse.org/package/show/Java:packages/objectweb-anttask?expand=0&rev=5
75 lines
2.9 KiB
Diff
75 lines
2.9 KiB
Diff
--- objectweb-anttask/src/org/objectweb/util/ant/JavadocMultipleLink.java 2004-01-26 09:55:26.000000000 +0100
|
|
+++ objectweb-anttask/src/org/objectweb/util/ant/JavadocMultipleLink.java 2017-10-04 10:45:59.549577218 +0200
|
|
@@ -85,8 +85,8 @@
|
|
|
|
// Add files
|
|
try {
|
|
- for(Enumeration enum = v.elements(); enum.hasMoreElements();) {
|
|
- File current = new File((File) enum.nextElement(),
|
|
+ for(Enumeration emun = v.elements(); emun.hasMoreElements();) {
|
|
+ File current = new File((File) emun.nextElement(),
|
|
TEMP_CLASS_NAME + ".java");
|
|
if (!current.createNewFile())
|
|
continue;
|
|
@@ -103,8 +103,8 @@
|
|
super.execute();
|
|
|
|
// Remove files
|
|
- for(Enumeration enum = v.elements(); enum.hasMoreElements();) {
|
|
- new File((File) enum.nextElement(),
|
|
+ for(Enumeration emun = v.elements(); emun.hasMoreElements();) {
|
|
+ new File((File) emun.nextElement(),
|
|
TEMP_CLASS_NAME + ".java").delete();
|
|
}
|
|
}
|
|
--- objectweb-anttask/src/org/objectweb/util/ant/MultipleCopy.java 2017-10-04 10:45:40.517577146 +0200
|
|
+++ objectweb-anttask/src/org/objectweb/util/ant/MultipleCopy.java 2017-10-04 10:46:51.881577416 +0200
|
|
@@ -14,7 +14,6 @@
|
|
import org.apache.tools.ant.types.ResourceCollection;
|
|
|
|
import java.io.File;
|
|
-import java.util.StringTokenizer;
|
|
|
|
/**
|
|
* @author <A HREF="mailto:sebastien.chassande@inrialpes.fr><b>
|
|
@@ -51,20 +50,6 @@
|
|
* Performs the copy operation.
|
|
*/
|
|
public void copy() throws BuildException {
|
|
- boolean ant16 = false;
|
|
- String version = getProject().getProperty("ant.version");
|
|
- StringTokenizer st = new StringTokenizer(version, " ");
|
|
- while (st.hasMoreTokens()) {
|
|
- String s = st.nextToken();
|
|
- if (s.length() > 2 && Character.isDigit(s.charAt(0)) && s.charAt(1) == '.') {
|
|
- if ((int)(s.charAt(0) - '0') > 1) {
|
|
- ant16 = true;
|
|
- } else if ((int)(s.charAt(2) - '0') > 5) {
|
|
- ant16 = true;
|
|
- }
|
|
- break;
|
|
- }
|
|
- }
|
|
|
|
// make sure we don't have an illegal set of options
|
|
validateAttributes();
|
|
@@ -76,18 +61,12 @@
|
|
destFile = new File(destDir, file.getName());
|
|
}
|
|
if (!destFile.exists())
|
|
- if (ant16)
|
|
fileCopyMap.put(file.getAbsolutePath(), new String[] { destFile.getAbsolutePath() });
|
|
- else
|
|
- fileCopyMap.put(file.getAbsolutePath(), destFile.getAbsolutePath());
|
|
|
|
else if (!notReplace && ( forceOverwrite
|
|
|| (file.lastModified() > destFile.lastModified()))
|
|
) {
|
|
- if (ant16)
|
|
fileCopyMap.put(file.getAbsolutePath(), new String[] { destFile.getAbsolutePath() });
|
|
- else
|
|
- fileCopyMap.put(file.getAbsolutePath(), destFile.getAbsolutePath());
|
|
}
|
|
else {
|
|
log(file + " omitted as " + destFile + " is up to date.",
|