Jesper Young wrote:
Did you try stepping through it line by line with a debugger? That's often a good way of discovering exactly what happens. IDEs like Eclipse and NetBeans have very good built-in debuggers with which you can step through your code statement by statement.
Yes I am debugging with eclipse, I set breakpoint to NullPointerException
Eclipse stopped at the "indexOf" line but when I evaluate each variable they seems ok, and evaluating all the expression [shapes.indexOf(getShape(shapeId))] is also working ok.
The code is just a mock code for better understanding, but its reflecting the real code, getShape don't contain error I checked the method few times...
Thank you for your help,