[jboss-cvs] JBossAS SVN: r59331 - branches/Branch_3_2/system/src/main/org/jboss

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jan 4 05:44:25 EST 2007


Author: dimitris at jboss.org
Date: 2007-01-04 05:44:22 -0500 (Thu, 04 Jan 2007)
New Revision: 59331

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

Modified: branches/Branch_3_2/system/src/main/org/jboss/Version.java
===================================================================
--- branches/Branch_3_2/system/src/main/org/jboss/Version.java	2007-01-04 10:43:32 UTC (rev 59330)
+++ branches/Branch_3_2/system/src/main/org/jboss/Version.java	2007-01-04 10:44:22 UTC (rev 59331)
@@ -1,8 +1,8 @@
 /*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
  *
  * This is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as
@@ -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