aboutsummaryrefslogtreecommitdiff
path: root/jimfs/src/main
diff options
context:
space:
mode:
authorcgdecker <cgdecker@google.com>2016-01-21 12:09:28 -0800
committerColin Decker <cgdecker@google.com>2016-01-21 15:12:14 -0500
commit608417a166eec61fd0472b170da19bcd5bae6623 (patch)
tree7dbbaa9fb92042aced45d851ea1e9fc9368390b0 /jimfs/src/main
parent3992dc14d0e7964fad0100afc8452a286fb1a9e1 (diff)
downloadjimfs-608417a166eec61fd0472b170da19bcd5bae6623.tar.gz
Minor fixes in preparation for 1.1-rc1.
- Add @since 1.1 to new public types (though neither of them should be used directly). - Also @deprecate the required public, no-arg constructors on those types. - Make SystemJimfsFileSystemProvider final. - Random whitespace fix. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=112710083
Diffstat (limited to 'jimfs/src/main')
-rw-r--r--jimfs/src/main/java/com/google/common/jimfs/Handler.java7
-rw-r--r--jimfs/src/main/java/com/google/common/jimfs/SystemJimfsFileSystemProvider.java9
-rw-r--r--jimfs/src/main/java/com/google/common/jimfs/WatchServiceConfiguration.java4
3 files changed, 17 insertions, 3 deletions
diff --git a/jimfs/src/main/java/com/google/common/jimfs/Handler.java b/jimfs/src/main/java/com/google/common/jimfs/Handler.java
index 8772dda..bcb019d 100644
--- a/jimfs/src/main/java/com/google/common/jimfs/Handler.java
+++ b/jimfs/src/main/java/com/google/common/jimfs/Handler.java
@@ -32,6 +32,7 @@ import java.net.URLStreamHandler;
* to be used directly.
*
* @author Colin Decker
+ * @since 1.1
*/
public final class Handler extends URLStreamHandler {
@@ -70,6 +71,12 @@ public final class Handler extends URLStreamHandler {
System.setProperty(JAVA_PROTOCOL_HANDLER_PACKAGES, packages);
}
+ /**
+ * @deprecated Not intended to be called directly; this class is only for use by Java itself.
+ */
+ @Deprecated
+ public Handler() {} // a public, no-arg constructor is required
+
@Override
protected URLConnection openConnection(URL url) throws IOException {
return new PathURLConnection(url);
diff --git a/jimfs/src/main/java/com/google/common/jimfs/SystemJimfsFileSystemProvider.java b/jimfs/src/main/java/com/google/common/jimfs/SystemJimfsFileSystemProvider.java
index c89fa76..f655385 100644
--- a/jimfs/src/main/java/com/google/common/jimfs/SystemJimfsFileSystemProvider.java
+++ b/jimfs/src/main/java/com/google/common/jimfs/SystemJimfsFileSystemProvider.java
@@ -58,9 +58,10 @@ import java.util.concurrent.ConcurrentMap;
* instance, see {@link Jimfs}. For other operations, use the public APIs in {@code java.nio.file}.
*
* @author Colin Decker
+ * @since 1.1
*/
@AutoService(FileSystemProvider.class)
-public class SystemJimfsFileSystemProvider extends FileSystemProvider {
+public final class SystemJimfsFileSystemProvider extends FileSystemProvider {
/**
* Env map key that maps to the already-created {@code FileSystem} instance in
@@ -89,6 +90,12 @@ public class SystemJimfsFileSystemProvider extends FileSystemProvider {
private static final ConcurrentMap<URI, FileSystem> fileSystems =
new MapMaker().weakValues().makeMap();
+ /**
+ * @deprecated Not intended to be called directly; this class is only for use by Java itself.
+ */
+ @Deprecated
+ public SystemJimfsFileSystemProvider() {} // a public, no-arg constructor is required
+
@Override
public String getScheme() {
return URI_SCHEME;
diff --git a/jimfs/src/main/java/com/google/common/jimfs/WatchServiceConfiguration.java b/jimfs/src/main/java/com/google/common/jimfs/WatchServiceConfiguration.java
index 8648fc3..4ef1a06 100644
--- a/jimfs/src/main/java/com/google/common/jimfs/WatchServiceConfiguration.java
+++ b/jimfs/src/main/java/com/google/common/jimfs/WatchServiceConfiguration.java
@@ -44,7 +44,7 @@ public abstract class WatchServiceConfiguration {
public static WatchServiceConfiguration polling(long interval, TimeUnit timeUnit) {
return new PollingConfig(interval, timeUnit);
}
-
+
WatchServiceConfiguration() {}
/**
@@ -54,7 +54,7 @@ public abstract class WatchServiceConfiguration {
// implementations
abstract AbstractWatchService newWatchService(FileSystemView view, PathService pathService);
- /**
+ /**
* Implementation for {@link #polling}.
*/
private static final class PollingConfig extends WatchServiceConfiguration {