This repository was archived by the owner on Jun 7, 2022. It is now read-only.
Removing the manuell download links and replacing them with an automatic system#348
Open
DerEingerostete wants to merge 4 commits intoCloudNetService:developmentfrom
Open
Removing the manuell download links and replacing them with an automatic system#348DerEingerostete wants to merge 4 commits intoCloudNetService:developmentfrom
DerEingerostete wants to merge 4 commits intoCloudNetService:developmentfrom
Conversation
DeepCode's analysis on #4e8f8e found:
Top issues
👉 View analysis in DeepCode’s Dashboard | Configure the bot |
TheMeinerLP
approved these changes
Apr 11, 2021
| for (GetBukkitVersion version : versions) | ||
| versionsMap.put(version.getVersion(), version); | ||
|
|
||
| while (true) { |
Contributor
There was a problem hiding this comment.
Can you improve this loop based on the result of "test"
...dnet-setup/src/main/java/eu/cloudnetservice/cloudnet/v2/setup/spigot/SetupSpigotVersion.java
Show resolved
Hide resolved
| URL url = version.getDownloadURL(); | ||
| return download.test(url.toString()); | ||
| } catch (IOException exception) { | ||
| exception.printStackTrace(); |
| short searchFor = 0; //0 -> "Version" Text; 1 -> Actual Version; 2 -> Download Link | ||
|
|
||
| String line; | ||
| while ((line = reader.readLine()) != null) { |
Contributor
There was a problem hiding this comment.
make you condition right and you need no break!
Member
There was a problem hiding this comment.
Whilst I appreciate your help, please give more constructive feedback.
What would be the correct condition to check for?
| InputStream input = connection.getInputStream(); | ||
| try (BufferedReader reader = new BufferedReader(new InputStreamReader(input))) { | ||
| String line; | ||
| while ((line = reader.readLine()) != null) { |
Contributor
There was a problem hiding this comment.
Make the conndition right and move the return value into a temp variable
Member
There was a problem hiding this comment.
Whilst I appreciate your help, please give more constructive feedback.
What would be the correct condition to check for?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request includes:
Changes made to the repository:
I removed the manuell download links for GetBukkit.org and replaced them with a system that automaticaly gets all versions that can be downloaded from GetBukkit.org.
Documentation of test results:
Just tested if the funktion works as intended and if performance is okay (it worked and I improved performance after testing)
Related issues/discussions:
No related issues