提交 fcdc7d87 编写于 作者: C coffeys

Merge

......@@ -538,9 +538,9 @@ public final class LWCToolkit extends LWToolkit {
return super.getImage(filename);
}
String fileneame2x = getScaledImageName(filename);
return (imageExists(fileneame2x))
? getImageWithResolutionVariant(filename, fileneame2x)
String filename2x = getScaledImageName(filename);
return (imageExists(filename2x))
? getImageWithResolutionVariant(filename, filename2x)
: super.getImage(filename);
}
......@@ -891,6 +891,9 @@ public final class LWCToolkit extends LWToolkit {
}
private static boolean isValidPath(String path) {
return !path.isEmpty() && !path.endsWith("/") && !path.endsWith(".");
return path != null &&
!path.isEmpty() &&
!path.endsWith("/") &&
!path.endsWith(".");
}
}
......@@ -6935,9 +6935,9 @@ Java_sun_awt_windows_WComponentPeer_nativeHandlesWheelScrolling (JNIEnv* env,
{
TRY;
return JNI_IS_TRUE(AwtToolkit::GetInstance().SyncCall(
return (jboolean)AwtToolkit::GetInstance().SyncCall(
(void *(*)(void *))AwtComponent::_NativeHandlesWheelScrolling,
env->NewGlobalRef(self)));
env->NewGlobalRef(self));
// global ref is deleted in _NativeHandlesWheelScrolling
CATCH_BAD_ALLOC_RET(NULL);
......@@ -6956,9 +6956,9 @@ Java_sun_awt_windows_WComponentPeer_isObscured(JNIEnv* env,
jobject selfGlobalRef = env->NewGlobalRef(self);
return JNI_IS_TRUE(AwtToolkit::GetInstance().SyncCall(
return (jboolean)AwtToolkit::GetInstance().SyncCall(
(void*(*)(void*))AwtComponent::_IsObscured,
(void *)selfGlobalRef));
(void *)selfGlobalRef);
// selfGlobalRef is deleted in _IsObscured
CATCH_BAD_ALLOC_RET(NULL);
......
......@@ -1018,8 +1018,8 @@ Java_sun_awt_windows_WListPeer_isSelected(JNIEnv *env, jobject self,
ses->list = env->NewGlobalRef(self);
ses->index = index;
return JNI_IS_TRUE(AwtToolkit::GetInstance().SyncCall(
(void *(*)(void *))AwtList::_IsSelected, ses));
return (jboolean)AwtToolkit::GetInstance().SyncCall(
(void *(*)(void *))AwtList::_IsSelected, ses);
// global ref and ses are deleted in _IsSelected
CATCH_BAD_ALLOC_RET(FALSE);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册