From 02c264aee45f29a2936f681099661a31ad206500 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Mon, 4 Apr 2005 13:46:24 +0000 Subject: [PATCH] name hiding git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@278108 13f79535-47bb-0310-9956-ffa450edef68 --- .../ant/taskdefs/AbstractJarSignerTask.java | 10 +++++----- .../org/apache/tools/ant/taskdefs/SignJar.java | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java b/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java index 7e7ac7cf7..52cc52f29 100644 --- a/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java @@ -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); } } diff --git a/src/main/org/apache/tools/ant/taskdefs/SignJar.java b/src/main/org/apache/tools/ant/taskdefs/SignJar.java index 92c76e99a..6463589f3 100644 --- a/src/main/org/apache/tools/ant/taskdefs/SignJar.java +++ b/src/main/org/apache/tools/ant/taskdefs/SignJar.java @@ -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); } }