File tree Expand file tree Collapse file tree
src/main/java/fr/sandro642/github/update Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ plugins {
55}
66
77group = ' fr.sandro642.github'
8- version = ' 0.3.9.2 -STABLE'
8+ version = ' 0.3.9.3 -STABLE'
99
1010// Générer une classe de version automatiquement
1111task generateVersionClass {
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ public class RetrieveLastVersion {
2626 * Fetches the latest version from the GitHub API.
2727 * It sends a GET request to the tags endpoint of the ConnectLib repository
2828 * and retrieves the name of the first tag, which represents the latest version.
29- * @return
3029 */
3130 public String fetchVersion () {
3231 try {
@@ -40,7 +39,7 @@ public String fetchVersion() {
4039 Gson gson = new Gson ();
4140 JsonArray data = gson .fromJson (response .body (), JsonArray .class );
4241
43- if (data != null && data .size () > 0 ) {
42+ if (data != null && ! data .isEmpty () ) {
4443 JsonObject firstTag = data .get (0 ).getAsJsonObject ();
4544 return firstTag .get ("name" ).getAsString ();
4645 } else {
You can’t perform that action at this time.
0 commit comments