commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benedikt Ritter <brit...@apache.org>
Subject Re: svn commit: r1478655 - /commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/Lexer.java
Date Fri, 03 May 2013 13:38:48 GMT
2013/5/3 sebb <sebbaz@gmail.com>

> On 3 May 2013 07:40, Benedikt Ritter <britter@apache.org> wrote:
>
> > The format field in Lexer is now only used by CSVLexer1 in the test
> > directory. It may therefore be removed.
> > I wonder if the isXXX methods really belong to CSVFormat.
> >
> > WDYT?
> >
> >
> The CSVLexerN entries in the test directory are copies of the originals,
> for comparative performance tests, and should be left alone as far as
> possible.
>

Maybe if would have been better if we had also copied a snapshot of the
Lexer class... Now we compare parts of old impl mixed with the new parts in
Lexer from src/main/java.


>
> Benedikt
>
> >
> >
> > 2013/5/3 <britter@apache.org>
> >
> > > Author: britter
> > > Date: Fri May  3 06:37:58 2013
> > > New Revision: 1478655
> > >
> > > URL: http://svn.apache.org/r1478655
> > > Log:
> > > Use isDelimiter method instead of != check.
> > >
> > > Modified:
> > >
> > >
> commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/Lexer.java
> > >
> > > Modified:
> > >
> commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/Lexer.java
> > > URL:
> > >
> >
> http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/Lexer.java?rev=1478655&r1=1478654&r2=1478655&view=diff
> > >
> > >
> >
> ==============================================================================
> > > ---
> > >
> commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/Lexer.java
> > > (original)
> > > +++
> > >
> commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/Lexer.java
> > > Fri May  3 06:37:58 2013
> > > @@ -146,7 +146,7 @@ abstract class Lexer {
> > >       * @return true if the given char is a whitespace character
> > >       */
> > >      boolean isWhitespace(final int c) {
> > > -        return c != format.getDelimiter() &&
> > > Character.isWhitespace((char) c);
> > > +        return !isDelimiter(c) && Character.isWhitespace((char) c);
> > >      }
> > >
> > >      /**
> > >
> > >
> > >
> >
> >
> > --
> > http://people.apache.org/~britter/
> > http://www.systemoutprintln.de/
> > http://twitter.com/BenediktRitter
> > http://github.com/britter
> >
>



-- 
http://people.apache.org/~britter/
http://www.systemoutprintln.de/
http://twitter.com/BenediktRitter
http://github.com/britter

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message