You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2023/02/26 18:57:24 UTC

[maven-resolver] branch direct-write updated (f9de8896 -> 6d4ab15e)

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch direct-write
in repository https://gitbox.apache.org/repos/asf/maven-resolver.git


 discard f9de8896 Direct write
     new 6d4ab15e Direct write

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (f9de8896)
            \
             N -- N -- N   refs/heads/direct-write (6d4ab15e)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/eclipse/aether/internal/impl/DefaultFileProcessor.java   | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)


[maven-resolver] 01/01: Direct write

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch direct-write
in repository https://gitbox.apache.org/repos/asf/maven-resolver.git

commit 6d4ab15ef91e9b78bc1510b81a4628a4ca0c8788
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Feb 26 17:55:41 2023 +0100

    Direct write
---
 .../eclipse/aether/internal/impl/DefaultTrackingFileManager.java | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultTrackingFileManager.java b/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultTrackingFileManager.java
index 793ece14..80ea1062 100644
--- a/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultTrackingFileManager.java
+++ b/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultTrackingFileManager.java
@@ -31,7 +31,6 @@ import java.nio.file.Path;
 import java.util.Map;
 import java.util.Properties;
 
-import org.eclipse.aether.util.FileUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -46,7 +45,7 @@ public final class DefaultTrackingFileManager implements TrackingFileManager {
     @Override
     public Properties read(File file) {
         Path filePath = file.toPath();
-        if (Files.isRegularFile(filePath)) {
+        if (Files.isReadable(filePath)) {
             try (InputStream stream = Files.newInputStream(filePath)) {
                 Properties props = new Properties();
                 props.load(stream);
@@ -86,15 +85,15 @@ public final class DefaultTrackingFileManager implements TrackingFileManager {
                 }
             }
 
-            FileUtils.writeFile(filePath, p -> {
-                try (OutputStream stream = Files.newOutputStream(p)) {
+            if (Files.isWritable(filePath)) {
+                try (OutputStream stream = Files.newOutputStream(filePath)) {
                     LOGGER.debug("Writing tracking file '{}'", file);
                     props.store(
                             stream,
                             "NOTE: This is a Maven Resolver internal implementation file"
                                     + ", its format can be changed without prior notice.");
                 }
-            });
+            }
         } catch (IOException e) {
             LOGGER.warn("Failed to write tracking file '{}'", file, e);
             throw new UncheckedIOException(e);