mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 02:38:59 +07:00
[java-inspections] IDEA-338114 Suggest to replace (int)(v ^ (v >>> 32)) with a Long.hashCode(v)
GitOrigin-RevId: 2d9591f9d9a558c4a61ac226556ef9f551d6e0c2
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6da9127fbb
commit
2770254f2f
@@ -0,0 +1,8 @@
|
||||
// "Replace with 'Long.hashCode()'" "true-preview"
|
||||
public class Test {
|
||||
long var = 1234567890123456789L;
|
||||
|
||||
public void testMethod() {
|
||||
int result = Long.hashCode(var);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Replace with 'Long.hashCode()'" "true-preview"
|
||||
public class Test {
|
||||
long var = 1234567890123456789L;
|
||||
|
||||
public void testMethod() {
|
||||
int result = Long.hashCode(var);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Replace with 'Long.hashCode()'" "true-preview"
|
||||
public class Test {
|
||||
long var = 1234567890123456789L;
|
||||
|
||||
public void testMethod() {
|
||||
int result = (int<caret>)(var ^ (var >>> /*shift amount*/ 32));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Replace with 'Long.hashCode()'" "true-preview"
|
||||
public class Test {
|
||||
long var = 1234567890123456789L;
|
||||
|
||||
public void testMethod() {
|
||||
int result = (int<caret>)((var >>> (16+16)) ^ var);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user