8274835: Remove unnecessary castings in java.base

Reviewed-by: mullan, naoto, lancea, bpb
This commit is contained in:
Andrey Turbanov 2021-11-12 16:30:56 +00:00 committed by Daniel Fuchs
parent 3b2585c02b
commit 5a2452c80e
15 changed files with 32 additions and 35 deletions

View file

@ -24,6 +24,7 @@
*/
package sun.net.www;
import jdk.internal.util.StaticProperty;
import java.io.*;
@ -89,7 +90,7 @@ public class MimeTable implements FileNameMap {
*/
public static FileNameMap loadTable() {
MimeTable mt = getDefaultTable();
return (FileNameMap)mt;
return mt;
}
public synchronized int getSize() {

View file

@ -77,7 +77,7 @@ public class AuthCacheImpl implements AuthCache {
}
if (skey == null) {
// list should contain only one element
return (AuthenticationInfo)list.get (0);
return list.get(0);
}
for (AuthCacheValue authCacheValue : list) {
AuthenticationInfo inf = (AuthenticationInfo) authCacheValue;