Skip to content

Commit

Permalink
Fix invalid assignments of java.lang.String#hash
Browse files Browse the repository at this point in the history
java.lang.String#hash should only need assign when using the
constructor String#String(java.lang.String)
  • Loading branch information
gayanW committed Jul 23, 2018
1 parent ed880f4 commit 0d80f08
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/classes/modules/java.base/java/lang/String.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ public String(char value[], int offset, int count) {
String proxy=init(value,offset,count);
this.value=proxy.value;
this.coder=proxy.coder;
this.hash=proxy.hash;
}

private native String init(char[] value, int offset, int count);
Expand All @@ -103,7 +102,6 @@ public String(int[] codePoints, int offset, int count) {
String proxy=init(codePoints,offset,count);
this.value=proxy.value;
this.coder=proxy.coder;
this.hash=proxy.hash;
}

private native String init(int[] codePoints, int offset, int count);
Expand All @@ -113,7 +111,6 @@ public String(byte ascii[], int hibyte, int offset, int count) {
String proxy=init(ascii,hibyte,offset,count);
this.value=proxy.value;
this.coder=proxy.coder;
this.hash=proxy.hash;
}

private native String init(byte ascii[], int hibyte, int offset, int count);
Expand All @@ -129,7 +126,6 @@ public String(byte bytes[], int offset, int length, String charsetName){
String proxy=init(bytes,offset,length,charsetName);
this.value=proxy.value;
this.coder=proxy.coder;
this.hash=proxy.hash;
}

private native String init(byte bytes[], int offset, int length, String charsetName);
Expand Down

0 comments on commit 0d80f08

Please sign in to comment.