aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof KosiƄski <krzysio@google.com>2022-11-03 02:31:06 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-11-03 02:31:06 +0000
commit6e5c098a23b0f35759ab7e1bd03d6fb8a49f32c9 (patch)
treedf7adb687cd40ea449ad38f34f7e10960baf5438
parent7bbad06b0b277dbdbf3da7a33225391d1a1b5f56 (diff)
parent44bee9650ff130fdc7fd4d576301b2f4ff975205 (diff)
downloadjimfs-6e5c098a23b0f35759ab7e1bd03d6fb8a49f32c9.tar.gz
Upgrade jimfs to v1.2. am: 047cfe3604 am: 44bee9650fandroid-u-beta-1-gpl
Original change: https://android-review.googlesource.com/c/platform/external/jimfs/+/2283353 Change-Id: I856ffb95844a4dd3417f21ecc3c560177c6f8b80 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--.github/dependabot.yml10
-rw-r--r--.travis.yml1
-rw-r--r--METADATA4
-rw-r--r--jimfs/src/main/java/com/google/common/jimfs/JimfsPath.java6
-rw-r--r--jimfs/src/main/java/com/google/common/jimfs/PathService.java2
-rw-r--r--jimfs/src/test/java/com/google/common/jimfs/DirectoryTest.java2
-rw-r--r--jimfs/src/test/java/com/google/common/jimfs/JimfsPathTest.java11
-rw-r--r--pom.xml91
-rwxr-xr-xutil/deploy_snapshot.sh2
9 files changed, 94 insertions, 35 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..b76b895
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,10 @@
+version: 2
+updates:
+ - package-ecosystem: "maven"
+ directory: "/"
+ schedule:
+ interval: "daily"
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "daily"
diff --git a/.travis.yml b/.travis.yml
index 0923403..338c662 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -24,7 +24,6 @@ env:
- secure: "bTcwsovwxPXplZysfwgNkTR3hfHjb7UvWMlxeEkHHt3GQiZxIDKkiJbgW2mHAG/e/H0wfKQyujeCgQwxn1fa5ttR+UbGz+TIIY2tgjpIFkSbBRzlNGOO0Y23wQpFXXUv3lAY//cV1pa0HlCz+IWNq7ZqPZAoReDAkxExbbmydtE="
- secure: "JZnVEfpNSCLBZQg1MP7MuhzP9H8t2gGUU4salm5VsRKck27fgg1HwBxADolcVeON2k+2masSKLEQPkeYQizc/VN5hZsCZpTgYjuMke1ZLe1v0KsIdH3Rdt77fhhTqiT1BEkMV8tlBwiraYZz+41iLo+Ug5yjgfmXXayDjYm4h4w="
-
branches:
only:
- master
diff --git a/METADATA b/METADATA
index 5e2f5a7..a237623 100644
--- a/METADATA
+++ b/METADATA
@@ -16,7 +16,7 @@ third_party {
type: GIT
value: "https://github.com/google/jimfs.git"
}
- version: "v1.1"
- last_upgrade_date { year: 2019 month: 12 day: 18 }
+ version: "v1.2"
+ last_upgrade_date { year: 2022 month: 11 day: 2 }
license_type: NOTICE
}
diff --git a/jimfs/src/main/java/com/google/common/jimfs/JimfsPath.java b/jimfs/src/main/java/com/google/common/jimfs/JimfsPath.java
index 7c6b115..9d18837 100644
--- a/jimfs/src/main/java/com/google/common/jimfs/JimfsPath.java
+++ b/jimfs/src/main/java/com/google/common/jimfs/JimfsPath.java
@@ -251,11 +251,7 @@ final class JimfsPath implements Path {
/** Resolves the given name against this path. The name is assumed not to be a root name. */
JimfsPath resolve(Name name) {
- if (name.toString().isEmpty()) {
- return this;
- }
- return pathService.createPathInternal(
- root, ImmutableList.<Name>builder().addAll(names).add(name).build());
+ return resolve(pathService.createFileName(name));
}
@Override
diff --git a/jimfs/src/main/java/com/google/common/jimfs/PathService.java b/jimfs/src/main/java/com/google/common/jimfs/PathService.java
index 49717bd..2bd11a7 100644
--- a/jimfs/src/main/java/com/google/common/jimfs/PathService.java
+++ b/jimfs/src/main/java/com/google/common/jimfs/PathService.java
@@ -19,7 +19,6 @@ package com.google.common.jimfs;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;
-import static com.google.common.jimfs.PathType.ParseResult;
import static java.nio.file.LinkOption.NOFOLLOW_LINKS;
import com.google.common.annotations.VisibleForTesting;
@@ -31,6 +30,7 @@ import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Ordering;
+import com.google.common.jimfs.PathType.ParseResult;
import java.net.URI;
import java.nio.file.FileSystem;
import java.nio.file.Files;
diff --git a/jimfs/src/test/java/com/google/common/jimfs/DirectoryTest.java b/jimfs/src/test/java/com/google/common/jimfs/DirectoryTest.java
index 217509d..1fee1e5 100644
--- a/jimfs/src/test/java/com/google/common/jimfs/DirectoryTest.java
+++ b/jimfs/src/test/java/com/google/common/jimfs/DirectoryTest.java
@@ -217,7 +217,7 @@ public class DirectoryTest {
/*
* If we inline this into the assertThat call below, javac resolves it to assertThat(SortedSet),
- * which isn't available publicly. Our @GoogleInternal checks consider that to be an error, even
+ * which isn't available publicly. Our internal build system considers that to be an error, even
* though the code will compile fine externally by resolving to assertThat(Iterable) instead. So
* we avoid that by assigning to a non-SortedSet type here.
*/
diff --git a/jimfs/src/test/java/com/google/common/jimfs/JimfsPathTest.java b/jimfs/src/test/java/com/google/common/jimfs/JimfsPathTest.java
index da7d43c..5b59081 100644
--- a/jimfs/src/test/java/com/google/common/jimfs/JimfsPathTest.java
+++ b/jimfs/src/test/java/com/google/common/jimfs/JimfsPathTest.java
@@ -219,6 +219,17 @@ public class JimfsPathTest {
}
@Test
+ public void testResolveName_againstEmptyPath() {
+ // resolve(Name) is only used in the DirectoryStream implementation, so it's only used to
+ // resolve the names of real existing files against some base directory's path. The base
+ // directory path could be the working directory path (i.e. just an empty string), in which case
+ // we need to be sure to return a path that is just the name of the file as opposed a path with
+ // two names, one being the empty string and the other the file name).
+ // See https://github.com/google/jimfs/issues/105
+ assertPathEquals("foo", pathService.emptyPath().resolve(Name.simple("foo")));
+ }
+
+ @Test
public void testResolveSibling_givenEmptyPath() {
Path path = pathService.parsePath("foo/bar");
Path resolved = path.resolveSibling("");
diff --git a/pom.xml b/pom.xml
index d35a4c3..eed6efd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,11 +19,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.sonatype.oss</groupId>
- <artifactId>oss-parent</artifactId>
- <version>7</version>
- </parent>
<groupId>com.google.jimfs</groupId>
<artifactId>jimfs-parent</artifactId>
@@ -84,19 +79,31 @@
<url>http://github.com/google/jimfs/issues</url>
</issueManagement>
+ <distributionManagement>
+ <snapshotRepository>
+ <id>sonatype-nexus-snapshots</id>
+ <name>Sonatype Nexus Snapshots</name>
+ <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
+ </snapshotRepository>
+ <repository>
+ <id>sonatype-nexus-staging</id>
+ <name>Nexus Release Repository</name>
+ <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
+ </repository>
+ </distributionManagement>
+
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <auto-service.version>1.0-rc6</auto-service.version>
+ <auto-service.version>1.0-rc7</auto-service.version>
<java.version>1.7</java.version>
- <guava.version>27.0.1-android</guava.version>
- <surefire.version>3.0.0-M3</surefire.version>
+ <guava.version>30.1-android</guava.version>
<!--
NOTE: When updating errorprone.version, also update javac.version to the
version used by the new error-prone version. You should be able to find
it in the properties section of
https://github.com/google/error-prone/blob/v${errorprone.version}/pom.xml
-->
- <errorprone.version>2.3.3</errorprone.version>
+ <errorprone.version>2.4.0</errorprone.version>
<javac.version>9+181-r4173-1</javac.version>
</properties>
@@ -113,7 +120,7 @@
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
- <version>65.1</version>
+ <version>68.2</version>
</dependency>
<!-- Compile-time dependencies -->
@@ -137,7 +144,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.12</version>
+ <version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -149,7 +156,7 @@
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
- <version>0.45</version>
+ <version>1.1</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -164,11 +171,11 @@
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
- <version>3.0.1</version>
+ <version>3.2.1</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>3.1.1</version>
+ <version>3.2.0</version>
<configuration>
<debug>true</debug>
<encoding>UTF-8</encoding>
@@ -190,20 +197,12 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
- <version>${surefire.version}</version>
- <!-- For some reason, we need this for our internal tests that run in offline mode: -->
- <dependencies>
- <dependency>
- <groupId>org.apache.maven.surefire</groupId>
- <artifactId>surefire-junit4</artifactId>
- <version>${surefire.version}</version>
- </dependency>
- </dependencies>
+ <version>3.0.0-M5</version>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
- <version>3.5.0</version>
+ <version>5.1.1</version>
</plugin>
</plugins>
</pluginManagement>
@@ -339,6 +338,50 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>sonatype-oss-release</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar-no-fork</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>sign-artifacts</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
</project>
diff --git a/util/deploy_snapshot.sh b/util/deploy_snapshot.sh
index 2a2db4c..6a26f10 100755
--- a/util/deploy_snapshot.sh
+++ b/util/deploy_snapshot.sh
@@ -5,7 +5,7 @@
set -e -u
if [ "$TRAVIS_REPO_SLUG" == "google/jimfs" ] && \
- [ "$TRAVIS_JDK_VERSION" == "oraclejdk7" ] && \
+ [ "$TRAVIS_JDK_VERSION" == "openjdk8" ] && \
[ "$TRAVIS_PULL_REQUEST" == "false" ] && \
[ "$TRAVIS_BRANCH" == "master" ]; then
echo "Publishing Maven snapshot..."