Versions Compared

Key

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

...

Code Block
bgColor#FFcccc
package ssnvault.values;
public class Ssn {
  public String ssn = "001 01 0001";
}

package ssnvault.values;
public class SsnVerify {
  public static void main(String[] args) {
    Ssn number = new Ssn();
    System.out.println("Please enter last four digits of your SSN:");
    //perform verification
  }
}

Version Specific Details

The behavior described above has been demonstrated in Java 1.5.0 versions running on Mac OS X Tiger, Solaris 10/Sparc64, and Ubuntu Linux 8.04, but not in Java 1.6.0 versions running on Windows XP or Linux.

Compliant Solution

It is vital to re-compile both Ssn and SsnVerify classes so that the bytecode verifier can be applied to detect the non-conforming code.

Alternatively, to force bytecode verification when the unmodified class is loaded, the -verifyXverify:all flag can be specified on the java command line.

The verification process is automatically initiated unless the -noverifyXverify:none flag is specified at command line. On Java 2 systems, classes loaded by the primordial class loader (that loads classes from the boot class path) are not required to perform bytecode verification.

...