NullPointerException but no null parameters passed to the function?

It's possible that a member of one of your parameters is null, and the setPrice method is trying to use that.

It's possible that a member of one of your parameters is null, and the setPrice method is trying to use that. For example, the Currency class might have a format member. C.

Format could be your null pointer. Check each member of the parameters.

There are many ways their code could dereference a null pointer with no help from you. They might index an array with a value you supply and come up with a null pointer. If you don't have source, and you don't have support, your only recourse is to decompile with the javap command and use a debugger which will step you through the byte code.

An obvious possibility that comes to mind is that numerix is null. The thing to do is check the stack trace on the exception and see what line is throwing it. Are you getting the exception on the call, or is it coming from inside the function?

If the latter, you're back to Aaron's answer: one of the parameters could be an object with a member that is null. Or maybe somewhere in the processing inside, the function is creating a null object because of a bug of its own or invalid inputs. (Failure to check the inputs is arguably a bug in any case, but whatever.) Do you have the source code?

If so, you can home in on the line that the stack trace identifies. If not, you're working blind, and the best you can do is carefully check out all your parameters.

Maybe you have to initialize it then. Does it access external resources, static resources, etc?If you don't have source, use the jd-gui decompiler to inspect the method to see if it can possibly go wrong.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions