@@ -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