aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-duplications
diff options
context:
space:
mode:
authorBruno Andrade <bruno@artsman.dev>2021-07-12 09:10:08 -0300
committersonartech <sonartech@sonarsource.com>2021-07-12 20:06:52 +0000
commit24327c11a52a01d3562eb78a0d4d99533decf543 (patch)
treeb3772a405bdfe2039c4f7b48d2077517adfdd688 /sonar-duplications
parentae5711e2ee6b6b809a015d9f934ed481fe78533f (diff)
downloadsonarqube-24327c11a52a01d3562eb78a0d4d99533decf543.tar.gz
sonarqube-24327c11a52a01d3562eb78a0d4d99533decf543.zip
Code smell fix: Remove redundant casts
Diffstat (limited to 'sonar-duplications')
-rw-r--r--sonar-duplications/src/main/java/org/sonar/duplications/block/ByteArray.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/sonar-duplications/src/main/java/org/sonar/duplications/block/ByteArray.java b/sonar-duplications/src/main/java/org/sonar/duplications/block/ByteArray.java
index 589cb60758c..2cb7546fd50 100644
--- a/sonar-duplications/src/main/java/org/sonar/duplications/block/ByteArray.java
+++ b/sonar-duplications/src/main/java/org/sonar/duplications/block/ByteArray.java
@@ -19,7 +19,6 @@
*/
package org.sonar.duplications.block;
-import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.IntBuffer;
import java.util.Arrays;
@@ -97,7 +96,7 @@ public final class ByteArray {
//This is because the generated byte code includes the static return type of the method, which is not found on Java 8 and lower because
//the overloaded methods with covariant return types don't exist.
- ((Buffer) bb).rewind();
+ bb.rewind();
IntBuffer ib = bb.asIntBuffer();
int[] result = new int[size];
ib.get(result);