Hi all,

I've looked through the code base of [text] and I already did some clean
up. However there are a few things, that need more work IMHO:

1. IP clearance! There are several comments talking about code adapted from
PHP libraries. This needs to be listed in NOTICE.txt. For an example see
the NOTICE.txt in [lang].

2. The names package needs work. Currently the HumanNameParser takes a Name
object (which is just a wrapper around a String) as parameter. The parse
result is then saved in fields (e.g. firstName). This makes the parser
unusable after it has parsed a name. I think the API should be reworked
such as:
- The constructor of the parser takes configuration options which can be
reused for several names to parse
- the parse method takes a string as parameter, containing a name
- the parse method returns an immutable Name objects which has getters for
firstName, lastName etc.

3. There are a some useless JavaDocs, which can be dropped. For example:
/**
 * Middle name.
 */
private String middle;

Better rename the variable to middleName and drop the comment.

4. Several classes have no tests. The overall test coverage looks good, so
this may not be a problem.

5. I don't think the shade configuration is correct. To me it looks like
commons-text depends on [lang] and also shades some classes. Do we really
need the explicit dependency? Furthermore, why do we need to shade so many
classes? Why do we need anything beside StringUtils?

Nevertheless, this library looks very good. Kudos to Bruno for pushing this
forward!

Regards,
Benedikt






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

Reply via email to