Skip to content

Commit 48c746d

Browse files
committed
Bump the buck version
1 parent 03253f9 commit 48c746d

3 files changed

Lines changed: 18 additions & 8 deletions

File tree

.buckhash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d03e405da061819c5b0647b1ea3b26ff
1+
94c5faec28e2b558e093eefe172b241e

.buckversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
35906a88243594636b9c4f68cf0423dd9aa0808b
1+
37eee6cd1a13292b45e2e682b32afae1efb9526b

java/client/src/org/openqa/selenium/internal/BuildInfo.java

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import java.io.File;
2121
import java.io.IOException;
22+
import java.io.InputStream;
2223
import java.net.URISyntaxException;
2324
import java.net.URL;
2425
import java.util.Map.Entry;
@@ -27,6 +28,7 @@
2728
import java.util.jar.Attributes;
2829
import java.util.jar.JarFile;
2930
import java.util.jar.Manifest;
31+
import java.util.zip.ZipEntry;
3032

3133
/**
3234
* Reads information about how the current application was built from the Build-Info section of the
@@ -45,11 +47,19 @@ private static Properties loadBuildProperties() {
4547
URL url = BuildInfo.class.getProtectionDomain().getCodeSource().getLocation();
4648
File file = new File(url.toURI());
4749
jar = new JarFile(file);
50+
ZipEntry entry = jar.getEntry("META-INF/build-stamp.properties");
51+
if (entry != null) {
52+
try (InputStream stream = jar.getInputStream(entry)) {
53+
properties.load(stream);
54+
}
55+
}
56+
4857
manifest = jar.getManifest();
49-
} catch (NullPointerException ignored) {
50-
} catch (URISyntaxException ignored) {
51-
} catch (IOException ignored) {
52-
} catch (IllegalArgumentException ignored) {
58+
} catch (
59+
IllegalArgumentException |
60+
IOException |
61+
NullPointerException |
62+
URISyntaxException ignored) {
5363
} finally {
5464
if (jar != null) {
5565
try {
@@ -84,12 +94,12 @@ public String getReleaseLabel() {
8494

8595
/** @return The embedded build revision or "unknown". */
8696
public String getBuildRevision() {
87-
return BUILD_PROPERTIES.getProperty("Build-Revision", "unknown");
97+
return BUILD_PROPERTIES.getProperty("build-revision", "unknown");
8898
}
8999

90100
/** @return The embedded build time or "unknown". */
91101
public String getBuildTime() {
92-
return BUILD_PROPERTIES.getProperty("Build-Time", "unknown");
102+
return BUILD_PROPERTIES.getProperty("build-timestamp", "unknown");
93103
}
94104

95105
@Override

0 commit comments

Comments
 (0)