Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit 58e012e

Browse files
authored
Release version 3.0.6 (PR #82)
Release version 3.0.6
2 parents 782c910 + a749fbb commit 58e012e

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
ChangeLog
22
---------
33

4+
### v3.0.6 (2020-03-19)
5+
* Fixed an issue related to Java 4-8 version number detection (PR #81, Thanks to @thatChadM for his contribution)
6+
47
### v3.0.5 (2019-12-15)
58
* If java is missing, offer a choice between Oracle and AdoptOpenJDK download buttons (#78)
69
* Support Array style `Java:Arguments` for Apple Plist style (#76)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2014-2018 Tobias Fischer
3+
Copyright (c) 2014-2020 Tobias Fischer
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

src/universalJavaApplicationStub

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
# #
1212
# @author Tobias Fischer #
1313
# @url https://github.com/tofi86/universalJavaApplicationStub #
14-
# @date 2019-12-15 #
15-
# @version 3.0.5 #
14+
# @date 2020-03-19 #
15+
# @version 3.0.6 #
1616
# #
1717
##################################################################################
1818
# #
1919
# The MIT License (MIT) #
2020
# #
21-
# Copyright (c) 2014-2018 Tobias Fischer #
21+
# Copyright (c) 2014-2020 Tobias Fischer #
2222
# #
2323
# Permission is hereby granted, free of charge, to any person obtaining a copy #
2424
# of this software and associated documentation files (the "Software"), to deal #
@@ -477,7 +477,7 @@ function get_comparable_java_version() {
477477
################################################################################
478478
function is_valid_requirement_pattern() {
479479
local java_req=$1
480-
java8pattern='1\.[4-8](\.0)?(\.0_[0-9]+)?[*+]?'
480+
java8pattern='1\.[4-8](\.[0-9]+)?(\.0_[0-9]+)?[*+]?'
481481
java9pattern='(9|1[0-9])(-ea|[*+]|(\.[0-9]+){1,2}[*+]?)?'
482482
# test matches either old Java versioning scheme (up to 1.8) or new scheme (starting with 9)
483483
if [[ ${java_req} =~ ^(${java8pattern}|${java9pattern})$ ]]; then

test/java-version-tester.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# Tests for the functions used in universalJavaApplicationStub script
4-
# tofi86 @ 2018-07-29
4+
# tofi86 @ 2020-02-11
55

66

77

@@ -84,7 +84,7 @@ function get_comparable_java_version() {
8484
################################################################################
8585
function is_valid_requirement_pattern() {
8686
local java_req=$1
87-
java8pattern='1\.[4-8](\.0)?(\.0_[0-9]+)?[*+]?'
87+
java8pattern='1\.[4-8](\.[0-9]+)?(\.0_[0-9]+)?[*+]?'
8888
java9pattern='(9|1[0-9])(-ea|[*+]|(\.[0-9]+){1,2}[*+]?)?'
8989
# test matches either old Java versioning scheme (up to 1.8) or new scheme (starting with 9)
9090
if [[ ${java_req} =~ ^(${java8pattern}|${java9pattern})$ ]]; then
@@ -179,6 +179,7 @@ echo "Tests with Java 1.6:"
179179
testExtractMajor "1.6" "6"
180180
testExtractMajor "1.6+" "6"
181181
testExtractMajor "1.6.0" "6"
182+
testExtractMajor "1.6.2" "6"
182183
testExtractMajor "1.6.0_07" "6"
183184
testExtractMajor "1.6.0_45" "6"
184185
testExtractMajor "1.6.0_65-b14-468" "6"
@@ -328,6 +329,7 @@ testValidReqPattern "1.6.0_45" "0"
328329
testValidReqPattern "1.6.0_45+" "0"
329330
testValidReqPattern "1.6.0_100" "0"
330331
testValidReqPattern "1.6.0_100+" "0"
332+
testValidReqPattern "1.6.2" "0"
331333
echo ""
332334
echo "Tests with old version scheme (invalid requirements):"
333335
testValidReqPattern "1.2" "1"

0 commit comments

Comments
 (0)