HDFS-6275. Fix warnings - type arguments can be inferred and redudant local variable. Contributed by Suresh Srinivas.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1589510 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
876fd8ab79
commit
7f635b8f53
|
@ -374,6 +374,9 @@ Release 2.5.0 - UNRELEASED
|
|||
|
||||
HDFS-6274. Cleanup javadoc warnings in HDFS code. (suresh)
|
||||
|
||||
HDFS-6275. Fix warnings - type arguments can be inferred and redudant
|
||||
local variable. (suresh)
|
||||
|
||||
Release 2.4.1 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -263,7 +263,7 @@ class FSImagePreTransactionalStorageInspector extends FSImageStorageInspector {
|
|||
// the image is already current, discard edits
|
||||
LOG.debug(
|
||||
"Name checkpoint time is newer than edits, not loading edits.");
|
||||
return Collections.<File>emptyList();
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
return getEditsInStorageDir(latestEditsSD);
|
||||
|
|
|
@ -82,7 +82,7 @@ public class ImageServlet extends HttpServlet {
|
|||
private static final String IMAGE_FILE_TYPE = "imageFile";
|
||||
|
||||
private static final Set<Long> currentlyDownloadingCheckpoints =
|
||||
Collections.<Long>synchronizedSet(new HashSet<Long>());
|
||||
Collections.synchronizedSet(new HashSet<Long>());
|
||||
|
||||
@Override
|
||||
public void doGet(final HttpServletRequest request,
|
||||
|
|
|
@ -71,8 +71,8 @@ public abstract class HttpOpParam<E extends Enum<E> & HttpOpParam.Op>
|
|||
GetOpParam.Op.GETFILECHECKSUM);
|
||||
|
||||
static final List<TemporaryRedirectOp> values
|
||||
= Collections.unmodifiableList(Arrays.asList(
|
||||
new TemporaryRedirectOp[]{CREATE, APPEND, OPEN, GETFILECHECKSUM}));
|
||||
= Collections.unmodifiableList(Arrays.asList(CREATE, APPEND, OPEN,
|
||||
GETFILECHECKSUM));
|
||||
|
||||
/** Get an object for the given op. */
|
||||
public static TemporaryRedirectOp valueOf(final Op op) {
|
||||
|
|
|
@ -75,8 +75,7 @@
|
|||
}
|
||||
|
||||
function get_response_err_msg(data) {
|
||||
var msg = data.RemoteException !== undefined ? data.RemoteException.message : "";
|
||||
return msg;
|
||||
return data.RemoteException !== undefined ? data.RemoteException.message : "";
|
||||
}
|
||||
|
||||
function view_file_details(path, abs_path) {
|
||||
|
|
|
@ -208,7 +208,7 @@ public class TestQuorumJournalManagerUnit {
|
|||
anyLong(), eq(1L), eq(1), Mockito.<byte[]>any());
|
||||
|
||||
// And the third log not respond
|
||||
SettableFuture<Void> slowLog = SettableFuture.<Void>create();
|
||||
SettableFuture<Void> slowLog = SettableFuture.create();
|
||||
Mockito.doReturn(slowLog).when(spyLoggers.get(2)).sendEdits(
|
||||
anyLong(), eq(1L), eq(1), Mockito.<byte[]>any());
|
||||
stm.flush();
|
||||
|
|
|
@ -304,7 +304,7 @@ public class TestAclTransformation {
|
|||
.add(aclEntry(DEFAULT, MASK, ALL))
|
||||
.add(aclEntry(DEFAULT, OTHER, READ))
|
||||
.build();
|
||||
List<AclEntry> aclSpec = Lists.<AclEntry>newArrayList();
|
||||
List<AclEntry> aclSpec = Lists.newArrayList();
|
||||
assertEquals(existing, filterAclEntriesByAclSpec(existing, aclSpec));
|
||||
}
|
||||
|
||||
|
@ -705,7 +705,7 @@ public class TestAclTransformation {
|
|||
.add(aclEntry(DEFAULT, MASK, ALL))
|
||||
.add(aclEntry(DEFAULT, OTHER, READ))
|
||||
.build();
|
||||
List<AclEntry> aclSpec = Lists.<AclEntry>newArrayList();
|
||||
List<AclEntry> aclSpec = Lists.newArrayList();
|
||||
assertEquals(existing, mergeAclEntries(existing, aclSpec));
|
||||
}
|
||||
|
||||
|
|
|
@ -622,11 +622,11 @@ public class TestCheckpoint {
|
|||
}
|
||||
|
||||
private File filePathContaining(final String substring) {
|
||||
return Mockito.<File>argThat(
|
||||
return Mockito.argThat(
|
||||
new ArgumentMatcher<File>() {
|
||||
@Override
|
||||
public boolean matches(Object argument) {
|
||||
String path = ((File)argument).getAbsolutePath();
|
||||
String path = ((File) argument).getAbsolutePath();
|
||||
return path.contains(substring);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -65,7 +65,7 @@ public class TestTransferFsImage {
|
|||
MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf)
|
||||
.numDataNodes(0).build();
|
||||
NNStorage mockStorage = Mockito.mock(NNStorage.class);
|
||||
List<File> localPath = Collections.<File>singletonList(
|
||||
List<File> localPath = Collections.singletonList(
|
||||
new File("/xxxxx-does-not-exist/blah"));
|
||||
|
||||
try {
|
||||
|
|
|
@ -414,6 +414,6 @@ public class TestDFSHAAdmin {
|
|||
}
|
||||
|
||||
private StateChangeRequestInfo anyReqInfo() {
|
||||
return Mockito.<StateChangeRequestInfo>any();
|
||||
return Mockito.any();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,8 +56,7 @@ public class TestOfflineEditsViewer {
|
|||
|
||||
@SuppressWarnings("deprecation")
|
||||
private static ImmutableSet<FSEditLogOpCodes> skippedOps() {
|
||||
ImmutableSet.Builder<FSEditLogOpCodes> b = ImmutableSet
|
||||
.<FSEditLogOpCodes> builder();
|
||||
ImmutableSet.Builder<FSEditLogOpCodes> b = ImmutableSet.builder();
|
||||
|
||||
// Deprecated opcodes
|
||||
b.add(FSEditLogOpCodes.OP_DATANODE_ADD)
|
||||
|
|
Loading…
Reference in New Issue