mstover1    2004/07/14 07:33:42

  Modified:    src/core/org/apache/jmeter/util JMeterVersion.java
               src/protocol/http/org/apache/jmeter/protocol/http/sampler
                        AccessLogSampler.java
               src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog
                        TCLogParser.java
  Log:
  Fix for log parser dealing with ending ?'s
  
  Revision  Changes    Path
  1.24      +1 -1      
jakarta-jmeter/src/core/org/apache/jmeter/util/JMeterVersion.java
  
  Index: JMeterVersion.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/util/JMeterVersion.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- JMeterVersion.java        20 Jun 2004 00:32:53 -0000      1.23
  +++ JMeterVersion.java        14 Jul 2004 14:33:41 -0000      1.24
  @@ -39,7 +39,7 @@
         * pattern: VERSION = <quote>.*<quote>
         * 
         */
  -     static final String VERSION = "2.0.20040619";
  +     static final String VERSION = "2.0.20040714";
   
        static final String COPYRIGHT = "Copyright (c) 1998-2004 The Apache Software 
Foundation";
        
  
  
  
  1.16      +3 -2      
jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/AccessLogSampler.java
  
  Index: AccessLogSampler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/AccessLogSampler.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- AccessLogSampler.java     3 Jul 2004 02:41:48 -0000       1.15
  +++ AccessLogSampler.java     14 Jul 2004 14:33:41 -0000      1.16
  @@ -146,6 +146,7 @@
               }
               log.info("parser returned 0 paths");
               filter.reset();
  +            count = 0;
               return null;
            }
            count = thisCount;
  
  
  
  1.16      +13 -12    
jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.java
  
  Index: TCLogParser.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- TCLogParser.java  3 Jul 2004 14:04:52 -0000       1.15
  +++ TCLogParser.java  14 Jul 2004 14:33:42 -0000      1.16
  @@ -234,14 +234,7 @@
           {
               // read one line at a time using
               // BufferedReader
  -            line = breader.readLine();
  -            if (line == null && COUNT >= this.PARSECOUNT)
  -            {
  -                this.READER.close();
  -                this.READER = null;
  -                //this.READER = new BufferedReader(new FileReader(this.SOURCE));
  -                //parse(this.READER,el);
  -            }
  +            line = breader.readLine();            
               while (line != null)
               {
                                if (line.length() > 0)
  @@ -259,6 +252,14 @@
                   }
                   line = breader.readLine();
               }
  +            if (line == null)
  +            {
  +               breader.close();
  +               breader = null;
  +               this.READER = null;
  +               //this.READER = new BufferedReader(new FileReader(this.SOURCE));
  +               //parse(this.READER,el);
  +           }
           }
           catch (IOException ioe)
           {
  @@ -438,8 +439,8 @@
           {
               StringTokenizer tokens = this.tokenize(url, "?");
               this.URL_PATH = tokens.nextToken();
  -            el.setProperty(HTTPSamplerBase.PATH,URL_PATH);
  -            return tokens.nextToken();
  +                     el.setProperty(HTTPSamplerBase.PATH,URL_PATH);
  +            return tokens.hasMoreTokens() ? tokens.nextToken() : null;
           }
           else
           {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to