< prev index next >

src/java.corba/share/classes/com/sun/tools/corba/se/idl/Preprocessor.java

Print this page

        

@@ -125,11 +125,11 @@
           else if (((Boolean)alreadyProcessedABranch.peek ()).booleanValue ())
             skipToEndif ();
           else
           {
             alreadyProcessedABranch.pop ();
-            alreadyProcessedABranch.push (new Boolean (true));
+            alreadyProcessedABranch.push (Boolean.TRUE);
             token = scanner.getToken ();
           }
           break;
         case Token.Elif:
           elif ();

@@ -326,11 +326,11 @@
     boolean expr;
     if (boolExpr.value () instanceof Boolean)
       expr = ((Boolean)boolExpr.value ()).booleanValue ();
     else
       expr = ((Number)boolExpr.value ()).longValue () != 0;
-    alreadyProcessedABranch.push (new Boolean (expr));
+    alreadyProcessedABranch.push (expr);
     if (!expr)
       skipToEndiforElse ();
   } // constExpr
 
   /**

@@ -535,16 +535,16 @@
   private void ifDefine (boolean inParens, boolean not) throws IOException, ParseException
   {
     if (token.equals (Token.Identifier))
       if ((not && symbols.containsKey (token.name)) || (!not && !symbols.containsKey (token.name)))
       {
-        alreadyProcessedABranch.push (new Boolean (false));
+        alreadyProcessedABranch.push (Boolean.FALSE);
         skipToEndiforElse ();
       }
       else
       {
-        alreadyProcessedABranch.push (new Boolean (true));
+        alreadyProcessedABranch.push (Boolean.TRUE);
         match (Token.Identifier);
         if (inParens)
           match (Token.RightParen);
       }
     else

@@ -561,16 +561,16 @@
     else
       match (Token.Ifdef);
     if (token.equals (Token.Identifier))
       if ((not && symbols.containsKey (token.name)) || (!not && !symbols.containsKey (token.name)))
       {
-        alreadyProcessedABranch.push (new Boolean (false));
+        alreadyProcessedABranch.push (Boolean.FALSE);
         skipToEndiforElse ();
       }
       else
       {
-        alreadyProcessedABranch.push (new Boolean (true));
+        alreadyProcessedABranch.push (Boolean.TRUE);
         match (Token.Identifier);
       }
     else
       throw ParseException.syntaxError (scanner, Token.Identifier, token.type);
   } // ifdef

@@ -598,11 +598,11 @@
   {
     while (!token.equals (Token.Endif) && !token.equals (Token.Else) && !token.equals (Token.Elif))
     {
       if (token.equals (Token.Ifdef) || token.equals (Token.Ifndef))
       {
-        alreadyProcessedABranch.push (new Boolean (true));
+        alreadyProcessedABranch.push (Boolean.TRUE);
         skipToEndif ();
       }
       else
         token = scanner.skipUntil ('#');
     }

@@ -617,11 +617,11 @@
     while (!token.equals (Token.Endif))
     {
       token = scanner.skipUntil ('#');
       if (token.equals (Token.Ifdef) || token.equals (Token.Ifndef))
       {
-        alreadyProcessedABranch.push (new Boolean (true));
+        alreadyProcessedABranch.push (Boolean.TRUE);
         skipToEndif ();
       }
     }
     alreadyProcessedABranch.pop ();
     match (Token.Endif);
< prev index next >