ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbaill...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs JikesOutputParser.java
Date Tue, 08 Jan 2002 22:30:32 GMT
sbailliez    02/01/08 14:30:32

  Modified:    src/main/org/apache/tools/ant/taskdefs
                        JikesOutputParser.java
  Log:
  Fix bad coding style.
  then/else parts of if statement and loop body must always been enclosed
  in a block statement.
  
  Revision  Changes    Path
  1.9       +12 -8     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/JikesOutputParser.java
  
  Index: JikesOutputParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/JikesOutputParser.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- JikesOutputParser.java	28 Oct 2001 21:26:29 -0000	1.8
  +++ JikesOutputParser.java	8 Jan 2002 22:30:32 -0000	1.9
  @@ -125,10 +125,11 @@
        * @param reader - Reader used to read jikes's output
        */
       protected void parseOutput(BufferedReader reader) throws IOException {
  -       if (emacsMode)
  +       if (emacsMode) {
              parseEmacsOutput(reader);
  -       else
  +       } else {
              parseStandardOutput(reader);
  +       }
       }
   
       private void parseStandardOutput(BufferedReader reader) throws IOException {
  @@ -145,21 +146,23 @@
   
           while ((line = reader.readLine()) != null) {
               lower = line.toLowerCase();
  -            if (line.trim().equals(""))
  +            if (line.trim().equals("")) {
                   continue;
  -            if (lower.indexOf("error") != -1)
  +            }
  +            if (lower.indexOf("error") != -1) {
                   setError(true);
  -            else if (lower.indexOf("warning") != -1)
  +            } else if (lower.indexOf("warning") != -1) {
                   setError(false);
  -            else {
  +                   } else {
                   // If we don't know the type of the line
                   // and we are in emacs mode, it will be
                   // an error, because in this mode, jikes won't
                   // always print "error", but sometimes other
                   // keywords like "Syntax". We should look for
                   // all those keywords.
  -                if (emacsMode)
  +                if (emacsMode) {
                       setError(true);
  +                }
               }
               log(line);
           }
  @@ -172,8 +175,9 @@
   
       private void setError(boolean err) {
           error = err;
  -        if(error)
  +        if(error) {
               errorFlag = true;
  +        }
       }
   
       private void log(String line) {
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message