Skip to content

Commit d0faa53

Browse files
committed
2464: static fix
1 parent 7a75f58 commit d0faa53

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

src/main/java/com/magento/idea/magento2uct/execution/configurations/UctRunConfiguration.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,9 @@ public boolean isNewlyCreated() {
265265
}
266266

267267
if (!getComingVersion().isEmpty()) {
268-
commandSettingsBuilder.addArgument("--current-version=" + Settings.getInstance(getProject()).magentoVersion);
268+
commandSettingsBuilder.addArgument(
269+
"--current-version=" + Settings.getInstance(getProject()).magentoVersion
270+
);
269271
}
270272

271273
final GeneralCommandLine commandLine =

src/main/java/com/magento/idea/magento2uct/packages/SupportedVersion.java

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ public static List<String> getSupportedVersions() {
6464
}
6565

6666
/**
67-
* Fetch supported versions dynamically from Packagist.
68-
* <p>
67+
* Fetch supported versions dynamically from Packagist
6968
* This method performs an HTTP GET request to fetch version data in JSON format
7069
* from a predefined URL and parses it into a list of version strings.
7170
*
@@ -84,11 +83,15 @@ public static List<String> fetchSupportedVersions() throws Exception {
8483
connection.setRequestProperty("Accept", "application/json");
8584

8685
if (connection.getResponseCode() != 200) {
87-
throw new Exception("Failed to fetch data, HTTP response code: " + connection.getResponseCode());
86+
throw new Exception(
87+
"Failed to fetch data, HTTP response code: " + connection.getResponseCode()
88+
);
8889
}
8990

9091
// Read JSON response
91-
try (BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()))) {
92+
try (BufferedReader reader = new BufferedReader(
93+
new InputStreamReader(connection.getInputStream()))
94+
) {
9295
StringBuilder response = new StringBuilder();
9396
String line;
9497
while ((line = reader.readLine()) != null) {
@@ -114,7 +117,10 @@ public static List<String> fetchSupportedVersions() throws Exception {
114117
}
115118
}
116119
} catch (Exception e) {
117-
throw new Exception("Error fetching or parsing supported versions: " + e.getMessage(), e);
120+
throw new Exception(
121+
"Error fetching or parsing supported versions: " + e.getMessage(),
122+
e
123+
);
118124
} finally {
119125
if (connection != null) {
120126
connection.disconnect();

0 commit comments

Comments
 (0)