Skip to main content

[Xj3D] SAIBrowser.createScene(null, null) throws NullPointerException

2 replies [Last post]
madanasta
Offline
Joined: 2010-10-05

As stated in the documentation of Browser, createScene can be called with null parameters:

Parameters:
profile - The profile to use for this scene or null for none
components - The list of components to use or null

However, the code in SAIBrowser.createScene calls

new_fac.setProfile(profile.getName()); // line 199...

which naturally throws a NullPointerException if profile is null. Is this a bug or the documentation of SAIBrowser.createScene should state that a profile argument is not optional?

mada

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Alan Hudson

java3d-interest@javadesktop.org wrote:

>As stated in the documentation of Browser, createScene can be called with null parameters:
>
>Parameters:
> profile - The profile to use for this scene or null for none
> components - The list of components to use or null
>
>However, the code in SAIBrowser.createScene calls
>
>new_fac.setProfile(profile.getName()); // line 199...
>
>which naturally throws a NullPointerException if profile is null. Is this a bug or the documentation of SAIBrowser.createScene should state that a profile argument is not optional?
>
>
>
It shouldn't crash, but practically speaking the default profile is
'Core' which does almost nothing.

Can you file an issue with our bug tracker at bugzilla.xj3d.org?

--
Alan Hudson

President Yumetech, Inc. www.yumetech.com
President Web3D Consortium www.web3d.org
206 340 8900

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

madanasta
Offline
Joined: 2010-10-05

Filed the issue. Bug title is "SAIBrowser.createScene(null, null) throws NullPointerException".

mada