8292350: Use static methods for hashCode/toString primitives
Reviewed-by: prr, rriggs, amenkov, jpai
This commit is contained in:
parent
44532009ff
commit
37c0a13647
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2022, 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
|
||||
@ -420,9 +420,9 @@ final class ScreenMenu extends Menu
|
||||
final KeyStroke ks = mi.getAccelerator();
|
||||
if (ks != null) hashCode ^= ks.hashCode();
|
||||
|
||||
hashCode ^= Boolean.valueOf(mi.isVisible()).hashCode();
|
||||
hashCode ^= Boolean.valueOf(mi.isEnabled()).hashCode();
|
||||
hashCode ^= Boolean.valueOf(mi.isSelected()).hashCode();
|
||||
hashCode ^= Boolean.hashCode(mi.isVisible());
|
||||
hashCode ^= Boolean.hashCode(mi.isEnabled());
|
||||
hashCode ^= Boolean.hashCode(mi.isSelected());
|
||||
|
||||
} else if (m instanceof JSeparator) {
|
||||
hashCode ^= "-".hashCode();
|
||||
|
@ -745,7 +745,7 @@ public class ArrayType<T> extends OpenType<T> {
|
||||
int value = 0;
|
||||
value += dimension;
|
||||
value += elementType.hashCode();
|
||||
value += Boolean.valueOf(primitiveArray).hashCode();
|
||||
value += Boolean.hashCode(primitiveArray);
|
||||
myHashCode = Integer.valueOf(value);
|
||||
}
|
||||
|
||||
|
@ -569,7 +569,7 @@ public class WebRowSetXmlWriter implements XmlWriter, Serializable {
|
||||
}
|
||||
|
||||
private void writeBoolean(boolean b) throws java.io.IOException {
|
||||
writer.write(Boolean.valueOf(b).toString());
|
||||
writer.write(Boolean.toString(b));
|
||||
}
|
||||
|
||||
private void writeFloat(float f) throws java.io.IOException {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2022, 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
|
||||
@ -149,7 +149,7 @@ public class WizardDlg extends JDialog
|
||||
this.panels = panels;
|
||||
panesPanel.removeAll();
|
||||
for(int i = 0; i < numCards; i++)
|
||||
panesPanel.add((JPanel)panels.elementAt(i), (Integer.valueOf(i)).toString());
|
||||
panesPanel.add((JPanel)panels.elementAt(i), Integer.toString(i));
|
||||
|
||||
validate();
|
||||
enableBackNextButtons();
|
||||
|
Loading…
Reference in New Issue
Block a user