--- a/hotspot/src/share/vm/classfile/classLoaderData.cpp Fri Feb 14 16:17:22 2014 +0100
+++ b/hotspot/src/share/vm/classfile/classLoaderData.cpp Sat Feb 15 13:03:38 2014 -0500
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, 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
@@ -520,6 +520,13 @@
}
}
+bool ClassLoaderData::contains_klass(Klass* klass) {
+ for (Klass* k = _klasses; k != NULL; k = k->next_link()) {
+ if (k == klass) return true;
+ }
+ return false;
+}
+
// GC root of class loader data created.
ClassLoaderData* ClassLoaderDataGraph::_head = NULL;