8035736: [parfait] JNI primitive type mismatch in jdk/src/windows/native/sun/windows/awt_Component.cpp
Reviewed-by: pchelko, anthony
--- a/jdk/src/windows/native/sun/windows/awt.h Tue Apr 01 00:33:40 2014 +0400
+++ b/jdk/src/windows/native/sun/windows/awt.h Tue Apr 01 01:03:52 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -47,6 +47,8 @@
class AwtObject;
typedef AwtObject* PDATA;
+#define JNI_IS_TRUE(obj) ((obj) ? JNI_TRUE : JNI_FALSE)
+
#define JNI_CHECK_NULL_GOTO(obj, msg, where) { \
if (obj == NULL) { \
env->ExceptionClear(); \
--- a/jdk/src/windows/native/sun/windows/awt_Component.cpp Tue Apr 01 00:33:40 2014 +0400
+++ b/jdk/src/windows/native/sun/windows/awt_Component.cpp Tue Apr 01 01:03:52 2014 +0400
@@ -6112,7 +6112,7 @@
c = (AwtComponent *)pData;
if (::IsWindow(c->GetHWnd()))
{
- result = (jboolean)c->InheritsNativeMouseWheelBehavior();
+ result = JNI_IS_TRUE(c->InheritsNativeMouseWheelBehavior());
}
ret:
env->DeleteGlobalRef(self);
@@ -6928,9 +6928,9 @@
{
TRY;
- return (jboolean)AwtToolkit::GetInstance().SyncCall(
+ return JNI_IS_TRUE(AwtToolkit::GetInstance().SyncCall(
(void *(*)(void *))AwtComponent::_NativeHandlesWheelScrolling,
- env->NewGlobalRef(self));
+ env->NewGlobalRef(self)));
// global ref is deleted in _NativeHandlesWheelScrolling
CATCH_BAD_ALLOC_RET(NULL);
@@ -6949,9 +6949,9 @@
jobject selfGlobalRef = env->NewGlobalRef(self);
- return (jboolean)AwtToolkit::GetInstance().SyncCall(
+ return JNI_IS_TRUE(AwtToolkit::GetInstance().SyncCall(
(void*(*)(void*))AwtComponent::_IsObscured,
- (void *)selfGlobalRef);
+ (void *)selfGlobalRef));
// selfGlobalRef is deleted in _IsObscured
CATCH_BAD_ALLOC_RET(NULL);