summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen/pcpp
diff options
context:
space:
mode:
authorHarvey Harrison <[email protected]>2012-10-13 18:07:27 -0700
committerHarvey Harrison <[email protected]>2012-10-13 18:09:45 -0700
commit6838d3593512d0388948c784023303d966b6e298 (patch)
tree0a379d9f42728d8ecaf66c0dca892005b8a39b9d /src/java/com/jogamp/gluegen/pcpp
parent542e7c364ced2865c5deac1498f5ff537a31c0b8 (diff)
gluegen: simplify expression comparing against Boolean.TRUE
As a last resort we can just return the boolean value directly here, also no need to try/catch as valueOf does not throw any exceptions. Pointed out by Findbugs. Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src/java/com/jogamp/gluegen/pcpp')
-rw-r--r--src/java/com/jogamp/gluegen/pcpp/PCPP.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/java/com/jogamp/gluegen/pcpp/PCPP.java b/src/java/com/jogamp/gluegen/pcpp/PCPP.java
index 07c7bd3..30d8dd8 100644
--- a/src/java/com/jogamp/gluegen/pcpp/PCPP.java
+++ b/src/java/com/jogamp/gluegen/pcpp/PCPP.java
@@ -961,13 +961,8 @@ public class PCPP {
// ok, it's not a valid decimal value, try hex/octal value
return Long.parseLong(word) != 0;
} catch (NumberFormatException nfe2) {
- try {
- // ok, it's not a valid hex/octal value, try boolean
- return Boolean.valueOf(word) == Boolean.TRUE;
- } catch (NumberFormatException nfe3) {
- // give up; the symbol isn't a numeric or boolean value
- return false;
- }
+ // ok, it's not a valid hex/octal value, try boolean last
+ return Boolean.valueOf(word).booleanValue();
}
}
}