[modules-dev] Review of module source code

Stanley M. Ho Stanley.Ho at Sun.COM
Thu Jul 12 14:04:25 PDT 2007


Hi Remi,

Thanks for the review. Most of your comments are valid, and I will 
incorporate them into a future putback.

Rémi Forax wrote:
> 
> - VersionConstraintBuilder
>   i wonder if Version and VersionRange not have an abstract package visible
>   common super class.

I have explored this in the past but it does not only result a new super 
class and but it also makes the code even more complicated. The problem 
is that there isn't a good logical super class that makes sense with 
Version and VersionRange.

> - Version
>    is not a final class so methods get*Version are overridable.

Version is intended to be subclass-able.

>   #compareTo() will not work if one getter is overriden,
>   because it compare fields with getters.

Good catch. This is indeed a problem. I will file a bug on this.

>   #isVersion() and versionPattern can be delocalized in another class
>   to allow lazy creation of the automata (this comment holds if isVersion()
>   is not a method called frequently).

This method is used by VersionConstraint and is used very frequently.

- Stanley



More information about the modules-dev mailing list