|
4 | 4 | import java.net.InetAddress;
|
5 | 5 | import java.nio.file.Files;
|
6 | 6 | import java.nio.file.Path;
|
7 |
| -import java.nio.file.Paths; |
8 | 7 | import java.nio.file.attribute.FileTime;
|
9 | 8 | import java.time.Duration;
|
10 | 9 | import java.util.HashMap;
|
@@ -141,7 +140,7 @@ public AbstractIdeContext(IdeLogLevel minLogLevel, Function<IdeLogLevel, IdeSubL
|
141 | 140 | this.fileAccess = new FileAccessImpl(this);
|
142 | 141 | String workspace = WORKSPACE_MAIN;
|
143 | 142 | if (userDir == null) {
|
144 |
| - this.cwd = Paths.get(System.getProperty("user.dir")); |
| 143 | + this.cwd = Path.of(System.getProperty("user.dir")); |
145 | 144 | } else {
|
146 | 145 | this.cwd = userDir.toAbsolutePath();
|
147 | 146 | }
|
@@ -184,7 +183,7 @@ public AbstractIdeContext(IdeLogLevel minLogLevel, Function<IdeLogLevel, IdeSubL
|
184 | 183 | root = System.getenv("IDE_ROOT");
|
185 | 184 | }
|
186 | 185 | if (root != null) {
|
187 |
| - Path rootPath = Paths.get(root); |
| 186 | + Path rootPath = Path.of(root); |
188 | 187 | if (Files.isDirectory(rootPath)) {
|
189 | 188 | if (!ideRootPath.equals(rootPath)) {
|
190 | 189 | warning("Variable IDE_ROOT is set to '{}' but for your project '{}' would have been expected.");
|
@@ -224,12 +223,12 @@ public AbstractIdeContext(IdeLogLevel minLogLevel, Function<IdeLogLevel, IdeSubL
|
224 | 223 | if (isTest()) {
|
225 | 224 | // only for testing...
|
226 | 225 | if (this.ideHome == null) {
|
227 |
| - this.userHome = Paths.get("/non-existing-user-home-for-testing"); |
| 226 | + this.userHome = Path.of("/non-existing-user-home-for-testing"); |
228 | 227 | } else {
|
229 | 228 | this.userHome = this.ideHome.resolve("home");
|
230 | 229 | }
|
231 | 230 | } else {
|
232 |
| - this.userHome = Paths.get(System.getProperty("user.home")); |
| 231 | + this.userHome = Path.of(System.getProperty("user.home")); |
233 | 232 | }
|
234 | 233 | this.userHomeIde = this.userHome.resolve(".ide");
|
235 | 234 | this.downloadPath = this.userHome.resolve("Downloads/ide");
|
@@ -663,8 +662,8 @@ public void gitPullOrClone(Path target, String gitRepoUrl) {
|
663 | 662 | }
|
664 | 663 |
|
665 | 664 | /**
|
666 |
| - * Checks if the Git repository in the specified target folder needs an update by |
667 |
| - * inspecting the modification time of a magic file. |
| 665 | + * Checks if the Git repository in the specified target folder needs an update by inspecting the modification time of |
| 666 | + * a magic file. |
668 | 667 | *
|
669 | 668 | * @param urlsPath The Path to the Urls repository.
|
670 | 669 | * @param repoUrl The git remote URL of the Urls repository.
|
@@ -701,7 +700,6 @@ private void gitPullOrCloneIfNeeded(Path urlsPath, String repoUrl) {
|
701 | 700 | }
|
702 | 701 | }
|
703 | 702 |
|
704 |
| - |
705 | 703 | @Override
|
706 | 704 | public IdeSubLogger level(IdeLogLevel level) {
|
707 | 705 |
|
@@ -814,8 +812,9 @@ public int run(CliArguments arguments) {
|
814 | 812 | }
|
815 | 813 |
|
816 | 814 | /**
|
817 |
| - * @param cmd the potential {@link Commandlet} to {@link #apply(CliArguments, Commandlet, CompletionCandidateCollector) apply} and |
818 |
| - * {@link Commandlet#run() run}. |
| 815 | + * @param cmd the potential {@link Commandlet} to |
| 816 | + * {@link #apply(CliArguments, Commandlet, CompletionCandidateCollector) apply} and {@link Commandlet#run() |
| 817 | + * run}. |
819 | 818 | * @return {@code true} if the given {@link Commandlet} matched and did {@link Commandlet#run() run} successfully,
|
820 | 819 | * {@code false} otherwise (the {@link Commandlet} did not match and we have to try a different candidate).
|
821 | 820 | */
|
|
0 commit comments