Browse Source

apply patch #55 by @reudismam which doesn't apply properly on this branch

master
Stefan Bodewig 7 years ago
parent
commit
f57d60d6c1
9 changed files with 18 additions and 18 deletions
  1. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/Exit.java
  2. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java
  3. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/ConstantPool.java
  4. +3
    -3
      src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java
  5. +1
    -1
      src/main/org/apache/tools/ant/util/LayoutPreservingProperties.java
  6. +7
    -7
      src/tests/junit/org/apache/tools/ant/IntrospectionHelperTest.java
  7. +2
    -2
      src/tests/junit/org/apache/tools/ant/taskdefs/optional/net/FTPTest.java
  8. +1
    -1
      src/tests/junit/org/apache/tools/zip/ZipLongTest.java
  9. +1
    -1
      src/tests/junit/org/apache/tools/zip/ZipShortTest.java

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

@@ -116,7 +116,7 @@ public class Exit extends Task {
* @param i the <code>int</code> status
*/
public void setStatus(int i) {
status = new Integer(i);
status = Integer.valueOf(i);
}

/**


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

@@ -165,7 +165,7 @@ public class EmailTask extends Task {
* @param port The port to use.
*/
public void setMailport(int port) {
this.port = new Integer(port);
this.port = Integer.valueOf(port);
}

/**


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/ConstantPool.java View File

@@ -101,7 +101,7 @@ public class ConstantPool {
if (entry instanceof Utf8CPInfo) {
Utf8CPInfo utf8Info = (Utf8CPInfo) entry;

utf8Indexes.put(utf8Info.getValue(), new Integer(index));
utf8Indexes.put(utf8Info.getValue(), Integer.valueOf(index));
}

return index;


+ 3
- 3
src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java View File

@@ -111,7 +111,7 @@ public class JavaCC extends Task {
* @param lookahead an <code>int</code> value.
*/
public void setLookahead(int lookahead) {
optionalAttrs.put(LOOKAHEAD, new Integer(lookahead));
optionalAttrs.put(LOOKAHEAD, Integer.valueOf(lookahead));
}

/**
@@ -119,7 +119,7 @@ public class JavaCC extends Task {
* @param choiceAmbiguityCheck an <code>int</code> value.
*/
public void setChoiceambiguitycheck(int choiceAmbiguityCheck) {
optionalAttrs.put(CHOICE_AMBIGUITY_CHECK, new Integer(choiceAmbiguityCheck));
optionalAttrs.put(CHOICE_AMBIGUITY_CHECK, Integer.valueOf(choiceAmbiguityCheck));
}

/**
@@ -127,7 +127,7 @@ public class JavaCC extends Task {
* @param otherAmbiguityCheck an <code>int</code> value.
*/
public void setOtherambiguityCheck(int otherAmbiguityCheck) {
optionalAttrs.put(OTHER_AMBIGUITY_CHECK, new Integer(otherAmbiguityCheck));
optionalAttrs.put(OTHER_AMBIGUITY_CHECK, Integer.valueOf(otherAmbiguityCheck));
}

/**


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

@@ -363,7 +363,7 @@ public class LayoutPreservingProperties extends Properties {
// the new one
remove(key);
}
keyedPairLines.put(key, new Integer(logicalLines.size()));
keyedPairLines.put(key, Integer.valueOf(logicalLines.size()));
}
logicalLines.add(line);
logicalLineBuffer.setLength(0);


+ 7
- 7
src/tests/junit/org/apache/tools/ant/IntrospectionHelperTest.java View File

@@ -533,9 +533,9 @@ public class IntrospectionHelperTest {
assertAttrMethod("seven", "setSeven", String.class,
"2", "3");
assertAttrMethod("eight", "setEight", Integer.TYPE,
new Integer(2), new Integer(3));
Integer.valueOf(2), Integer.valueOf(3));
assertAttrMethod("nine", "setNine", Integer.class,
new Integer(2), new Integer(3));
Integer.valueOf(2), Integer.valueOf(3));
assertAttrMethod("ten", "setTen", File.class,
new File(projectBasedir + 2), new File("toto"));
assertAttrMethod("eleven", "setEleven", Boolean.TYPE,
@@ -547,15 +547,15 @@ public class IntrospectionHelperTest {
assertAttrMethod("fourteen", "setFourteen", StringBuffer.class,
new StringBuffer("2"), new StringBuffer("3"));
assertAttrMethod("fifteen", "setFifteen", Character.TYPE,
new Character('a'), new Character('b'));
Character.valueOf('a'), Character.valueOf('b'));
assertAttrMethod("sixteen", "setSixteen", Character.class,
new Character('a'), new Character('b'));
Character.valueOf('a'), Character.valueOf('b'));
assertAttrMethod("seventeen", "setSeventeen", Byte.TYPE,
new Byte((byte) 17), new Byte((byte) 10));
Byte.valueOf((byte) 17), Byte.valueOf((byte) 10));
assertAttrMethod("eightteen", "setEightteen", Short.TYPE,
new Short((short) 18), new Short((short) 10));
Short.valueOf((short) 18), Short.valueOf((short) 10));
assertAttrMethod("nineteen", "setNineteen", Double.TYPE,
new Double(19), new Double((short) 10));
Double.valueOf(19), Double.valueOf((short) 10));

try {
assertAttrMethod("onehundred", null, null, null, null);


+ 2
- 2
src/tests/junit/org/apache/tools/ant/taskdefs/optional/net/FTPTest.java View File

@@ -527,7 +527,7 @@ public class FTPTest {
private int matchCount;

public void addLogMessageToSearch(String message) {
searchMap.put(message, new Integer(0));
searchMap.put(message, Integer.valueOf(0));
}

/*
@@ -537,7 +537,7 @@ public class FTPTest {
String message = event.getMessage();
Integer mcnt = (Integer) searchMap.get(message);
if (null != mcnt) {
searchMap.put(message, new Integer(mcnt.intValue() + 1));
searchMap.put(message, Integer.valueOf(mcnt.intValue() + 1));
}
super.messageLogged(event);
}


+ 1
- 1
src/tests/junit/org/apache/tools/zip/ZipLongTest.java View File

@@ -71,7 +71,7 @@ public class ZipLongTest {
assertTrue("symmetric", zl2.equals(zl));

assertTrue("null handling", !zl.equals(null));
assertTrue("non ZipLong handling", !zl.equals(new Integer(0x1234)));
assertTrue("non ZipLong handling", !zl.equals(Integer.valueOf(0x1234)));
}

/**


+ 1
- 1
src/tests/junit/org/apache/tools/zip/ZipShortTest.java View File

@@ -68,7 +68,7 @@ public class ZipShortTest {
assertTrue("symmetric", zs2.equals(zs));

assertTrue("null handling", !zs.equals(null));
assertTrue("non ZipShort handling", !zs.equals(new Integer(0x1234)));
assertTrue("non ZipShort handling", !zs.equals(Integer.valueOf(0x1234)));
}

/**


Loading…
Cancel
Save