changeset 9574:d7c4c692f44d

8034211: [parfait] JNI exception pending in jdk/src/macosx/native/sun/awt/CFileDialog.m Reviewed-by: pchelko, azvegint
author serb
date Fri, 28 Feb 2014 18:45:22 +0400
parents 32b58281bc8a
children 01008cbd82a4
files src/macosx/native/sun/awt/CFileDialog.m
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/macosx/native/sun/awt/CFileDialog.m	Fri Feb 28 18:16:11 2014 +0400
+++ b/src/macosx/native/sun/awt/CFileDialog.m	Fri Feb 28 18:45:22 2014 +0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -223,9 +223,8 @@
         NSArray *urls = [dialogDelegate URLs];
         jsize count = [urls count];
 
-        jclass stringClass = (*env)->FindClass(env, "java/lang/String");
-        returnValue = (*env)->NewObjectArray(env, count, stringClass, NULL);
-        (*env)->DeleteLocalRef(env, stringClass);
+        static JNF_CLASS_CACHE(jc_String, "java/lang/String");
+        returnValue = JNFNewObjectArray(env, &jc_String, count);
 
         [urls enumerateObjectsUsingBlock:^(id url, NSUInteger index, BOOL *stop) {
             jstring filename = JNFNormalizedJavaStringForPath(env, [url path]);