users@javaserverfaces.java.net

Which is the "highest" version of a resource or a library?

From: <rogersuen_at_live.com>
Date: Mon, 27 Dec 2010 08:01:28 +0000 (GMT)

Hi there,

According to the spec:

// Look in the libraryPaths for versioned libraries.
// If one or more versioned libraries are found, take
// the one with the “highest” version number as the value
// of libraryVersion. If no versioned libraries
// are found, let libraryVersion remain null.

For example, I have 3 versions: 1_9 and 1_10, 1_11, which one is the
"highest" one?
I ask this question because I found the following code in the
VersionInfo implementation:

 127 public int compareTo(Object o) {
  128 assert(o instanceof VersionInfo);
  129 VersionInfo c = (VersionInfo) o;
  130 return (this.version.compareTo(c.version));
  131 }

Based on the above code, the highest one will be "1_9". Should I
encode the version as "1_09" instead of "1_9" ?

Roger Suen