Commit 7a091bad authored by Tigran Mkrtchyan's avatar Tigran Mkrtchyan
Browse files

src: dont use guava's Sets

Less dependency on guava

Acked-by: Lea Morschel
Target: master
parent 55410441
Pipeline #19386 passed with stage
in 1 minute and 41 seconds
package org.dcache.nfs.v4;
import com.google.common.collect.Sets;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.URISyntaxException;
import java.util.EnumSet;
import java.util.Optional;
import org.dcache.nfs.ExportFile;
import org.dcache.nfs.v4.xdr.fattr4_fs_layout_types;
......@@ -33,7 +33,7 @@ public class OperationGETATTRTest {
RpcTransport transport = mock(RpcTransport.class);
ExportFile exportFile = new ExportFile(ClassLoader.getSystemResource("org/dcache/nfs/exports").toURI());
given(dm.getLayoutTypes()).willReturn(Sets.newHashSet(layouttype4.values()));
given(dm.getLayoutTypes()).willReturn(EnumSet.allOf(layouttype4.class));
given(transport.getRemoteSocketAddress()).willReturn(new InetSocketAddress("172.16.4.1", 0));
given(call.getCredential()).willReturn(new RpcAuthTypeNone());
......
package org.dcache.nfs.v4;
import com.google.common.collect.Sets;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.EnumSet;
import org.dcache.nfs.v4.xdr.COMPOUND4args;
import org.dcache.nfs.v4.xdr.COMPOUND4res;
import org.dcache.nfs.v4.xdr.device_addr4;
......@@ -30,7 +31,7 @@ public class OperationGETDEVICEINFOTest {
NFSv41DeviceManager dm = mock(NFSv41DeviceManager.class);
given(dm.getDeviceInfo(any(), any())).willReturn(mock(device_addr4.class));
given(dm.getLayoutTypes()).willReturn(Sets.newHashSet(layouttype4.values()));
given(dm.getLayoutTypes()).willReturn(EnumSet.allOf(layouttype4.class));
CompoundContext context = new CompoundContextBuilder()
.withDeviceManager(dm)
.withCall(generateRpcCall())
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment