-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
941 ide urls with java #1000
941 ide urls with java #1000
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cinnamon-coder-hub thanks. 👍
I left a little review comment for a small rework. Can you address this so I can merge and we can collaborate on this. If you have solved the IDE settings meanwhile you can also perform a CleanUp for the entire project in Eclipse to apply the code format. Thanks in advance.
...pdater/src/main/java/com/devonfw/tools/ide/url/folderhandling/UrlHasChildParentArtifact.java
Outdated
Show resolved
Hide resolved
url-updater/src/main/java/com/devonfw/tools/ide/url/folderhandling/UrlHasChildArtifact.java
Outdated
Show resolved
Hide resolved
url-updater/src/main/java/com/devonfw/tools/ide/url/folderhandling/UrlReader.java
Outdated
Show resolved
Hide resolved
url-updater/src/main/java/com/devonfw/tools/ide/url/folderhandling/UrlReader.java
Outdated
Show resolved
Hide resolved
url-updater/src/main/java/com/devonfw/tools/ide/url/folderhandling/UrlReader.java
Outdated
Show resolved
Hide resolved
url-updater/src/main/java/com/devonfw/tools/ide/url/folderhandling/UrlFile.java
Outdated
Show resolved
Hide resolved
url-updater/src/main/java/com/devonfw/tools/ide/url/folderhandling/UrlFile.java
Outdated
Show resolved
Hide resolved
url-updater/src/main/java/com/devonfw/tools/ide/url/folderhandling/UrlRepository.java
Outdated
Show resolved
Hide resolved
url-updater/src/main/java/com/devonfw/tools/ide/url/folderhandling/UrlReader.java
Outdated
Show resolved
Hide resolved
url-updater/src/main/java/com/devonfw/tools/ide/url/folderhandling/UrlEditor.java
Outdated
Show resolved
Hide resolved
url-updater/src/main/java/com/devonfw/tools/ide/url/folderhandling/UrlEditor.java
Outdated
Show resolved
Hide resolved
url-updater/src/main/java/com/devonfw/tools/ide/url/folderhandling/UrlArtifact.java
Outdated
Show resolved
Hide resolved
Done
You or someone accidentally deleted the submodule
Simply revert this change to fix the build.
It is no problem if the epic is not entirely resolved with this PR. That is the nature of Epics as they are too big.
|
Implemented Missing Crawlers. Renamed package Updater to updater.
…-ide-urls-with-java
HttpRequest request = HttpRequest.newBuilder() | ||
.uri(URI.create(downloadUrl)) | ||
.method("HEAD", HttpRequest.BodyPublishers.noBody()) | ||
.timeout(java.time.Duration.ofSeconds(5)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UnnecessarilyFullyQualified: This fully qualified name is unambiguous to the compiler if imported.
.timeout(java.time.Duration.ofSeconds(5)) | |
.timeout(Duration.ofSeconds(5)) |
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
Set<String> versions = new HashSet<>(); | ||
try { | ||
String response = doGetResponseBody(url); | ||
ObjectMapper mapper = new ObjectMapper().configure(com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UnnecessarilyFullyQualified: This fully qualified name is unambiguous to the compiler if imported.
ObjectMapper mapper = new ObjectMapper().configure(com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); | |
ObjectMapper mapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); |
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
url-updater/src/main/java/com/devonfw/tools/ide/url/folderhandling/UrlVersion.java
Show resolved
Hide resolved
url-updater/src/main/java/com/devonfw/tools/ide/url/folderhandling/UrlVersion.java
Show resolved
Hide resolved
url-updater/src/main/java/com/devonfw/tools/ide/url/folderhandling/UrlArtifact.java
Show resolved
Hide resolved
url-updater/src/main/java/com/devonfw/tools/ide/url/updater/java/JavaCrawler.java
Show resolved
Hide resolved
|
||
public void createFile(String os) { | ||
|
||
File f = new File(this.getPath() + File.separator + os + ".urls"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💬 3 similar findings have been found in this PR
PATH_TRAVERSAL_IN: This API (java/io/File.(Ljava/lang/String;)V) reads a file whose location might be specified by user input
🔎 Expand here to view all instances of this finding
File Path | Line Number |
---|---|
url-updater/src/main/java/com/devonfw/tools/ide/url/folderhandling/UrlVersion.java | 132 |
url-updater/src/main/java/com/devonfw/tools/ide/url/folderhandling/UrlVersion.java | 154 |
url-updater/src/main/java/com/devonfw/tools/ide/url/folderhandling/UrlVersion.java | 166 |
Visit the Lift Web Console to find more details in your report.
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
🛠 Lift Auto-fixSome of the Lift findings in this PR can be automatically fixed. You can download and apply these changes in your local project directory of your branch to review the suggestions before committing.1 # Download the patch
curl https://lift.sonatype.com/api/patch/github.com/devonfw/ide/1000.diff -o lift-autofixes.diff
# Apply the patch with git
git apply lift-autofixes.diff
# Review the changes
git diff Want it all in a single command? Open a terminal in your project's directory and copy and paste the following command: curl https://lift.sonatype.com/api/patch/github.com/devonfw/ide/1000.diff | git apply Once you're satisfied commit and push your changes in your project. Footnotes |
Records caused the build pipeline to fail because needed target version is 16! So I refactored it to use POJO's
url-updater/src/main/java/com/devonfw/tools/ide/url/updater/java/JavaCrawler.java
Show resolved
Hide resolved
url-updater/src/main/java/com/devonfw/tools/ide/url/UpdateInitiator.java
Outdated
Show resolved
Hide resolved
url-updater/src/main/java/com/devonfw/tools/ide/url/UpdateInitiator.java
Outdated
Show resolved
Hide resolved
The build went through now. I had to rewrite the records to pojos because the tests run on java 11. Records require java 16. |
Changed to relative path. Removed Double Slf4J dependency
Added method for updating only existing versions.
Added method for updating only existing versions.
url-updater/src/main/java/com/devonfw/tools/ide/url/UpdateInitiator.java
Show resolved
Hide resolved
This PR was IMHO replaced by PR #1040 that has already been merged. Hence, I am closing it. |
First draft with most of the main functionalities necessary regarding issue #941. This is no final version and further commits will be added soon to tackle the following remarks: