hotspot/src/share/vm/runtime/thread.cpp
changeset 1388 3677f5f3d66b
parent 1380 c6ace647ca84
parent 950 6112b627bb36
child 1392 b376216cba95
--- a/hotspot/src/share/vm/runtime/thread.cpp	Wed Aug 06 11:57:31 2008 -0400
+++ b/hotspot/src/share/vm/runtime/thread.cpp	Thu Aug 21 23:36:31 2008 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc.  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
@@ -2599,7 +2599,8 @@
 oop JavaThread::current_park_blocker() {
   // Support for JSR-166 locks
   oop thread_oop = threadObj();
-  if (thread_oop != NULL && JDK_Version::supports_thread_park_blocker()) {
+  if (thread_oop != NULL &&
+      JDK_Version::current().supports_thread_park_blocker()) {
     return java_lang_Thread::park_blocker(thread_oop);
   }
   return NULL;
@@ -2782,6 +2783,8 @@
 
 jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
 
+  extern void JDK_Version_init();
+
   // Check version
   if (!is_supported_jni_version(args->version)) return JNI_EVERSION;
 
@@ -2797,6 +2800,9 @@
   // Initialize system properties.
   Arguments::init_system_properties();
 
+  // So that JDK version can be used as a discrimintor when parsing arguments
+  JDK_Version_init();
+
   // Parse arguments
   jint parse_result = Arguments::parse(args);
   if (parse_result != JNI_OK) return parse_result;