dcapwell commented on code in PR #2299: URL: https://github.com/apache/cassandra/pull/2299#discussion_r1186516059
########## test/unit/org/apache/cassandra/io/filesystem/ForwardingFileSystem.java: ########## @@ -0,0 +1,129 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.cassandra.io.filesystem; + +import java.io.IOException; +import java.nio.file.FileStore; +import java.nio.file.FileSystem; +import java.nio.file.Path; +import java.nio.file.PathMatcher; +import java.nio.file.WatchService; +import java.nio.file.attribute.UserPrincipalLookupService; +import java.nio.file.spi.FileSystemProvider; +import java.util.Set; + +import com.google.common.collect.Iterables; + +public class ForwardingFileSystem extends FileSystem +{ + protected final FileSystem delegate; + + public ForwardingFileSystem(FileSystem delegate) + { + this.delegate = delegate; + } + + protected FileSystem delegate() + { + return delegate; + } + + protected Path wrap(Path p) + { + return p; + } + + protected Path unwrap(Path p) + { + return p; + } + + @Override + public FileSystemProvider provider() + { + return delegate().provider(); Review Comment: I prefer this method as it allows subclasses to override... I actually used that during testing to make sure I knew what was touched and what wasn't -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

