diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/anarres/cpp/InputLexerSource.java | 2 | ||||
-rw-r--r-- | src/main/java/org/anarres/cpp/NumericValue.java | 5 | ||||
-rw-r--r-- | src/main/java/org/anarres/cpp/Preprocessor.java | 4 |
3 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/org/anarres/cpp/InputLexerSource.java b/src/main/java/org/anarres/cpp/InputLexerSource.java index ab2e397..93cda54 100644 --- a/src/main/java/org/anarres/cpp/InputLexerSource.java +++ b/src/main/java/org/anarres/cpp/InputLexerSource.java @@ -59,6 +59,6 @@ public class InputLexerSource extends LexerSource { @Override public String toString() { - return getPath(); + return String.valueOf(getPath()); } } diff --git a/src/main/java/org/anarres/cpp/NumericValue.java b/src/main/java/org/anarres/cpp/NumericValue.java index 52fd2d8..e4235d3 100644 --- a/src/main/java/org/anarres/cpp/NumericValue.java +++ b/src/main/java/org/anarres/cpp/NumericValue.java @@ -103,8 +103,9 @@ public class NumericValue extends Number { // XXX Wrong for anything but base 10. scale += t_fraction.length(); } - if (getExponent() != null) - scale -= Integer.parseInt(getExponent()); + String t_exponent = getExponent(); + if (t_exponent != null) + scale -= Integer.parseInt(t_exponent); BigInteger unscaled = new BigInteger(text, getBase()); return new BigDecimal(unscaled, scale); } diff --git a/src/main/java/org/anarres/cpp/Preprocessor.java b/src/main/java/org/anarres/cpp/Preprocessor.java index 5dacc91..27f609f 100644 --- a/src/main/java/org/anarres/cpp/Preprocessor.java +++ b/src/main/java/org/anarres/cpp/Preprocessor.java @@ -511,7 +511,7 @@ public class Preprocessor implements Closeable { * @see #push_source(Source,boolean) * @see #pop_source() */ - @CheckForNull + // @CheckForNull protected Source getSource() { return source; } @@ -522,7 +522,7 @@ public class Preprocessor implements Closeable { * @see #getSource() * @see #pop_source() */ - protected void push_source(Source source, boolean autopop) { + protected void push_source(@Nonnull Source source, boolean autopop) { source.init(this); source.setParent(this.source, autopop); // source.setListener(listener); |