Skip to content

Commit

Permalink
Minor fixes in preparation for 1.1-rc1.
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
cgdecker committed Jan 21, 2016
1 parent 3992dc1 commit 608417a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
7 changes: 7 additions & 0 deletions jimfs/src/main/java/com/google/common/jimfs/Handler.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
* to be used directly.
*
* @author Colin Decker
* @since 1.1
*/
public final class Handler extends URLStreamHandler {

Expand Down Expand Up @@ -70,6 +71,12 @@ static void register(Class<? extends URLStreamHandler> handlerClass) {
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@
* 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
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public abstract class WatchServiceConfiguration {
public static WatchServiceConfiguration polling(long interval, TimeUnit timeUnit) {
return new PollingConfig(interval, timeUnit);
}

WatchServiceConfiguration() {}

/**
Expand All @@ -54,7 +54,7 @@ public static WatchServiceConfiguration polling(long interval, TimeUnit timeUnit
// implementations
abstract AbstractWatchService newWatchService(FileSystemView view, PathService pathService);

/**
/**
* Implementation for {@link #polling}.
*/
private static final class PollingConfig extends WatchServiceConfiguration {
Expand Down

0 comments on commit 608417a

Please sign in to comment.