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) { if (null != keystore) {
// is the keystore a file // is the keystore a file
addValue(cmd,"-keystore"); addValue(cmd,"-keystore");
String location;
String loc;
File keystoreFile = getProject().resolveFile(keystore); File keystoreFile = getProject().resolveFile(keystore);
if (keystoreFile.exists()) { if (keystoreFile.exists()) {
location = keystoreFile.getPath();
loc = keystoreFile.getPath();
} else { } else {
// must be a URL - just pass as is // must be a URL - just pass as is
location = keystore;
loc = keystore;
} }
addValue(cmd,location);
addValue(cmd, loc);
} }
if (null != storetype) { if (null != storetype) {
addValue(cmd,"-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 { 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; return;
} }


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


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


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


cmd.execute(); cmd.execute();


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




Loading…
Cancel
Save