langtuandroid / jdiameter

Automatically exported from code.google.com/p/jdiameter
0 stars 0 forks source link

ClassCastException at org.jdiameter.client.impl.app.rf.ClientRfSessionImpl handling FAILED_SEND_RECORD #51

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
(Moved from https://code.google.com/p/mobicents/issues/detail?id=3266)

Reported by balageguy, Feb 6, 2013
Found in the Diameter 1.5 source (line 306):

This is the original code which leads to ClassCastException in runtime (you can 
not cast RfAccountingRequest to Message):

     case FAILED_SEND_RECORD:
          RfAccountingRequest request = (RfAccountingRequest)event.getData();
          Avp accRtReq = ((Message) event.getData()).getAvps().getAvp(ACCOUNTING_REALTIME_REQUIRED);

Instead it should be the following:

     case FAILED_SEND_RECORD:
          RfAccountingRequest request = (RfAccountingRequest) event.getData();
          Avp accRtReq = request.getMessage().getAvps().getAvp(ACCOUNTING_REALTIME_REQUIRED);

Original issue reported on code.google.com by brainslog on 16 Dec 2013 at 12:08

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 6aa347a21c52.

Updated the source as described. Also fixed the same problem at Base Accounting 
session.

Original comment by brainslog on 16 Dec 2013 at 12:14