logstash-core 1.5.4.snapshot1-java → 1.5.4.snapshot2-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of logstash-core might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/logstash/util/java_version.rb +3 -0
- data/lib/logstash/version.rb +1 -1
- data/spec/util/java_version_spec.rb +8 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: edafc40bc06b45e7b5063039be8a83beac5322b9
|
4
|
+
data.tar.gz: 7420cdcd0b76058f7a58d0ba08ce6f1c98290e13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef13f617b3c77e4547cbb4deae05319b75169ddb3a4030bd85fbc39c44c6f9e5daf4e8051a8e1f6346371677d18cbceccf37d3b107246c2d7329eead1653c2bb
|
7
|
+
data.tar.gz: 788e9784af3c008b7b9a5df9674f1d921ee6f69eb133d0584a9c88625c2c3037f60fa662527ed293bc58e5922c01e775d7cfec393f54c936e06864d198ab4672
|
@@ -30,6 +30,9 @@ module LogStash::Util::JavaVersion
|
|
30
30
|
# The regex below parses this all correctly http://rubular.com/r/sInQc3Nc7f
|
31
31
|
|
32
32
|
match = version_string.match(/\A(\d+)\.(\d+)\.(\d+)(_(\d+))?(-(.+))?\Z/)
|
33
|
+
|
34
|
+
return nil unless match
|
35
|
+
|
33
36
|
major, minor, patch, ufull, update, bfull, build = match.captures
|
34
37
|
|
35
38
|
{
|
data/lib/logstash/version.rb
CHANGED
@@ -31,6 +31,14 @@ describe "LogStash::Util::JavaVersion" do
|
|
31
31
|
expect(mod.parse_java_version(nil)).to be_nil
|
32
32
|
end
|
33
33
|
|
34
|
+
it "should return nil on non-hotspot javas" do
|
35
|
+
# Not sure this is what is being returned, but it doesn't match the
|
36
|
+
# regex, which is the point
|
37
|
+
expect(mod.parse_java_version("JCL - 20140103_01 based on Oracle 7u51-b11
|
38
|
+
|
39
|
+
")).to be_nil
|
40
|
+
end
|
41
|
+
|
34
42
|
shared_examples("version parsing") do |desc, string, major, minor, patch, update, build|
|
35
43
|
context("#{desc} with version #{string}") do
|
36
44
|
subject(:parsed) { LogStash::Util::JavaVersion.parse_java_version(string) }
|