From 2fd08b3c9a83fddb3597be6ebf2626ec35fa088b Mon Sep 17 00:00:00 2001 From: Shevek Date: Thu, 8 May 2008 20:36:53 +0000 Subject: findbugs: nothing major --- src/java/org/anarres/cpp/LexerSource.java | 2 +- src/java/org/anarres/cpp/Main.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/java/org/anarres/cpp/LexerSource.java b/src/java/org/anarres/cpp/LexerSource.java index 8e679b5..c3ee982 100644 --- a/src/java/org/anarres/cpp/LexerSource.java +++ b/src/java/org/anarres/cpp/LexerSource.java @@ -509,7 +509,7 @@ public class LexerSource extends Source { if (ppvalid) { bol = true; if (include) { - tok = new Token(NL, _l, _c, new String("\n")); + tok = new Token(NL, _l, _c, "\n"); } else { int nls = 0; diff --git a/src/java/org/anarres/cpp/Main.java b/src/java/org/anarres/cpp/Main.java index e62ca83..e592169 100644 --- a/src/java/org/anarres/cpp/Main.java +++ b/src/java/org/anarres/cpp/Main.java @@ -165,7 +165,9 @@ public class Main { try { for (;;) { Token tok = pp.token(); - if (tok != null && tok.getType() == Token.EOF) + if (tok == null) + break; + if (tok.getType() == Token.EOF) break; System.out.print(tok.getText()); } @@ -302,6 +304,7 @@ public class Main { +#if (false) public static void oldmain(String[] args) throws Exception { List path = new ArrayList(); path.add("/usr/include"); @@ -372,5 +375,6 @@ public class Main { } } +#end } -- cgit v1.2.3