[Asterisk-java-users] Possible bug in actionid generation?
Brought to you by:
srt
|
From: Chad K. <ch...@cm...> - 2005-04-21 23:05:49
|
I'm sure I'll get harassed for this, but I converted some of
asterisk-java to C#, and in the process, I may have run across a
possible bug.
DefaultManagerConnection uses the hashcode of the object in
createInternalActionId, however, the Java specs do not specify that
hashcodes must be positive, so if a VM provides a negative value for
this function, Util.{get,strip}InternalActionId will fail to work, and
will return null. Either a different separator between the internal
actionid and the object actionid needs to be used, or the util functions
should perhaps start scanning at the second character instead of the first.
Now, I have no idea if any JVM is actually affected by this, and my
conversion job worked fine on Microsoft's CLR, but failed on Mono
because of the hashing implementation differences.
Chad Kitching
|