Browse Source

Merge branch '1.9.x'

master
Stefan Bodewig 8 years ago
parent
commit
52c917b198
13 changed files with 20 additions and 14 deletions
  1. +1
    -1
      src/main/org/apache/tools/ant/ArgumentProcessorRegistry.java
  2. +2
    -1
      src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java
  3. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/Jar.java
  4. +2
    -1
      src/main/org/apache/tools/ant/taskdefs/Javadoc.java
  5. +3
    -1
      src/main/org/apache/tools/ant/taskdefs/MacroDef.java
  6. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/StreamPumper.java
  7. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
  8. +4
    -2
      src/main/org/apache/tools/ant/taskdefs/condition/AntVersion.java
  9. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/net/RExecTask.java
  10. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java
  11. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java
  12. +1
    -1
      src/main/org/apache/tools/ant/util/depend/bcel/AncestorAnalyzer.java
  13. +1
    -1
      src/main/org/apache/tools/ant/util/depend/bcel/FullAnalyzer.java

+ 1
- 1
src/main/org/apache/tools/ant/ArgumentProcessorRegistry.java View File

@@ -84,7 +84,7 @@ public class ArgumentProcessorRegistry {
} }


InputStream systemResource = ClassLoader.getSystemResourceAsStream(SERVICE_ID); InputStream systemResource = ClassLoader.getSystemResourceAsStream(SERVICE_ID);
if (systemResource != null) {
if (systemResource != null) { //NOSONAR
ArgumentProcessor processor = getProcessorByService(systemResource); ArgumentProcessor processor = getProcessorByService(systemResource);
registerArgumentProcessor(processor); registerArgumentProcessor(processor);
} }


+ 2
- 1
src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java View File

@@ -600,7 +600,8 @@ public class ProjectHelperImpl extends ProjectHelper {
private static void handleElement(ProjectHelperImpl helperImpl, DocumentHandler parent, private static void handleElement(ProjectHelperImpl helperImpl, DocumentHandler parent,
Target target, String elementName, AttributeList attrs) throws SAXParseException { Target target, String elementName, AttributeList attrs) throws SAXParseException {
if (elementName.equals("description")) { if (elementName.equals("description")) {
new DescriptionHandler(helperImpl, parent);
// created for side effect
new DescriptionHandler(helperImpl, parent); //NOSONAR
} else if (helperImpl.project.getDataTypeDefinitions().get(elementName) != null) { } else if (helperImpl.project.getDataTypeDefinitions().get(elementName) != null) {
new DataTypeHandler(helperImpl, parent, target).init(elementName, attrs); new DataTypeHandler(helperImpl, parent, target).init(elementName, attrs);
} else { } else {


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/Jar.java View File

@@ -401,7 +401,7 @@ public class Jar extends Zip {
*/ */
public void setFilesetmanifest(FilesetManifestConfig config) { public void setFilesetmanifest(FilesetManifestConfig config) {
filesetManifestConfig = config; filesetManifestConfig = config;
mergeManifestsMain = "merge".equals(config.getValue());
mergeManifestsMain = config != null && "merge".equals(config.getValue());


if (filesetManifestConfig != null if (filesetManifestConfig != null
&& !filesetManifestConfig.getValue().equals("skip")) { && !filesetManifestConfig.getValue().equals("skip")) {


+ 2
- 1
src/main/org/apache/tools/ant/taskdefs/Javadoc.java View File

@@ -2026,7 +2026,8 @@ public class Javadoc extends Task {
// is the href a valid URL // is the href a valid URL
try { try {
final URL base = new URL("file://."); final URL base = new URL("file://.");
new URL(base, la.getHref());
// created for the side effect of throwing a MalformedURLException
new URL(base, la.getHref()); //NOSONAR
link = la.getHref(); link = la.getHref();
} catch (final MalformedURLException mue) { } catch (final MalformedURLException mue) {
// ok - just skip // ok - just skip


+ 3
- 1
src/main/org/apache/tools/ant/taskdefs/MacroDef.java View File

@@ -183,7 +183,9 @@ public class MacroDef extends AntlibDefinition {
ret.setTaskName("sequential"); ret.setTaskName("sequential");
ret.setNamespace(""); ret.setNamespace("");
ret.setQName("sequential"); ret.setQName("sequential");
new RuntimeConfigurable(ret, "sequential");
// stores RuntimeConfigurable as "RuntimeConfigurableWrapper"
// in ret as side effect
new RuntimeConfigurable(ret, "sequential"); //NOSONAR
final int size = nestedSequential.getNested().size(); final int size = nestedSequential.getNested().size();
for (int i = 0; i < size; ++i) { for (int i = 0; i < size; ++i) {
UnknownElement e = UnknownElement e =


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/StreamPumper.java View File

@@ -137,7 +137,7 @@ public class StreamPumper implements Runnable {
if (autoflush) { if (autoflush) {
os.flush(); os.flush();
} }
if (finish) {
if (finish) { //NOSONAR
break; break;
} }
} }


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java View File

@@ -831,7 +831,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
if (outFileName == null || outFileName.length == 0) { if (outFileName == null || outFileName.length == 0) {
log("Skipping " + inFile + " it cannot get mapped to output.", Project.MSG_VERBOSE); log("Skipping " + inFile + " it cannot get mapped to output.", Project.MSG_VERBOSE);
return; return;
} else if (outFileName == null || outFileName.length > 1) {
} else if (outFileName.length > 1) {
log("Skipping " + inFile + " its mapping is ambiguos.", Project.MSG_VERBOSE); log("Skipping " + inFile + " its mapping is ambiguos.", Project.MSG_VERBOSE);
return; return;
} }


+ 4
- 2
src/main/org/apache/tools/ant/taskdefs/condition/AntVersion.java View File

@@ -78,7 +78,8 @@ public class AntVersion extends Task implements Condition {
} }
if (atLeast != null) { if (atLeast != null) {
try { try {
new DeweyDecimal(atLeast);
// only created for side effect
new DeweyDecimal(atLeast); //NOSONAR
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
throw new BuildException( throw new BuildException(
"The 'atleast' attribute is not a Dewey Decimal eg 1.1.0 : " "The 'atleast' attribute is not a Dewey Decimal eg 1.1.0 : "
@@ -86,7 +87,8 @@ public class AntVersion extends Task implements Condition {
} }
} else { } else {
try { try {
new DeweyDecimal(exactly);
// only created for side effect
new DeweyDecimal(exactly); //NOSONAR
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
throw new BuildException( throw new BuildException(
"The 'exactly' attribute is not a Dewey Decimal eg 1.1.0 : " "The 'exactly' attribute is not a Dewey Decimal eg 1.1.0 : "


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/optional/net/RExecTask.java View File

@@ -362,7 +362,7 @@ public class RExecTask extends Task {
} catch (IOException e) { } catch (IOException e) {
throw new BuildException("Can't connect to " + server); throw new BuildException("Can't connect to " + server);
} }
if (userid != null && password != null && command != null
if (userid != null && password != null && command != null //NOSONAR
&& rexecTasks.size() == 0) { && rexecTasks.size() == 0) {
// simple one-shot execution // simple one-shot execution
rexec.rexec(userid, password, command); rexec.rexec(userid, password, command);


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java View File

@@ -107,7 +107,7 @@ public class TelnetTask extends Task {
throw new BuildException("Can't connect to " + server); throw new BuildException("Can't connect to " + server);
} }
/** Login if userid and password were specified */ /** Login if userid and password were specified */
if (userid != null && password != null) {
if (userid != null && password != null) { //NOSONAR
login(telnet); login(telnet);
} }
/** Process each sub command */ /** Process each sub command */


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java View File

@@ -267,7 +267,7 @@ public class Scp extends SSHBase {
} else { } else {
upload(fromUri, toUri); upload(fromUri, toUri);
} }
} else if (isFromRemote && isToRemote) {
} else if (isFromRemote && isToRemote) { //NOSONAR
throw new BuildException( throw new BuildException(
"Copying from a remote server to a remote server is not supported."); "Copying from a remote server to a remote server is not supported.");
} else { } else {


+ 1
- 1
src/main/org/apache/tools/ant/util/depend/bcel/AncestorAnalyzer.java View File

@@ -42,7 +42,7 @@ public class AncestorAnalyzer extends AbstractAnalyzer {
public AncestorAnalyzer() { public AncestorAnalyzer() {
// force BCEL classes to load now // force BCEL classes to load now
try { try {
new ClassParser("force");
new ClassParser("force"); //NOSONAR
} catch (Exception e) { } catch (Exception e) {
// all released versions of BCEL may throw an IOException // all released versions of BCEL may throw an IOException
// here, but BCEL's trunk does no longer declare to do so // here, but BCEL's trunk does no longer declare to do so


+ 1
- 1
src/main/org/apache/tools/ant/util/depend/bcel/FullAnalyzer.java View File

@@ -41,7 +41,7 @@ public class FullAnalyzer extends AbstractAnalyzer {
public FullAnalyzer() { public FullAnalyzer() {
// force BCEL classes to load now // force BCEL classes to load now
try { try {
new ClassParser("force");
new ClassParser("force"); //NOSONAR
} catch (Exception e) { } catch (Exception e) {
// all released versions of BCEL may throw an IOException // all released versions of BCEL may throw an IOException
// here, but BCEL's trunk does no longer declare to do so // here, but BCEL's trunk does no longer declare to do so


Loading…
Cancel
Save