Browse Source

name hiding

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@278108 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 20 years ago
parent
commit
02c264aee4
2 changed files with 13 additions and 13 deletions
  1. +5
    -5
      src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java
  2. +8
    -8
      src/main/org/apache/tools/ant/taskdefs/SignJar.java

+ 5
- 5
src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java View File

@@ -264,18 +264,18 @@ public abstract class AbstractJarSignerTask extends Task {
if (null != keystore) {
// is the keystore a file
addValue(cmd,"-keystore");
String location;
String loc;
File keystoreFile = getProject().resolveFile(keystore);
if (keystoreFile.exists()) {
location = keystoreFile.getPath();
loc = keystoreFile.getPath();
} else {
// must be a URL - just pass as is
location = keystore;
loc = keystore;
}
addValue(cmd,location);
addValue(cmd, loc);
}
if (null != storetype) {
addValue(cmd,"-storetype");
addValue(cmd, "-storetype");
addValue(cmd, storetype);
}
}


+ 8
- 8
src/main/org/apache/tools/ant/taskdefs/SignJar.java View File

@@ -362,11 +362,11 @@ public class SignJar extends AbstractJarSignerTask {
throws BuildException {


File target = jarTarget;
if (target == null) {
target = jarSource;
File targetFile = jarTarget;
if (targetFile == null) {
targetFile = jarSource;
}
if (isUpToDate(jarSource, target)) {
if (isUpToDate(jarSource, targetFile)) {
return;
}

@@ -384,9 +384,9 @@ public class SignJar extends AbstractJarSignerTask {

//DO NOT SET THE -signedjar OPTION if source==dest
//unless you like fielding hotspot crash reports
if (null != target && !jarSource.equals(target)) {
if (null != targetFile && !jarSource.equals(targetFile)) {
addValue(cmd, "-signedjar");
addValue(cmd, target.getPath());
addValue(cmd, targetFile.getPath());
}

if (internalsf) {
@@ -409,14 +409,14 @@ public class SignJar extends AbstractJarSignerTask {
log("Signing JAR: " +
jarSource.getAbsolutePath()
+" to " +
target.getAbsolutePath()
targetFile.getAbsolutePath()
+ " as " + alias);

cmd.execute();

// restore the lastModified attribute
if (preserveLastModified) {
target.setLastModified(lastModified);
targetFile.setLastModified(lastModified);
}
}



Loading…
Cancel
Save