bmhm edited a comment on issue #58: [MENFORCER-288] Support new Java versioning 
schema for older versions.
URL: https://github.com/apache/maven-enforcer/pull/58#issuecomment-565736113
 
 
   Actually, `enforceVersion` compares the systemProperty against a version 
range. The version range must be normalized or each put through 
JavaVersion.parse(). But this will not help, because if the range says (6 
through 8), JavaVersion.compare will not accept with a VersionRange argument.
   
   Example:
   I use 
   ```xml
   <requireJavaVersion>
       <version>(,7),(7,)</version> <!-- not java 7 -->
   </requireJavaVersion>
   ```
   
   Then I get `JavaVersion("1.7")` from the system property. The `compareTo` 
method is useless, and the version range cannot be normalized. I do not thing 
`getVersion` should be parsed before handling over to the `enforceVersion` 
method. Should it?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to