mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-79048 (False positive 'collection queried but never updated' report)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2010 Dave Griffith, Bas Leijdekkers
|
||||
* Copyright 2003-2011 Dave Griffith, Bas Leijdekkers
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -73,10 +73,10 @@ class VariableAssignedVisitor extends JavaRecursiveElementVisitor {
|
||||
if (assigned) {
|
||||
return;
|
||||
}
|
||||
super.visitPrefixExpression(prefixExpression);
|
||||
if (!checkUnaryExpressions) {
|
||||
return;
|
||||
}
|
||||
super.visitPrefixExpression(prefixExpression);
|
||||
final IElementType tokenType = prefixExpression.getOperationTokenType();
|
||||
if (!tokenType.equals(JavaTokenType.PLUSPLUS) &&
|
||||
!tokenType.equals(JavaTokenType.MINUSMINUS)) {
|
||||
@@ -94,10 +94,10 @@ class VariableAssignedVisitor extends JavaRecursiveElementVisitor {
|
||||
if (assigned) {
|
||||
return;
|
||||
}
|
||||
super.visitPostfixExpression(postfixExpression);
|
||||
if (!checkUnaryExpressions) {
|
||||
return;
|
||||
}
|
||||
super.visitPostfixExpression(postfixExpression);
|
||||
final IElementType tokenType = postfixExpression.getOperationTokenType();
|
||||
if (!tokenType.equals(JavaTokenType.PLUSPLUS) &&
|
||||
!tokenType.equals(JavaTokenType.MINUSMINUS)) {
|
||||
|
||||
+11
@@ -166,4 +166,15 @@ public class MismatchedCollectionQueryUpdate {
|
||||
for (final String value : ourValues) {}
|
||||
}
|
||||
}
|
||||
|
||||
private void updateAttachmentWarning(final String message) {
|
||||
final List<String> includedAttachments;
|
||||
if (message instanceof Object &&
|
||||
!(includedAttachments = boo()).isEmpty()) {
|
||||
if (includedAttachments.size() == 1) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<String> boo() {return null;}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user