Removed flawed revision attribute
git-svn-id: https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk@552527 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
44aa3d34a0
commit
e31743c34e
|
@ -3,17 +3,13 @@ package org.apache.http.client;
|
|||
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) {
|
||||
|
@ -52,23 +48,4 @@ public class VersionInfo {
|
|||
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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue