mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
'hashCode()' called on array warnings fixed
This commit is contained in:
@@ -43,11 +43,12 @@ public class TestContent extends Content {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (!(o instanceof Content)) return false;
|
||||
return Arrays.equals(myData, ((Content)o).getBytes());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return myData.hashCode();
|
||||
return Arrays.hashCode(myData);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -24,6 +24,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.Arrays;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
@@ -109,7 +110,7 @@ public class MavenPropertiesVirtualFile extends VirtualFile {
|
||||
|
||||
@Override
|
||||
public long getModificationStamp() {
|
||||
return myContent.hashCode();
|
||||
return Arrays.hashCode(myContent);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user