hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r552527 - /jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/VersionInfo.java
Date Mon, 02 Jul 2007 16:12:44 GMT
Author: olegk
Date: Mon Jul  2 09:12:43 2007
New Revision: 552527

URL: http://svn.apache.org/viewvc?view=rev&rev=552527
Log:
Removed flawed revision attribute

Modified:
    jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/VersionInfo.java

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/VersionInfo.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/VersionInfo.java?view=diff&rev=552527&r1=552526&r2=552527
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/VersionInfo.java
(original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/VersionInfo.java
Mon Jul  2 09:12:43 2007
@@ -3,17 +3,13 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.Properties;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
 
 public class VersionInfo {
 
     private static final String RESOURCE = "org/apache/http/client/version.properties";
-    private static final String REV = "$Revision$";
 
     private static Properties RELEASE_PROPERTIES;
     private static String RELEASE_VERSION;
-    private static Long REV_VERSION;
 
     private static Properties getReleaseProperties() {
         if (RELEASE_PROPERTIES == null) {
@@ -50,25 +46,6 @@
             }
         }
         return RELEASE_VERSION;
-    }
-    
-    public static long getRevision() {
-        if (REV_VERSION == null) {
-            Pattern p = Pattern.compile("\\$Revision: (\\d*) \\$");
-            Matcher m = p.matcher(REV);
-            if (m.matches()) {
-                String s = m.group(1);
-                try {
-                    REV_VERSION = new Long(Long.parseLong(s));
-                } catch (NumberFormatException ex) {
-                    // shamelessly munch this exception
-                }
-            }
-            if (REV_VERSION == null) {
-                REV_VERSION = new Long(-1);
-            }
-        }
-        return REV_VERSION.intValue();
     }
     
 }



Mime
View raw message