Index: vm/vmcore/src/kernel_classes/javasrc/java/lang/String.java =================================================================== --- vm/vmcore/src/kernel_classes/javasrc/java/lang/String.java (revision 416667) +++ vm/vmcore/src/kernel_classes/javasrc/java/lang/String.java (working copy) @@ -566,6 +566,8 @@ * @com.intel.drl.spec_ref */ public boolean equals(Object anObject) { + if (anObject == this) + return true; if (!(anObject instanceof String)) { return false; } @@ -642,6 +644,13 @@ */ public byte[] getBytes(String charsetName) throws UnsupportedEncodingException { + if (charsetName.equals("ISO-8859-1")){ + byte[] x = new byte[count]; + for (int i = offset, j=0; i < offset+count; i++, j++) + x[j] = (byte)value[i]; + return x; + } + Charset cs; try { cs = Charset.forName(charsetName); @@ -690,12 +699,11 @@ if (hashCode != 0) { return hashCode; } - int sum = 0; int j = offset + count; for (int i = offset; i < j; i++) { - sum = sum * 31 + value[i]; + hashCode = hashCode * 31 + value[i]; } - return hashCode = sum; + return hashCode; } /**