jobject javaFile = mJavaEnv->GetObjectArrayElement(mJavaFileArray, mIndex++);
JNIEnv* env = GetJNIEnv(); jobject javaFile = env->GetObjectArrayElement(mJavaFileArray, mIndex++);
  NS_IMETHOD GetNext(nsISupports** aResult)  {    nsresult rv = NS_ERROR_FAILURE;    jobject javaFile = mJavaEnv->GetObjectArrayElement(mJavaFileArray, mIndex++);    if (javaFile) {      nsCOMPtr<nsILocalFile> localFile;      rv = File_to_nsILocalFile(mJavaEnv, javaFile, getter_AddRefs(localFile));      mJavaEnv->DeleteLocalRef(javaFile);      if (NS_SUCCEEDED(rv)) {        return localFile->QueryInterface(NS_GET_IID(nsIFile), (void**)aResult);      }    }    mJavaEnv->ExceptionClear();    return NS_ERROR_FAILURE;  }