[Code Samples Inspection] Java > Code style issues > Field may be 'final'

This commit is contained in:
Jakub Chrzanowski 2020-04-16 11:57:35 +02:00
parent f64e752611
commit 115c3153d3
3 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
public class SimpleBlock extends AbstractBlock { public class SimpleBlock extends AbstractBlock {
private SpacingBuilder spacingBuilder; private final SpacingBuilder spacingBuilder;
protected SimpleBlock(@NotNull ASTNode node, @Nullable Wrap wrap, @Nullable Alignment alignment, protected SimpleBlock(@NotNull ASTNode node, @Nullable Wrap wrap, @Nullable Alignment alignment,
SpacingBuilder spacingBuilder) { SpacingBuilder spacingBuilder) {

View File

@ -28,7 +28,7 @@ import org.jetbrains.annotations.NotNull;
import java.util.Collection; import java.util.Collection;
class SimpleCreatePropertyQuickFix extends BaseIntentionAction { class SimpleCreatePropertyQuickFix extends BaseIntentionAction {
private String key; private final String key;
SimpleCreatePropertyQuickFix(String key) { SimpleCreatePropertyQuickFix(String key) {
this.key = key; this.key = key;
@ -89,4 +89,4 @@ class SimpleCreatePropertyQuickFix extends BaseIntentionAction {
FileEditorManager.getInstance(project).getSelectedTextEditor().getCaretModel().moveCaretRelatively(2, 0, false, false, false); FileEditorManager.getInstance(project).getSelectedTextEditor().getCaretModel().moveCaretRelatively(2, 0, false, false, false);
}); });
} }
} }

View File

@ -12,7 +12,7 @@ import org.jetbrains.annotations.*;
import java.util.*; import java.util.*;
public class SimpleReference extends PsiReferenceBase<PsiElement> implements PsiPolyVariantReference { public class SimpleReference extends PsiReferenceBase<PsiElement> implements PsiPolyVariantReference {
private String key; private final String key;
public SimpleReference(@NotNull PsiElement element, TextRange textRange) { public SimpleReference(@NotNull PsiElement element, TextRange textRange) {
super(element, textRange); super(element, textRange);