Skip to content

Commit

Permalink
SOLR-16721 Java version detection fails when _JAVA_OPTIONS is set (#…
Browse files Browse the repository at this point in the history
…1502)

Signed-off-by: Jan Høydahl <janhoy@users.noreply.github.com>
  • Loading branch information
janhoy committed Apr 10, 2023
1 parent c118a9b commit 7e61b55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions solr/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Bug Fixes

* SOLR-16734: SOLR_DATA_HOME is only honored in verbode mode (Kevin Risden)

* SOLR-16721: Java version detection fails when `_JAVA_OPTIONS` is set (janhoy, Ruoyu Zhong, Andy Webb)

* SOLR-16649: Http2SolrClient.processErrorsAndResponse uses wrong instance of ResponseParser (Andrzej Białecki)

Other Changes
Expand Down
2 changes: 1 addition & 1 deletion solr/bin/solr
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ if [[ $? -ne 0 ]] ; then
echo >&2 "${PATH}"
exit 1
else
JAVA_VER_NUM=$(echo "$JAVA_VER" | head -1 | awk -F '"' '/version/ {print $2}' | sed -e's/^1\.//' | sed -e's/[._-].*$//')
JAVA_VER_NUM=$(echo "$JAVA_VER" | grep -v '_OPTIONS' | head -1 | awk -F '"' '/version/ {print $2}' | sed -e's/^1\.//' | sed -e's/[._-].*$//')
if [[ "$JAVA_VER_NUM" -lt "$JAVA_VER_REQ" ]] ; then
echo >&2 "Your current version of Java is too old to run this version of Solr."
echo >&2 "We found major version $JAVA_VER_NUM, using command '${JAVA} -version', with response:"
Expand Down

0 comments on commit 7e61b55

Please sign in to comment.