-
Notifications
You must be signed in to change notification settings - Fork 751
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
[Refactoring] Replace Paths.get
with Path.of
#43093
Merged
gimantha
merged 6 commits into
ballerina-platform:master
from
Shadow-Devil:replace-paths-get-with-path-of
Oct 4, 2024
Merged
[Refactoring] Replace Paths.get
with Path.of
#43093
gimantha
merged 6 commits into
ballerina-platform:master
from
Shadow-Devil:replace-paths-get-with-path-of
Oct 4, 2024
Conversation
This file contains 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
Shadow-Devil
requested review from
hevayo,
sameerajayasoma,
warunalakshitha,
mohanvive and
hasithaa
as code owners
July 15, 2024 11:51
tharindu-nw
reviewed
Jul 19, 2024
...r/ballerina-lang/src/main/java/org/ballerinalang/repository/fs/LocalFSPackageRepository.java
Outdated
Show resolved
Hide resolved
...parser/src/test/java/io/ballerinalang/compiler/parser/test/syntax/misc/AbstractMiscTest.java
Show resolved
Hide resolved
...test/java/io/ballerinalang/compiler/parser/test/syntax/statements/AbstractStatementTest.java
Show resolved
Hide resolved
...er/src/test/java/io/ballerinalang/compiler/parser/test/syntax/trivia/AbstractTriviaTest.java
Show resolved
Hide resolved
...rser/src/test/java/io/ballerinalang/compiler/parser/test/syntax/types/AbstractTypesTest.java
Show resolved
Hide resolved
.../formatter-core/src/test/java/org/ballerinalang/formatter/core/actions/FlushActionsTest.java
Outdated
Show resolved
Hide resolved
.../formatter-core/src/test/java/org/ballerinalang/formatter/core/actions/QueryActionsTest.java
Outdated
Show resolved
Hide resolved
...tter-core/src/test/java/org/ballerinalang/formatter/core/actions/SendReceiveActionsTest.java
Outdated
Show resolved
Hide resolved
.../formatter-core/src/test/java/org/ballerinalang/formatter/core/actions/StartActionsTest.java
Outdated
Show resolved
Hide resolved
...s/formatter-core/src/test/java/org/ballerinalang/formatter/core/actions/TrapActionsTest.java
Outdated
Show resolved
Hide resolved
Fixed review suggestions in 52a7874 |
Shadow-Devil
force-pushed
the
replace-paths-get-with-path-of
branch
from
July 20, 2024 19:52
0857e6a
to
566872d
Compare
Shadow-Devil
force-pushed
the
replace-paths-get-with-path-of
branch
2 times, most recently
from
August 2, 2024 12:50
bdb5a15
to
8f8438e
Compare
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the |
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the |
Shadow-Devil
force-pushed
the
replace-paths-get-with-path-of
branch
4 times, most recently
from
September 18, 2024 13:17
8dcf6da
to
17c937f
Compare
Shadow-Devil
requested review from
gimantha,
MaryamZi,
KavinduZoysa,
azinneera,
NipunaRanasinghe,
Dilhasha and
keizer619
as code owners
September 18, 2024 13:17
Shadow-Devil
force-pushed
the
replace-paths-get-with-path-of
branch
from
September 20, 2024 12:09
17c937f
to
ea91d29
Compare
@gimantha Thank you for fixing the merge conflicts 😄 |
gimantha
approved these changes
Oct 4, 2024
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.
Purpose
It is recommended to use
Path.of
instead ofPaths.get
.https://www.baeldung.com/java-paths-get-path-of#which-one-should-we-use
Other Improvements:
Path.of("a", "b", "c")
can be replaced withPath.of("a/b/c")
. The Path API is handling OS specific handling.path.resolve("a").resolve("b").resolve("c")
can be replaced withpath.resolve("a/b/c")
.Both improvements are shorter and can be copy-pasted as Linux paths.
Check List