diff src/share/vm/oops/klass.cpp @ 20262:76b588255908

8035746: Add missing Klass::oop_is_instanceClassLoader() function Reviewed-by: mgerdin, coleenp
author stefank
date Thu, 27 Feb 2014 10:36:50 +0100
parents ce8f6bb717c9
children 2c6ef90f030a
line wrap: on
line diff
--- a/src/share/vm/oops/klass.cpp	Thu Feb 27 10:34:55 2014 +0100
+++ b/src/share/vm/oops/klass.cpp	Thu Feb 27 10:36:50 2014 +0100
@@ -699,3 +699,21 @@
 }
 
 #endif
+
+/////////////// Unit tests ///////////////
+
+#ifndef PRODUCT
+
+class TestKlass {
+ public:
+  static void test_oop_is_instanceClassLoader() {
+    assert(SystemDictionary::ClassLoader_klass()->oop_is_instanceClassLoader(), "assert");
+    assert(!SystemDictionary::String_klass()->oop_is_instanceClassLoader(), "assert");
+  }
+};
+
+void TestKlass_test() {
+  TestKlass::test_oop_is_instanceClassLoader();
+}
+
+#endif