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

Commit 3e64c74

Browse files
committed
small refactoring of if/else tests
1 parent c08bfba commit 3e64c74

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/universalJavaApplicationStub

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,15 @@ fi
182182
#################################
183183

184184
# first check system variable "$JAVA_HOME"
185-
if [ -n "$JAVA_HOME" ]; then
185+
if [ -n "$JAVA_HOME" ] ; then
186186
JAVACMD="$JAVA_HOME/bin/java"
187187

188188
# otherwise check "/usr/libexec/java_home" symlinks
189189
elif [ -x /usr/libexec/java_home ]; then
190190
JAVACMD="`/usr/libexec/java_home`/bin/java"
191191

192192
# otherwise check Java standard symlink (old Apple Java)
193-
elif test -h /Library/Java/Home; then
193+
elif [ -h /Library/Java/Home ]; then
194194
JAVACMD="/Library/Java/Home/bin/java"
195195

196196
# fallback: public JRE plugin (Oracle Java)
@@ -209,7 +209,7 @@ fi
209209
####################################################
210210

211211
# display error message if MainClassName is empty
212-
if [ ${JVMMainClass} == "" ]; then
212+
if [ -z ${JVMMainClass} ]; then
213213
# display error message with applescript
214214
osascript -e "tell application \"System Events\" to display dialog \"ERROR launching '${CFBundleName}'!\n\n'MainClass' isn't specified!\nJava application cannot be started!\" with title \"${CFBundleName}\" buttons {\" OK \"} default button 1 with icon path to resource \"${CFBundleIconFile}\" in bundle (path to me)"
215215
# exit with error

0 commit comments

Comments
 (0)