523 |
throws SecurityException |
throws SecurityException |
524 |
{ |
{ |
525 |
if (enable) |
if (enable) |
526 |
if (getClass ().getClassLoader () != null) |
{ |
527 |
throw new SecurityException ("Untrusted ObjectInputStream subclass attempted to enable object resolution"); |
SecurityManager sm = System.getSecurityManager (); |
528 |
|
if (sm != null) |
529 |
|
sm.checkPermission (new SerializablePermission ("enableSubtitution")); |
530 |
|
} |
531 |
|
|
532 |
boolean old_val = this.resolveEnabled; |
boolean old_val = this.resolveEnabled; |
533 |
this.resolveEnabled = enable; |
this.resolveEnabled = enable; |