# HG changeset patch # User serb # Date 1393598722 -14400 # Node ID 72d34c61dc4a88ceb16b10b57020dd9621fbe4c3 # Parent 5eee22a40e7b252ea9c40e748c49adf20bdda1eb 8034211: [parfait] JNI exception pending in jdk/src/macosx/native/sun/awt/CFileDialog.m Reviewed-by: pchelko, azvegint diff -r 5eee22a40e7b -r 72d34c61dc4a jdk/src/macosx/native/sun/awt/CFileDialog.m --- a/jdk/src/macosx/native/sun/awt/CFileDialog.m Fri Feb 28 18:16:11 2014 +0400 +++ b/jdk/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]);