Skip to content

Commit

Permalink
single return point
Browse files Browse the repository at this point in the history
  • Loading branch information
cypai committed Oct 15, 2015
1 parent c2c7d1c commit 6078bd4
Showing 1 changed file with 12 additions and 10 deletions.
Expand Up @@ -237,19 +237,21 @@ private boolean passesCheck(String rawLiteral)
*/
private Type getNumericType(String rawLiteral)
{
if (rawLiteral.length() < 2) {
return Type.DECIMAL;
}
Type type;
String prefix = rawLiteral.substring(0, 2);
if (prefix.equals("0x")) {
type = Type.HEX;
}
else if (prefix.equals("0b")) {
type = Type.BINARY;
if (rawLiteral.length() < 2) {
type = Type.DECIMAL;
}
else {
type = Type.DECIMAL;
String prefix = rawLiteral.substring(0, 2);
if (prefix.equals("0x")) {
type = Type.HEX;
}
else if (prefix.equals("0b")) {
type = Type.BINARY;
}
else {
type = Type.DECIMAL;
}
}
return type;
}
Expand Down

0 comments on commit 6078bd4

Please sign in to comment.