From e34a2ba8d5d6814eb5278884f5450b8c1450eef1 Mon Sep 17 00:00:00 2001 From: Ivan Dubrov Date: Thu, 1 May 2014 22:53:33 -0700 Subject: [PATCH] Update host klass to newest version --- hotspot/.hg/patches/light-jdk8u5-b13.patch | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hotspot/.hg/patches/light-jdk8u5-b13.patch b/hotspot/.hg/patches/light-jdk8u5-b13.patch index 286dba09..4458820c 100644 --- a/hotspot/.hg/patches/light-jdk8u5-b13.patch +++ b/hotspot/.hg/patches/light-jdk8u5-b13.patch @@ -1564,7 +1564,7 @@ diff --git a/src/share/vm/prims/jvmtiRedefineClasses2.cpp b/src/share/vm/prims/j new file mode 100644 --- /dev/null +++ b/src/share/vm/prims/jvmtiRedefineClasses2.cpp -@@ -0,0 +1,2102 @@ +@@ -0,0 +1,2107 @@ +/* + * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -3049,6 +3049,11 @@ new file mode 100644 + InstanceKlass *ik = InstanceKlass::cast(klass); + constantPoolHandle other_cp = constantPoolHandle(ik->constants()); + ++ // Update host klass of anonymous classes (for example, produced by lambdas) to newest version. ++ if (ik->is_anonymous() && !ik->host_klass()->is_newest_version()) { ++ ik->set_host_klass(ik->host_klass()->newest_version()); ++ } ++ + for (int i = 0; i < other_cp->length(); i++) { + if (other_cp->tag_at(i).is_klass()) { + Klass* klass = other_cp->klass_at(i, _thread); -- 2.39.5