mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[groovy] fix warnings in StringPartInfo
GitOrigin-RevId: 0beced554224da4aba320edea8e6289d230e07c6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
fd3aa35384
commit
170dc73bbb
+5
-8
@@ -37,6 +37,7 @@ import org.jetbrains.plugins.groovy.lang.psi.util.GrStringUtil;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author Max Medvedev
|
||||
@@ -202,23 +203,19 @@ public class StringPartInfo {
|
||||
|
||||
try {
|
||||
if (prefixExists && suffixExists) {
|
||||
return ((GrBinaryExpression)((GrBinaryExpression)replaced).getLeftOperand()).getRightOperand();
|
||||
return Objects.requireNonNull(((GrBinaryExpression)((GrBinaryExpression)replaced).getLeftOperand()).getRightOperand());
|
||||
}
|
||||
if (!prefixExists && suffixExists) {
|
||||
return ((GrBinaryExpression)replaced).getLeftOperand();
|
||||
}
|
||||
if (prefixExists && !suffixExists) {
|
||||
return ((GrBinaryExpression)replaced).getRightOperand();
|
||||
}
|
||||
if (!prefixExists && !suffixExists) {
|
||||
return replaced;
|
||||
if (prefixExists) {
|
||||
return Objects.requireNonNull(((GrBinaryExpression)replaced).getRightOperand());
|
||||
}
|
||||
return replaced;
|
||||
}
|
||||
catch (ClassCastException c) {
|
||||
throw new IncorrectOperationException(buffer.toString());
|
||||
}
|
||||
|
||||
throw new IncorrectOperationException(buffer.toString());
|
||||
}
|
||||
|
||||
private String prepareSelected() {
|
||||
|
||||
Reference in New Issue
Block a user