-
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
#1065: Add SHA-256 checksum generator to url-updater #1089
Conversation
Because the status json handling that was done before seemed wrong I refactored the corresponding methods/classes.
…009-Create-crawler-Create-1008-create-URL-checker
Updated Pom.xml
…irrors-1009-Create-crawler-Create-1008-create-URL-checker
…awler-Create-1008-create-URL-checker' of https://github.com/Amueller36/ide into feature-941-New-approach-for-ide-mirrors-1009-Create-crawler-Create-1008-create-URL-checker
…009-Create-crawler-Create-1008-create-URL-checker
…ling/UrlVersion.java Co-authored-by: sonatype-lift[bot] <37194012+sonatype-lift[bot]@users.noreply.github.com>
Refactored UpdateManager Fixxed problem with HelmCrawler, which caused no versions to be found. Fixxed MavenCrawler not creating status.json files. Rancher now is part of the folder docker. Added support For Kotlin due to ticket devonfw#1039
Refactored UpdateManager Fixxed problem with HelmCrawler, which caused no versions to be found. Fixxed MavenCrawler not creating status.json files. Rancher now is part of the folder docker. Added support For Kotlin due to ticket devonfw#1039
…009-Create-crawler-Create-1008-create-URL-checker
…009-Create-crawler-Create-1008-create-URL-checker
Aligned Kotlin Native Convention with commandlet
…009-Create-crawler-Create-1008-create-URL-checker
…awler-Create-1008-create-URL-checker' of https://github.com/Amueller36/ide into feature-941-New-approach-for-ide-mirrors-1009-Create-crawler-Create-1008-create-URL-checker
throw new IllegalStateException("Failed to create checksum " + e); | ||
} | ||
|
||
try (BufferedWriter checksumFile = new BufferedWriter(new FileWriter(file + ".sha256"))) { |
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.
DefaultCharset: Implicit use of the platform default charset, which can result in differing behaviour between JVM executions or incorrect behavior if the encoding of the data source doesn't match expectations.
try (BufferedWriter checksumFile = new BufferedWriter(new FileWriter(file + ".sha256"))) { | |
try (BufferedWriter checksumFile = Files.newBufferedWriter(Paths.get(file + ".sha256"), Charset.defaultCharset())) { |
ℹ️ Expand to see all @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.
Help us improve LIFT! (Sonatype LiftBot external survey)
Was this a good recommendation for you? Answering this survey will not impact your Lift settings.
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
|
||
/** | ||
* @param inputStream the input stream of requested url | ||
* @return |
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.
EmptyBlockTag: A block tag (@param, @return, @throws, @deprecated) has an empty description. Block tags without descriptions don't add much value for future readers of the code; consider removing the tag entirely or adding a description.
* @return | |
* |
ℹ️ Expand to see all @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.
Help us improve LIFT! (Sonatype LiftBot external survey)
Was this a good recommendation for you? Answering this survey will not impact your Lift settings.
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
* start the generator to create checksums of .urls files | ||
* @param files iterate over files to find .urls files | ||
*/ | ||
public void generateChecksums(File[] files) { |
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.
AvoidObjectArrays: Avoid accepting a File[]; consider an Iterable instead
ℹ️ Expand to see all @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.
Help us improve LIFT! (Sonatype LiftBot external survey)
Was this a good recommendation for you? Answering this survey will not impact your Lift settings.
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
throw new IllegalStateException("Failed to create checksum " + e); | ||
} | ||
|
||
try (BufferedWriter checksumFile = new BufferedWriter(new FileWriter(file + ".sha256"))) { |
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.
PATH_TRAVERSAL_OUT: This API (java/io/FileWriter.(Ljava/lang/String;)V) writes to a file whose location might be specified by user input
ℹ️ Expand to see all @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.
Help us improve LIFT! (Sonatype LiftBot external survey)
Was this a good recommendation for you? Answering this survey will not impact your Lift settings.
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
return URLStatusSuccess; | ||
} | ||
|
||
public void setSuccess(URLStatusSuccess URLStatusSuccess) { |
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.
VariableNameSameAsType: Variable named URLStatusSuccess has the type URLStatusSuccess. Calling methods using "URLStatusSuccess.something" are difficult to distinguish between static and instance methods.
❗❗ 5 similar findings have been found in this PR
🔎 Expand here to view all instances of this finding
File Path | Line Number |
---|---|
url-updater/src/main/java/com/devonfw/tools/ide/url/updater/AbstractCrawler.java | 159 |
url-updater/src/main/java/com/devonfw/tools/ide/url/folderhandling/jsonfile/URLStatus.java | 22 |
url-updater/src/main/java/com/devonfw/tools/ide/url/updater/AbstractCrawler.java | 132 |
url-updater/src/main/java/com/devonfw/tools/ide/url/folderhandling/jsonfile/URLStatus.java | 4 |
url-updater/src/main/java/com/devonfw/tools/ide/url/folderhandling/jsonfile/URLStatus.java | 5 |
Visit the Lift Web Console to find more details in your report.
ℹ️ Expand to see all @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.
Help us improve LIFT! (Sonatype LiftBot external survey)
Was this a good recommendation for you? Answering this survey will not impact your Lift settings.
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
No description provided.