Browse Source

Merge pull request #103 from turbanoff/redundant_boxing

Cleanup redundant boxing.
tags/V1_9_8
Andy Clement 2 years ago
parent
commit
4021ffcbfe
No account linked to committer's email address

+ 5
- 5
asm/src/main/java/org/aspectj/asm/internal/JDTLikeHandleProvider.java View File

@@ -227,7 +227,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
String existingHandle = object.getHandleIdentifier();
int suffixPosition = existingHandle.indexOf('!');
if (suffixPosition != -1) {
count = Integer.valueOf(existingHandle.substring(suffixPosition + 1)) + 1;
count = Integer.parseInt(existingHandle.substring(suffixPosition + 1)) + 1;
} else {
if (count == 1) {
count = 2;
@@ -279,7 +279,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
String existingHandle = object.getHandleIdentifier();
int suffixPosition = existingHandle.indexOf('!');
if (suffixPosition != -1) {
count = Integer.valueOf(existingHandle.substring(suffixPosition + 1)) + 1;
count = Integer.parseInt(existingHandle.substring(suffixPosition + 1)) + 1;
} else {
if (count == 1) {
count = 2;
@@ -314,7 +314,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
int suffixPosition = existingHandle.lastIndexOf('!');
int lastSquareBracket = existingHandle.lastIndexOf('['); // type delimiter
if (suffixPosition != -1 && lastSquareBracket < suffixPosition) { // pr260384
count = Integer.valueOf(existingHandle.substring(suffixPosition + 1)) + 1;
count = Integer.parseInt(existingHandle.substring(suffixPosition + 1)) + 1;
} else {
if (count == 1) {
count = 2;
@@ -334,7 +334,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
int suffixPosition = existingHandle.lastIndexOf('!');
int lastSquareBracket = existingHandle.lastIndexOf('['); // type delimiter
if (suffixPosition != -1 && lastSquareBracket < suffixPosition) { // pr260384
count = Integer.valueOf(existingHandle.substring(suffixPosition + 1)) + 1;
count = Integer.parseInt(existingHandle.substring(suffixPosition + 1)) + 1;
} else {
if (count == 1) {
count = 2;
@@ -383,7 +383,7 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
String existingHandle = object.getHandleIdentifier();
int suffixPosition = existingHandle.indexOf('!');
if (suffixPosition != -1) {
count = Integer.valueOf(existingHandle.substring(suffixPosition + 1)) + 1;
count = Integer.parseInt(existingHandle.substring(suffixPosition + 1)) + 1;
} else {
if (count == 1) {
count = 2;

+ 1
- 1
org.aspectj.ajdt.core/src/test/java/org/aspectj/ajdt/internal/compiler/batch/IncrementalCase.java View File

@@ -311,7 +311,7 @@ public class IncrementalCase { // XXX NOT bound to junit - bridge tests?
if (-1 != loc)
s = s.substring(loc + 1);
try {
exp[i] = Integer.valueOf(s);
exp[i] = Integer.parseInt(s);
sb.append(exp[i] + ((i < (exp.length - 1)) ? ", " : ""));
} catch (NumberFormatException e) {
info(handler, "bad " + label + ":" + expected[i]);

+ 1
- 1
org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java View File

@@ -1041,7 +1041,7 @@ public abstract class AjcTestCase extends TestCase {
private static boolean getBoolean(String name, boolean def) {
String defaultValue = String.valueOf(def);
String value = System.getProperty(name, defaultValue);
return Boolean.valueOf(value);
return Boolean.parseBoolean(value);
}

/*

+ 1
- 1
org.aspectj.matcher/src/main/java/org/aspectj/weaver/tools/TraceFactory.java View File

@@ -30,7 +30,7 @@ public abstract class TraceFactory {
protected static boolean getBoolean(String name, boolean def) {
String defaultValue = String.valueOf(def);
String value = System.getProperty(name,defaultValue);
return Boolean.valueOf(value);
return Boolean.parseBoolean(value);
}

static {

+ 1
- 1
testing/src/test/java/org/aspectj/testing/harness/bridge/FlatSuiteReader.java View File

@@ -267,7 +267,7 @@ public class FlatSuiteReader implements SFileReader.Maker {
description.setLength(0);
description.append((prefix + " " + suffix).trim());
try {
result.setBugId(Integer.valueOf(pr));
result.setBugId(Integer.parseInt(pr));
} catch (NumberFormatException e) {
throw new Error("unable to convert " + pr + " for " + result
+ " at " + lineReader);

+ 2
- 2
testing/src/test/java/org/aspectj/testing/harness/bridge/ParseTestCase.java View File

@@ -105,7 +105,7 @@ public class ParseTestCase extends TestCase {
AjcTest.Spec test = new AjcTest.Spec();
test.setDescription(title);
test.setTestDirOffset(dir);
test.setBugId(Integer.valueOf(pr));
test.setBugId(Integer.parseInt(pr));
test.setSourceLocation(sourceLocation);
//AjcTest test = new AjcTest(title, dir, pr, sourceLocation);

@@ -174,7 +174,7 @@ public class ParseTestCase extends TestCase {
file = new File("XXX"); //XXX
}

int line = Integer.valueOf(getAttributeString(child, "line"));
int line = Integer.parseInt(getAttributeString(child, "line"));

ISourceLocation sourceLocation = new SourceLocation(file, line, line, 0);


+ 1
- 1
testing/src/test/java/org/aspectj/testing/xml/SoftMessage.java View File

@@ -300,7 +300,7 @@ public class SoftMessage implements IMessage {
if (null != sourceLocation) {
throw new IllegalStateException("cannot set line after creating source location");
}
this.line = Integer.valueOf(line);
this.line = Integer.parseInt(line);
SourceLocation.validLine(this.line);
}


+ 1
- 1
testing/src/test/java/org/aspectj/testing/xml/SoftSourceLocation.java View File

@@ -109,7 +109,7 @@ public class SoftSourceLocation implements ISourceLocation {
}

private int convert(String in) {
return Integer.valueOf(in);
return Integer.parseInt(in);
}

public String getLocationContext() {

+ 1
- 1
util/src/main/java/org/aspectj/util/LangUtil.java View File

@@ -353,7 +353,7 @@ public class LangUtil {
try {
String value = System.getProperty(propertyName);
if (null != value) {
return Boolean.valueOf(value);
return Boolean.parseBoolean(value);
}
} catch (Throwable t) {
// default below

Loading…
Cancel
Save