[jboss-cvs] JBossAS SVN: r59330 - branches/Branch_4_0/system/src/main/org/jboss

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jan 4 05:43:34 EST 2007


Author: dimitris at jboss.org
Date: 2007-01-04 05:43:32 -0500 (Thu, 04 Jan 2007)
New Revision: 59330

Modified:
   branches/Branch_4_0/system/src/main/org/jboss/Version.java
Log:
Add method to return the full version number, correct the toString() formating.

Modified: branches/Branch_4_0/system/src/main/org/jboss/Version.java
===================================================================
--- branches/Branch_4_0/system/src/main/org/jboss/Version.java	2007-01-04 10:42:16 UTC (rev 59329)
+++ branches/Branch_4_0/system/src/main/org/jboss/Version.java	2007-01-04 10:43:32 UTC (rev 59330)
@@ -33,6 +33,7 @@
  *
  * @author <a href="mailto:jason at planet57.com">Jason Dillon</a>
  * @author Scott.Stark at jboss.org
+ * @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
  * @version $Revision$
  */
 public final class Version
@@ -221,6 +222,23 @@
    }
 
    /**
+    * Returns the full version number, e.g. 5.0.0.GA
+    * 
+    * @return The full version number as string
+    */
+   public String getVersionNumber()
+   {
+      StringBuffer buff = new StringBuffer();
+      
+      buff.append(getMajor()).append(".");
+      buff.append(getMinor()).append(".");
+      buff.append(getRevision()).append(".");
+      buff.append(getTag());
+      
+      return buff.toString();      
+   }
+   
+   /**
     * Returns the version information as a string.
     *
     * @return Basic information as a string.
@@ -229,14 +247,13 @@
    {
       StringBuffer buff = new StringBuffer();
       
-      buff.append(getMajor()).append(".");
-      buff.append(getMinor()).append(".");
-      buff.append(getRevision()).append(getTag());
-      buff.append("(build: CVSTag=");
+      buff.append(getVersionNumber());
+      buff.append(" (build: SVNTag=");
       buff.append(getCvsTag());
       buff.append(" date=");
       buff.append(getBuildID());
       buff.append(")");
+      
       return buff.toString();
    }
 




More information about the jboss-cvs-commits mailing list