RFR: (8031737) CHECK_NULL and CHECK_EXCEPTION macros cleanup

Phil Race philip.race at oracle.com
Thu Feb 13 21:50:23 UTC 2014


That worked on Mac but I just found it doesn't build on Linux because a 
macro-redefinition
  warning is treated as an error there.

https://bugs.openjdk.java.net/browse/JDK-8034912

The early/original fix had removed the duplicate definition in
src/share/native/java/net/net_util.h

So the fix is to do the same in 8u :-

~/jdk8u-dev/jdk$ hg diff src/share/native/java/net/net_util.h
diff --git a/src/share/native/java/net/net_util.h 
b/src/share/native/java/net/net_util.h
--- a/src/share/native/java/net/net_util.h
+++ b/src/share/native/java/net/net_util.h
@@ -42,9 +42,6 @@
  #define NET_ERROR(env, ex, msg) \
  { if (!(*env)->ExceptionOccurred(env)) JNU_ThrowByName(env, ex, msg) }

-#define CHECK_NULL(x) if ((x) == NULL) return;
-#define CHECK_NULL_RETURN(x, y) if ((x) == NULL) return y;
-
  /************************************************************************
   * Cached field IDs
   *

A little surprised no else else found this already  (did they?)
Anyway I need a review and Ok to push 8034912  to JDk 8 u

-Phil.

On 02/12/2014 10:21 AM, Mike Duigou wrote:
> This looks fine.
>
>
> On Feb 11 2014, at 15:42 , Phil Race <philip.race at oracle.com> wrote:
>
>> Here's a JDk8u webrev : -http://cr.openjdk.java.net/~prr/8031737.8u/
>>
>> -phil.
>>
>> On 2/11/14 2:28 PM, Phil Race wrote:
>>> So since hg export/import doesn't apply cleanly and the dependency
>>> chain seems, long and in order to have some consistency across the releases,
>>> I think I should prepare a webrev which essentially backports 8031737
>>> including its small changes to Version.c, if only because otherwise
>>> I'd have to have a new bug ID that would not be forwarded ported
>>> (one source of confusion) or even worse re-use 8031737  but not fully implement it
>>>
>>> Agreed ?
>>>
>>> -phil.
>>>




More information about the core-libs-dev mailing list