[jboss-cvs] JBossAS SVN: r59332 - trunk/system/src/main/org/jboss

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jan 4 05:46:26 EST 2007


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

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

Modified: trunk/system/src/main/org/jboss/Version.java
===================================================================
--- trunk/system/src/main/org/jboss/Version.java	2007-01-04 10:44:22 UTC (rev 59331)
+++ trunk/system/src/main/org/jboss/Version.java	2007-01-04 10:46:22 UTC (rev 59332)
@@ -1,24 +1,24 @@
 /*
-* 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.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
+ * 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
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss;
 
 import java.io.IOException;
@@ -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