changeset 14085:6e66a983e953 tip

Correct args to hashCode
author dsimms
date Tue, 04 Apr 2017 13:57:21 +0200
parents 6e086f285e3a
children
files src/java.base/share/classes/jdk/experimental/value/ValueType.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/jdk/experimental/value/ValueType.java	Thu Mar 23 17:51:05 2017 +0100
+++ b/src/java.base/share/classes/jdk/experimental/value/ValueType.java	Tue Apr 04 13:57:21 2017 +0200
@@ -243,12 +243,12 @@
                         for (Field f : valueFields()) {
                             String desc = BytecodeDescriptor.unparse(f.getType());
                             C.vload(0).vgetfield(valueClass(), f.getName(), desc);
-                            C.load("res").const_(31).imul();
                             if (f.getType().isPrimitive()) {
                                 C.invokestatic(Wrapper.asWrapperType(f.getType()), "hashCode", "(" + desc + ")I", false);
                             } else {
-                                C.invokestatic(Objects.class, "hashCode", "(Ljava/lang/Object)I", false);
+                                C.invokestatic(Objects.class, "hashCode", "(Ljava/lang/Object;)I", false);
                             }
+                            C.load("res").const_(31).imul();
                             C.iadd().store("res");
                         }
                         C.load("res").ireturn();