After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 326384 - Nullable parameters not handled correctly in various places
Nullable parameters not handled correctly in various places
Status: RESOLVED FIXED
Product: java-gnome
Classification: Bindings
Component: GTK
mainline
Other Linux
: Normal normal
: ---
Assigned To: Ismael Juma
java-gnome bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2006-01-10 02:32 UTC by Remy Suen
Modified: 2006-01-11 00:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to implement null checks. (2.96 KB, patch)
2006-01-10 02:41 UTC, Remy Suen
none Details | Review

Description Remy Suen 2006-01-10 02:32:37 UTC
Below are a list of methods that I have found that the javadoc indicates a null parameter is allowed but an NPE will actually be thrown if a null is passed since the parameter is used to call getHandle() (or some other method). I have checked all of them against gtk+'s C API and I have verified that their documentation states that null can be passed to the C function.

-AboutDialog's setLogo(Pixbuf) method
-IconView's setModel(TreeModel) method
-IconFactory's (Type, String, AccelGroup) constructor
-TreeViewColumn's setWidget(Widget) method
-Widget's shapeCombineMask(Bitmap, int, int) method
Comment 1 Remy Suen 2006-01-10 02:41:20 UTC
Created attachment 57082 [details] [review]
Patch to implement null checks.

The third one above actually should be ItemFactory, although it needs to be scratched out since I had failed to notice that the constructor actually calls a static init method which has a null check in place.
Comment 2 Ismael Juma 2006-01-11 00:14:11 UTC
Thanks for the patch. Applied to CVS HEAD.