Xlint problem

Hullo, i was working through some of the tutorials and this line caused an xlint thingy:

targetOffset.y = ((BoundingBox)player.getWorldBound()).yExtent * 1.5f;

i assume its something to do with the casting bit but how else do i do it?

i dont really know whats going on there!

ok now this line is stopping me from playing the game at all, the game crashes after loading with this message:

SEVERE: Exception in game loop


at Fulstrom.buildChaseCamera(Fulstrom.java:268)

at Fulstrom.initGame(Fulstrom.java:129)

at com.jme.app.BaseGame.start(Unknown Source)

at Fulstrom.main(Fulstrom.java:57)

at __SHELL37.run(__SHELL37.java:7)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at bluej.runtime.ExecServer$3.run(ExecServer.java:792)

13-Nov-2007 21:55:29 com.jme.app.BaseGame start

INFO: Application ending.

line 268 in fulstrom.java is the line mentioned above

any help?

Perhaps the player object does not have bounds at all? You could create bounds for it by means of:

      player.setModelBound( new BoundingBox() );

To see if this is the prob... you could try printing the values of player, targetOffset and player.getWorldBound() one at a time (in its own lone so it is not buffered) and see what is causing your NPE.

ok i found out what was causing the NPE and thats fixed now but it is stilll giving me the xlint:unchecked message…grr

Xlint is a warning… there are many features in jME that are not necessarily up to date with the changes in Java 6.0 and up. Thus, these are showing that the code does not complaint completely with Generics, in your case.

It is nothing to worry about.