Replace usage of package org.codehaus.plexus.util.IOUtil with Java native methods.#7076
Merged
pepness merged 1 commit intoapache:masterfrom Feb 24, 2024
Merged
Conversation
sdedic
reviewed
Feb 19, 2024
java/maven/src/org/netbeans/modules/maven/customizer/CustomizerProviderImpl.java
Show resolved
Hide resolved
mbien
approved these changes
Feb 21, 2024
Member
mbien
left a comment
There was a problem hiding this comment.
looks good. left some comments for you to consider.
apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/NBMNativeMWI.java
Outdated
Show resolved
Hide resolved
apisupport/maven.apisupport/src/org/netbeans/modules/maven/apisupport/NBMNativeMWI.java
Outdated
Show resolved
Hide resolved
java/maven/src/org/netbeans/modules/maven/execute/MavenCommandLineExecutor.java
Outdated
Show resolved
Hide resolved
mbien
reviewed
Feb 21, 2024
java/maven/src/org/netbeans/modules/maven/execute/MavenCommandLineExecutor.java
Show resolved
Hide resolved
- Use `try-with-resources` instead of `IOUtil.close()` method - Use `readAllBytes()` instead of `IOUtil.toByteArray()` - Bump `javac.source` and `javac.target` to version 11 in module `maven.checkstyle`. Needed for method `readAllBytes()` and to use a variable inside `try-with-resources` - Add `Maven` as a display category to the module `maven.checkstyle` - Use one wrapped stream instead of two - Use native JDK method `Files.copy` instead of NetBeans method `FileUtil.copy`
23fbff0 to
f88417a
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
try-with-resourcesinstead ofIOUtil.close()methodreadAllBytes()instead ofIOUtil.toByteArray()javac.sourceandjavac.targetto version 11 in modulemaven.checkstyle. Needed for methodreadAllBytes()and to use a variable insidetry-with-resourcesMavenas a display category to the modulemaven.checkstyleNetBeans Testing:
maven.apisupport,maven.checkstyle, andmaven