Warnings fixed (mostly redundant assignment)

GitOrigin-RevId: 79b9c2ae99e8afc7b1f49e8cea2b31745458404d
This commit is contained in:
Tagir Valeev
2024-11-26 10:10:48 +00:00
committed by intellij-monorepo-bot
parent ff60a4753c
commit 1a4a0b51b3
8 changed files with 10 additions and 15 deletions
@@ -58,13 +58,11 @@ public class PatchedJar extends Jar {
private Resource[][] grabManifests(ResourceCollection[] rcs) {
Resource[][] manifests = new Resource[rcs.length][];
for (int i = 0; i < rcs.length; i++) {
Resource[][] resources = null;
Resource[][] resources;
if (rcs[i] instanceof FileSet) {
resources = grabResources(new FileSet[] {(FileSet) rcs[i]});
} else {
resources = grabNonFileSetResources(new ResourceCollection[] {
rcs[i]
});
resources = grabNonFileSetResources(new ResourceCollection[] {rcs[i]});
}
for (int j = 0; j < resources[0].length; j++) {
String name = resources[0][j].getName().replace('\\', '/');
@@ -55,13 +55,12 @@ public final class GradleScriptType extends GroovyRunnableScriptType {
public GlobalSearchScope patchResolveScopeInner(@Nullable Module module, @NotNull GlobalSearchScope baseScope) {
if (module == null) return GlobalSearchScope.EMPTY_SCOPE;
if (!ExternalSystemApiUtil.isExternalSystemAwareModule(GradleConstants.SYSTEM_ID, module)) return baseScope;
GlobalSearchScope result = GlobalSearchScope.EMPTY_SCOPE;
final Project project = module.getProject();
GlobalSearchScope[] jdkScopes = Arrays.stream(ModuleRootManager.getInstance(module).getOrderEntries())
.filter(entry -> entry instanceof JdkOrderEntry)
.map(entry -> LibraryScopeCache.getInstance(project).getScopeForSdk((JdkOrderEntry)entry))
.toArray(GlobalSearchScope[]::new);
result = jdkScopes.length == 0 ? GlobalSearchScope.EMPTY_SCOPE : GlobalSearchScope.union(jdkScopes);
GlobalSearchScope result = jdkScopes.length == 0 ? GlobalSearchScope.EMPTY_SCOPE : GlobalSearchScope.union(jdkScopes);
String modulePath = ExternalSystemApiUtil.getExternalProjectPath(module);
if (modulePath == null) return result;
@@ -59,7 +59,6 @@ public class IntroduceVariableValidatorTest extends LightJavaCodeInsightFixtureT
protected boolean replaceAllOccurences = false;
private String processFile(String fileText) throws IncorrectOperationException, InvalidDataException {
String result = "";
int startOffset = fileText.indexOf(TestUtils.BEGIN_MARKER);
if (startOffset < 0) {
startOffset = fileText.indexOf(ALL_MARKER);
@@ -88,8 +87,7 @@ public class IntroduceVariableValidatorTest extends LightJavaCodeInsightFixtureT
String varName = "preved";
GroovyVariableValidator validator =
new GroovyVariableValidator(new GrIntroduceContextImpl(getProject(), myEditor, selectedExpr, null, null, occurences, tempContainer));
result = validator.isOKTest(varName, replaceAllOccurences);
return result;
return validator.isOKTest(varName, replaceAllOccurences);
}
@@ -71,7 +71,7 @@ public final class PyByteLiteralInspection extends PyInspection {
boolean hasNonAscii = false;
int length = value.length();
char c = 0;
char c;
for (int i = 0; i < length; ++i) {
c = value.charAt(i);
if (((int) c) > 255) {
@@ -48,7 +48,7 @@ public class PythonSdkAdditionalData implements SdkAdditionalData {
@NotNull
private UUID myUUID = UUID.randomUUID();
private PyFlavorAndData<?, ?> myFlavorAndData = PyFlavorAndData.getUNKNOWN_FLAVOR_DATA();
private PyFlavorAndData<?, ?> myFlavorAndData;
private String myAssociatedModulePath;
private final Gson myGson = new Gson();
@@ -54,7 +54,7 @@ public final class PyDocstringGenerator {
private final PsiElement mySettingsAnchor;
private boolean myUseTypesFromDebuggerSignature = true;
private boolean myNewMode = false; // true - generate new string, false - update existing
private boolean myNewMode; // true - generate new string, false - update existing
private boolean myAddFirstEmptyLine = false;
private boolean myParametersPrepared = false;
private String myQuotes = TRIPLE_DOUBLE_QUOTES;
@@ -15,8 +15,8 @@ import java.awt.*;
*/
class ArrayTableCellRenderer extends DataViewCellRenderer implements ColoredCellRenderer {
private static final Logger LOG = Logger.getInstance(ArrayTableCellRenderer.class);
private double myMin = Double.MIN_VALUE;
private double myMax = Double.MIN_VALUE;
private double myMin;
private double myMax;
private String myComplexMin;
private String myComplexMax;
private boolean myColored = true;
+1 -1
View File
@@ -186,7 +186,7 @@ public abstract class PyEnvTestCase {
PyEnvTaskRunner taskRunner = new PyEnvTaskRunner(roots, myLoggingRule);
final EnvTestTagsRequired classAnnotation = getClass().getAnnotation(EnvTestTagsRequired.class);
EnvTestTagsRequired methodAnnotation = null;
EnvTestTagsRequired methodAnnotation;
try {
String methodName = myTestName.getMethodName();
if (methodName.contains("[")) {