8268764: Use Long.hashCode() instead of int-cast where applicable
Reviewed-by: kevinw, prr, kizune, serb
This commit is contained in:
parent
8657f77608
commit
124f82377b
@ -105,7 +105,7 @@ public final class DLSSoundbank implements Soundbank {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return (int)i1;
|
||||
return Long.hashCode(i1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -91,7 +91,7 @@ public final class WaveExtensibleFileReader extends SunFileReader {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return (int) i1;
|
||||
return Long.hashCode(i1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -199,8 +199,9 @@ public final class ObjID implements Serializable {
|
||||
*
|
||||
* @return the hash code value for this object identifier
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return (int) objNum;
|
||||
return Long.hashCode(objNum);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -175,7 +175,7 @@ final class HotSpotResolvedJavaMethodImpl extends HotSpotMethod implements HotSp
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return (int) getMetaspaceMethod();
|
||||
return Long.hashCode(getMetaspaceMethod());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -51,8 +51,9 @@ public class FieldImpl extends TypeComponentImpl
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return (int)ref();
|
||||
return Long.hashCode(ref());
|
||||
}
|
||||
|
||||
public int compareTo(Field field) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -95,8 +95,9 @@ public abstract class MethodImpl extends TypeComponentImpl
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return (int)ref();
|
||||
return Long.hashCode(ref());
|
||||
}
|
||||
|
||||
public final List<Location> allLineLocations()
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -155,8 +155,9 @@ public class ObjectReferenceImpl extends ValueImpl
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return(int)ref();
|
||||
return Long.hashCode(ref());
|
||||
}
|
||||
|
||||
public Type type() {
|
||||
|
@ -150,8 +150,9 @@ public abstract class ReferenceTypeImpl extends TypeImpl implements ReferenceTyp
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return(int)ref();
|
||||
return Long.hashCode(ref());
|
||||
}
|
||||
|
||||
public int compareTo(ReferenceType object) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -100,7 +100,8 @@ public class NTNumericCredential {
|
||||
*
|
||||
* @return a hash code for this {@code NTNumericCredential}.
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return (int)this.impersonationToken;
|
||||
return Long.hashCode(this.impersonationToken);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user