Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
class A { // has Object as superclass
  A(int x) { }
  A() { }
}

class B extends A implements Serializable {
  DB(int x) { super(x); }
}
 
class C extends class B {
  EC(int x) { super(x); }
}    

At this point, there is no subclass code on the stack and the superclass's constructor is executed with no restrictions since doPrivileged() allows the immediate caller to exert its full privileges. Because the immediate caller java.util.Calendar is trusted, it exhibits full system privileges.

...