< prev index next >
src/java.desktop/windows/native/libawt/windows/awt_Dialog.cpp
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -98,11 +98,10 @@
*/
AwtDialog* AwtDialog::Create(jobject peer, jobject parent)
{
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
- jobject background = NULL;
jobject target = NULL;
AwtDialog* dialog = NULL;
try {
if (env->EnsureLocalCapacity(2) < 0) {
@@ -179,26 +178,17 @@
dialog->m_hIconSm = awtParent->GetHIconSm();
dialog->m_iconInherited = TRUE;
}
dialog->DoUpdateIcon();
-
- background = env->GetObjectField(target,
- AwtComponent::backgroundID);
- if (background == NULL) {
- JNU_CallMethodByName(env, NULL,
- peer, "setDefaultColor", "()V");
- }
}
} catch (...) {
- env->DeleteLocalRef(background);
env->DeleteLocalRef(target);
throw;
}
done:
- env->DeleteLocalRef(background);
env->DeleteLocalRef(target);
return dialog;
}
< prev index next >