|
1 | 1 | /******************************************************************************* |
2 | | -* Copyright (c) 2022, 2023 IBM Corporation and others. |
| 2 | +* Copyright (c) 2022, 2025 IBM Corporation and others. |
3 | 3 | * |
4 | 4 | * This program and the accompanying materials are made available under the |
5 | 5 | * terms of the Eclipse Public License v. 2.0 which is available at |
@@ -147,14 +147,14 @@ private String getCommandFromWrapper() { |
147 | 147 |
|
148 | 148 | private String getCommandFromPreferences() throws IllegalStateException { |
149 | 149 |
|
150 | | - String installLocPref = getInstallLocationPreferenceString(); |
151 | | - if (installLocPref == null || installLocPref.isBlank() || installLocPref.isEmpty()) { |
152 | | - if (Trace.isEnabled()) { |
153 | | - Trace.getTracer().trace(Trace.TRACE_TOOLS, "The mvn/gradle preference path: " + installLocPref + " was null, blank, or empty"); |
154 | | - } |
155 | | - return null; |
156 | | - } |
157 | | - |
| 150 | + String installLocPref = getInstallLocationPreferenceString(); |
| 151 | + if (installLocPref == null || installLocPref.isBlank() || installLocPref.isEmpty()) { |
| 152 | + if (Trace.isEnabled()) { |
| 153 | + Trace.getTracer().trace(Trace.TRACE_TOOLS, "The mvn/gradle preference path: " + installLocPref + " was null, blank, or empty"); |
| 154 | + } |
| 155 | + return null; |
| 156 | + } |
| 157 | + |
158 | 158 | File tempCmdFile = new File(installLocPref + File.separator + "bin" + File.separator + getExecBaseName()); |
159 | 159 | String cmdPathStr = tempCmdFile.getPath(); |
160 | 160 |
|
@@ -187,9 +187,9 @@ private String getCommandFromPathEnvVar() throws IllegalStateException { |
187 | 187 |
|
188 | 188 | String[] pathMembers = pathEnv.split(File.pathSeparator); |
189 | 189 | for (String member : pathMembers) { |
190 | | - if (member.isBlank() || member.isEmpty()) { |
191 | | - continue; |
192 | | - } |
| 190 | + if (member.isBlank() || member.isEmpty()) { |
| 191 | + continue; |
| 192 | + } |
193 | 193 | File tempFile = new File(member + File.separator + executableBaseName); |
194 | 194 | if (tempFile.exists()) { |
195 | 195 | foundCmd = tempFile.getPath(); |
|
0 commit comments