RFR: (8031737) CHECK_NULL and CHECK_EXCEPTION macros cleanup
Phil Race
philip.race at oracle.com
Fri Feb 14 01:37:58 UTC 2014
I did look closely at that today. It has 3 parts
- removing the ones in net_util
- moving these macros to jni_util - however these new versions are
already superseded by the
ones we have, so we can' t apply that.
- updating some 'pack' code to use the new macros instead of its own
ones (no clash here)
So except for the last part I essentially have that fix here (and more)
and at this point I just
wanted to fix the build problem ...
-phil.
On 2/13/14 5:27 PM, Roger Riggs wrote:
> Hi Phil,
>
> There was an earlier commit that updated java.net
>
> 8030875: Macros for checking and returning on exceptions
>
> Maybe it will apply as a backport too?
>
> Roger
>
>
>
>
>
> On 2/13/14 4:50 PM, Phil Race wrote:
>> 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 jdk8u-dev
mailing list