Yes, please. And it looks fine. We have an internal static code analysis
tool
which should catch this sort of thing but it is weakest on Windows ..
-phil.
On 5/30/18, 7:11 AM, Baesken, Matthias wrote:
Hi Christoph, Sergey and Thomas , thanks for the reviews .
* And make sure you push it to the client repo...
*
Thanks for pointing this out, otherwise I would have taken the normal
jdk repo .
Best regards, Matthias
*From:*Langer, Christoph
*Sent:* Mittwoch, 30. Mai 2018 16:01
*To:* Baesken, Matthias <[email protected]>; 2d-dev
<[email protected]>
*Subject:* RE: [XS] RFR : JDK-8204085: avoid printing uninitialized
pointer in
java.desktop/windows/native/libawt/java2d/windows/GDIWindowSurfaceData.cpp
Hi Matthias,
maybe the code would become nicer if you do it like this:
...
jobject localObj = env->NewLocalRef(wsdo->peer);
PDATA pData = localObj == NULL ? NULL : JNI_GET_PDATA(localObj);
if (pData == NULL) {
...
But the change is very trivial and I would be fine with it, as you did
in the webrev. Do whatever is more convenient to you, no need for
another webrev.
And make sure you push it to the client repo...
Best regards
Christoph
*From:*Baesken, Matthias
*Sent:* Mittwoch, 30. Mai 2018 15:33
*To:* 2d-dev <[email protected] <mailto:[email protected]>>
*Cc:* Langer, Christoph <[email protected]
<mailto:[email protected]>>
*Subject:* [XS] RFR : JDK-8204085: avoid printing uninitialized
pointer in
java.desktop/windows/native/libawt/java2d/windows/GDIWindowSurfaceData.cpp
Hi could I please get reviews for this very small change :
In
java.desktop/windows/native/libawt/java2d/windows/GDIWindowSurfaceData.cpp
, function GDIWindowSurfaceData_GetComp,
we might print pointer pData in uninitialized state.
This occurs in case localObj == NULL , then we would print pData
without initialization.
The small fix adds initialization to pData :
Bug:
https://bugs.openjdk.java.net/browse/JDK-8204085
change :
http://cr.openjdk.java.net/~mbaesken/webrevs/8204085/
<http://cr.openjdk.java.net/%7Embaesken/webrevs/8204085/>
Thanks, Matthias