krysalis-version/src/java/org/krysalis/version/impl KrysalisVersion.java,1.28,1.29
[email protected] Fri, 21 Mar 2003 14:04:41 -0800
| Newsgroups | gmane.comp.krysalis.sandbox |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/metamorphosis/krysalis-version/src/java/org/krysalis/version/impl
In directory sc8-pr-cvs1:/tmp/cvs-serv18425/src/java/org/krysalis/version/impl
Modified Files:
KrysalisVersion.java
Log Message:
Compatibility
Index: KrysalisVersion.java
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-version/src/java/org/krysalis/version/impl/KrysalisVersion.java,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** KrysalisVersion.java 17 Mar 2003 22:05:02 -0000 1.28
--- KrysalisVersion.java 21 Mar 2003 22:04:07 -0000 1.29
***************
*** 295,299 ****
buildNumber));
}
! */
/**
--- 295,299 ----
buildNumber));
}
! */
/**
***************
*** 607,633 ****
//:TODO: Understand/Test this code (stolen/copied from Ruper)
! boolean back = true;
if (other instanceof KrysalisVersion) {
KrysalisVersion otherKrysalisVersion = (KrysalisVersion) other;
! back =
! back
! && ((otherKrysalisVersion.getMajor() == 0)
! || (otherKrysalisVersion.getMajor() == getMajor()));
- back =
- back
- && ((getReleaseLevel()
- .compareTo(otherKrysalisVersion.getReleaseLevel())
- >= 0)
- || ((!ReleaseLevel.RELEASE.equals(getReleaseLevel()))
- && (!ReleaseLevel
- .RELEASE
- .equals(
- otherKrysalisVersion.getReleaseLevel()))));
}
! return back;
}
--- 607,643 ----
//:TODO: Understand/Test this code (stolen/copied from Ruper)
! boolean compatible = true;
if (other instanceof KrysalisVersion) {
KrysalisVersion otherKrysalisVersion = (KrysalisVersion) other;
! //
! // Other is 0, or major's equal
! //
! compatible =
! (otherKrysalisVersion.getMajor() == 0)
! || (otherKrysalisVersion.getMajor() == getMajor());
!
! //
! // Release Level Higher, or neither RELEASE
! //
! compatible
! &= (getReleaseLevelObject()
! .compareTo(otherKrysalisVersion.getReleaseLevelObject())
! >= 0)
! || (!ReleaseLevel.RELEASE.equals(getReleaseLevelObject()))
! && (!ReleaseLevel
! .RELEASE
! .equals(otherKrysalisVersion.getReleaseLevelObject()));
}
+ else
+ throw new IllegalArgumentException(
+ "Not a KrysalisVersion: "
+ + other.getClass()
+ + " : "
+ + other.toString());
! return compatible;
}
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en