if (version.equals(gerVersion) ||
(gerVersion.endsWith("*") &&
version.startsWith(gerVersion.substring(0, gerVersion.length()-1))) {The other choice, would be to treat "." and "-" differently, as in if ( version.equals(gerVersion) ||((gerVersion.endsWith(".*") && version.startsWith(gerVersion.substring(0, gerVersion.length()-2)) || ((gerVersion.endsWith("-*") && version.startsWith(gerVersion.substring(0, gerVersion.length()-2)) ) {
which has the requirement that plugins being developed and tested against -SNAPSHOT builds be rereleased for the final .rcN or 1.N build....
-Donald Dain Sundstrom wrote:
On Jun 9, 2006, at 2:13 PM, Aaron Mulder wrote:My main objection to that is then there's no way to say "1.1 only". We would have to call 1.1 "1.1.0" so that "1.1" and "1.1.*" would be different. Or, I suppose, change your patch to gerVersion.length()-1 and encourage "1.1*" not "1.1.*"I guess my code was bad. My intention was you could call out specific versions. Here is a table of what I wanted to happen:Input Version Range ----- ------------- 1.1 1.1 1.1.* [1.1-1.2) 1.1.1 1.1.1 1.1.1.* [1.1.1-1.1.2)and here is the code I posted for those that don't wan to read back in the thread:if (version.equals(gerVersion) || (gerVersion.endsWith(".*" &&version.startsWith(gerVersion.substring(0, gerVersion.length () - 2))) {With that if statement, the "glob" part of the match only executes if the version ended with ".*" otherwise it must be an exact match.-dain
smime.p7s
Description: S/MIME Cryptographic Signature
