Changeset 5132


Ignore:
Timestamp:
Jul 13, 2015 11:14:30 AM (6 years ago)
Author:
ming
Message:

Fixed #1868: Disable serialization in pjsua2 Error class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/swig/pjsua2.i

    r5123 r5132  
    3939  %typemap(javabase) pj::Error "java.lang.Exception"; 
    4040 
     41  %typemap(javacode) pj::Error %{ 
     42 
    4143  // Override getMessage() 
    42   %typemap(javacode) pj::Error %{ 
    4344  public String getMessage() { 
    4445    return getTitle(); 
    4546  } 
     47   
     48  // Disable serialization (check ticket #1868) 
     49  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { 
     50    throw new java.io.NotSerializableException("Check ticket #1868!"); 
     51  } 
     52  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException { 
     53    throw new java.io.NotSerializableException("Check ticket #1868!"); 
     54  } 
     55 
    4656%} 
    4757#endif 
Note: See TracChangeset for help on using the changeset viewer.