diff options
author | Andrey Turbanov <turbanoff@gmail.com> | 2021-11-20 20:37:02 +0300 |
---|---|---|
committer | Andrey Turbanov <turbanoff@gmail.com> | 2021-11-20 20:37:02 +0300 |
commit | bfd6fee99d2685751a6d49eb29a0173c3f825c09 (patch) | |
tree | 33383e16d3008206284965d88254f648d4f5668c /util/src | |
parent | 0f85ca109b9e6ab849e201e76f62d5023cbfcb98 (diff) | |
download | aspectj-bfd6fee99d2685751a6d49eb29a0173c3f825c09.tar.gz aspectj-bfd6fee99d2685751a6d49eb29a0173c3f825c09.zip |
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.
Diffstat (limited to 'util/src')
-rw-r--r-- | util/src/main/java/org/aspectj/util/LangUtil.java | 2 |
1 files changed, 1 insertions, 1 deletions
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 |