[jboss-cvs] JBossCache/src/org/jboss/cache ...
Manik Surtani
msurtani at jboss.com
Wed Dec 13 13:00:00 EST 2006
User: msurtani
Date: 06/12/13 13:00:00
Modified: src/org/jboss/cache Version.java
Log:
added code name to printout
Revision Changes Path
1.24 +147 -135 JBossCache/src/org/jboss/cache/Version.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Version.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/Version.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- Version.java 17 Nov 2006 13:54:21 -0000 1.23
+++ Version.java 13 Dec 2006 18:00:00 -0000 1.24
@@ -6,13 +6,14 @@
* Contains version information about this release of TreeCache.
*
* @author Bela Ban
- * @version $Id: Version.java,v 1.23 2006/11/17 13:54:21 msurtani Exp $
+ * @version $Id: Version.java,v 1.24 2006/12/13 18:00:00 msurtani Exp $
*/
-public class Version {
- public static final String version="2.0.0.ALPHA1";
+public class Version
+{
+ public static final String version = "2.0.0.ALPHA1";
public static final String codename = "Habanero";
- public static byte[] version_id={'0', '2', '0', '0', 'a'};
- public static final String cvs="$Id: Version.java,v 1.23 2006/11/17 13:54:21 msurtani Exp $";
+ public static byte[] version_id = {'0', '2', '0', '0', 'a'};
+ public static final String cvs = "$Id: Version.java,v 1.24 2006/12/13 18:00:00 msurtani Exp $";
private static final int MAJOR_SHIFT = 11;
private static final int MINOR_SHIFT = 6;
@@ -20,14 +21,16 @@
private static final int MINOR_MASK = 0x0007c0;
private static final int PATCH_MASK = 0x00003f;
- private static final short SHORT_1_2_3 = encodeVersion(1,2,3);
- private static final short SHORT_1_2_4_SP2 = encodeVersion(1,2,4);
+ private static final short SHORT_1_2_3 = encodeVersion(1, 2, 3);
+ private static final short SHORT_1_2_4_SP2 = encodeVersion(1, 2, 4);
/**
* Prints version information.
*/
- public static void main(String[] args) {
+ public static void main(String[] args)
+ {
System.out.println("\nVersion: \t" + version);
+ System.out.println("Codename: \t" + codename);
System.out.println("CVS: \t" + cvs);
System.out.println("History: \t(see http://jira.jboss.com/jira/browse/JBCACHE for details)\n");
}
@@ -35,44 +38,52 @@
/**
* Returns version information as a string.
*/
- public static String printVersion() {
+ public static String printVersion()
+ {
return "JBossCache '" + codename + "' " + version + "[ " + cvs + "]";
}
- public static String printVersionId(byte[] v, int len) {
- StringBuffer sb=new StringBuffer();
- if(v != null) {
- if(len <= 0)
- len=v.length;
- for(int i=0; i < len; i++)
- sb.append((char)v[i]);
+ public static String printVersionId(byte[] v, int len)
+ {
+ StringBuffer sb = new StringBuffer();
+ if (v != null)
+ {
+ if (len <= 0)
+ len = v.length;
+ for (int i = 0; i < len; i++)
+ sb.append((char) v[i]);
}
return sb.toString();
}
- public static String printVersionId(byte[] v) {
- StringBuffer sb=new StringBuffer();
- if(v != null) {
- for(int i=0; i < v.length; i++)
- sb.append((char)v[i]);
+ public static String printVersionId(byte[] v)
+ {
+ StringBuffer sb = new StringBuffer();
+ if (v != null)
+ {
+ for (int i = 0; i < v.length; i++)
+ sb.append((char) v[i]);
}
return sb.toString();
}
- public static boolean compareTo(byte[] v) {
- if(v == null)
+ public static boolean compareTo(byte[] v)
+ {
+ if (v == null)
return false;
- if(v.length < version_id.length)
+ if (v.length < version_id.length)
return false;
- for(int i=0; i < version_id.length; i++) {
- if(version_id[i] != v[i])
+ for (int i = 0; i < version_id.length; i++)
+ {
+ if (version_id[i] != v[i])
return false;
}
return true;
}
- public static int getLength() {
+ public static int getLength()
+ {
return version_id.length;
}
@@ -137,7 +148,7 @@
int major = (version & MAJOR_MASK) >> MAJOR_SHIFT;
int minor = (version & MINOR_MASK) >> MINOR_SHIFT;
int patch = (version & PATCH_MASK);
- String versionString = major +"."+minor+"."+patch;
+ String versionString = major + "." + minor + "." + patch;
return versionString;
}
@@ -151,6 +162,7 @@
public static void main(String[] args)
{
System.out.println("\nVersion: \t" + version + " (Retroweaved for JDK 1.4.x compatibility)");
+ System.out.println("Codename: \t" + codename);
System.out.println("CVS: \t" + cvs);
System.out.println("History: \t(see http://jira.jboss.com/jira/browse/JBCACHE for details)\n");
}
More information about the jboss-cvs-commits
mailing list