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.
+ 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);