Warnings fixed

GitOrigin-RevId: b0f27da5a94e6497f85c95b51625f4512304cfcc
This commit is contained in:
Tagir Valeev
2024-02-09 14:28:26 +01:00
committed by intellij-monorepo-bot
parent ba8f8b0f79
commit 95fab49390
5 changed files with 5 additions and 4 deletions

View File

@@ -61,7 +61,7 @@ class JavaStringLiteralLexer extends StringLiteralLexer {
if (code != '\\' || i >= myBufferEnd) return i;
char c = myBuffer.charAt(i);
if (StringUtil.isOctalDigit(c)) {
if (i + 2 < myBufferEnd && StringUtil.isOctalDigit(myBuffer.charAt(i + 1)) && StringUtil.isOctalDigit(myBuffer.charAt(i + 1))) {
if (i + 2 < myBufferEnd && StringUtil.isOctalDigit(myBuffer.charAt(i + 1)) && StringUtil.isOctalDigit(myBuffer.charAt(i + 2))) {
return i + 3;
}
}

View File

@@ -171,7 +171,7 @@ public class BasicJavaLexer extends LexerBase {
break;
case '#': // this assumes the Unix shell used does not understand Unicode escapes sequences
if (myBufferIndex == 0 && mySymbolLength == 1 && myBufferEndOffset > 1 && charAt(1) == '!' && mySymbolLength == 1) {
if (myBufferIndex == 0 && mySymbolLength == 1 && myBufferEndOffset > 1 && charAt(1) == '!') {
myTokenType = JavaTokenType.END_OF_LINE_COMMENT;
myTokenEndOffset = getLineTerminator(2);
}

View File

@@ -927,7 +927,7 @@ public final class FileUtilRt {
return null;
}
protected static boolean deleteFile(@NotNull final File file) {
static boolean deleteFile(@NotNull final File file) {
Boolean result = doIOOperation(new RepeatableIOOperation<Boolean, RuntimeException>() {
@Override
public Boolean execute(boolean lastAttempt) {

View File

@@ -18,6 +18,7 @@ import kotlin.time.Duration
suspend fun Process.awaitExit(): Int {
return loopInterruptible { timeout: Duration ->
if (timeout.isInfinite()) {
@Suppress("UsePlatformProcessAwaitExit")
Attempt.success(waitFor())
}
else if (waitFor(timeout.inWholeNanoseconds, TimeUnit.NANOSECONDS)) {

View File

@@ -302,7 +302,7 @@ public final class MainProcessor extends EventProcessor{
else if (component instanceof RadRootContainer || e.isShiftDown()) {
myCurrentProcessor = new GroupSelectionProcessor(myEditor, component);
}
else if (!e.isShiftDown()) {
else {
myCurrentProcessor = new DragSelectionProcessor(myEditor);
}