|
|
|
|||||
|
Ice.Current.hashCode() can throw a NPE on null enum
Though it's fairly unlikely to ever get an Ice.Current without mode set, I did run into a NullPointerException while trying to unit test. There doesn't seem to be a good reason for the mode enumeration to not have a null check: (from 3.2.1)
Code:
hashCode()
{
int __h = 0;
if(adapter != null)
{
__h = 5 * __h + adapter.hashCode();
}
if(con != null)
{
__h = 5 * __h + con.hashCode();
}
__h = 5 * __h + id.hashCode();
if(facet != null)
{
__h = 5 * __h + facet.hashCode();
}
if(operation != null)
{
__h = 5 * __h + operation.hashCode();
}
__h = 5 * __h + mode.hashCode();
if(ctx != null)
{
__h = 5 * __h + ctx.hashCode();
}
__h = 5 * __h + requestId;
return __h;
}
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| null sequence in C# | chris92 | Help Center | 3 | 09-29-2006 08:58 AM |
| Java: going from String to Enum Type | nightnday | Help Center | 2 | 03-21-2006 02:32 PM |
| Why does Evictor throw the following exception? | kent | Help Center | 2 | 01-06-2006 05:01 PM |
| what can Monitor::wait() throw? | andhow | Help Center | 4 | 02-21-2005 08:26 AM |
| Current ICE documentation | johnstv3 | Help Center | 6 | 04-22-2004 07:22 AM |