I get a NullPointerException at a line on which just a simple null check takes place.The line is the following:
if(routingTable[commonBitGroups][nextNumberOfOther-1]==null)
I verify that the array is not null just before this line. commonBitGroups and nextNumberOfOther are both simple int types.
I should add that this line is part of an app that uses rmi and part of a class which extends UnicastRemoteObject and implements a RemoteInterface.I specify that because I am under the impression that a NullPointerException can occur when you deal with synchronization even if nothing is realy null (maybe when something is locked) ,and I deal with synchronization in this app.The method that contains the line though is not synchronized and nowhere in my code I try to use the array as a monitor (I only have some synchronized methods ,no smaller synchronized blocks so I nowhere choose a specific monitor explicitly).