From bfd6fee99d2685751a6d49eb29a0173c3f825c09 Mon Sep 17 00:00:00 2001 From: Andrey Turbanov Date: Sat, 20 Nov 2021 20:37:02 +0300 Subject: Cleanup redundant boxing. Methods Integer.parseInt/Boolean.parseBoolean should be preferred over Integer.valueOf/Boolean.valueOf/ if final result is primitive. They are generally faster and generate less garbage. --- util/src/main/java/org/aspectj/util/LangUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/src/main/java/org/aspectj/util/LangUtil.java b/util/src/main/java/org/aspectj/util/LangUtil.java index 187b895b2..cfe9a0bea 100644 --- a/util/src/main/java/org/aspectj/util/LangUtil.java +++ b/util/src/main/java/org/aspectj/util/LangUtil.java @@ -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 -- cgit v1.2.3