cleanup: make fields final

This commit is contained in:
Alexey Kudravtsev
2019-01-24 17:00:01 +03:00
parent 69545f2045
commit 92aa03326d
68 changed files with 85 additions and 85 deletions
@@ -55,7 +55,7 @@ final class ImageFileEditorProvider implements FileEditorProvider, DumbAware {
if (IfsUtil.isSVG(file)) {
TextEditor editor = (TextEditor)TextEditorProvider.getInstance().createEditor(project, file);
editor.getEditor().getDocument().addDocumentListener(new DocumentListener() {
Alarm myAlarm = new Alarm(Alarm.ThreadToUse.POOLED_THREAD, editor);
final Alarm myAlarm = new Alarm(Alarm.ThreadToUse.POOLED_THREAD, editor);
@Override
public void documentChanged(@NotNull DocumentEvent event) {
myAlarm.cancelAllRequests();
@@ -116,7 +116,7 @@ public final class IfsUtil {
file.putUserData(FORMAT_KEY, SVG_FORMAT);
file.putUserData(IMAGE_PROVIDER_REF_KEY, new SoftReference<>(new ImageDocument.CachedScaledImageProvider() {
ScaleContext.Cache<BufferedImage> cache = new ScaleContext.Cache<>((ctx) -> {
final ScaleContext.Cache<BufferedImage> cache = new ScaleContext.Cache<>((ctx) -> {
try {
return SVGLoader.loadHiDPI(url.get(), new ByteArrayInputStream(content), ctx);
}
@@ -18,8 +18,8 @@ import java.util.Arrays;
class NewArrayInstanceEvaluator implements Evaluator {
private static final Logger LOG = Logger.getInstance("#com.intellij.debugger.engine.evaluation.expression.NewArrayInstanceEvaluator");
private final Evaluator myArrayTypeEvaluator;
private Evaluator myDimensionEvaluator;
private Evaluator myInitializerEvaluator;
private final Evaluator myDimensionEvaluator;
private final Evaluator myInitializerEvaluator;
/**
* either dimensionEvaluator or initializerEvaluators must be null!
@@ -53,7 +53,7 @@ import java.awt.event.KeyEvent;
*/
public class ValueHint extends AbstractValueHint {
private static final Logger LOG = Logger.getInstance("#com.intellij.debugger.ui.ValueHint");
private PsiElement myCurrentExpression;
private final PsiElement myCurrentExpression;
private Value myValueToShow = null;
private ValueHint(Project project, Editor editor, Point point, ValueHintType type, final PsiElement selectedExpression, final TextRange textRange) {
@@ -22,7 +22,7 @@ public abstract class NodeRendererImpl implements NodeRenderer {
public static final String DEFAULT_NAME = "unnamed";
protected BasicRendererProperties myProperties;
private String myDefaultName;
private final String myDefaultName;
protected NodeRendererImpl() {
this(DEFAULT_NAME, false);
@@ -82,7 +82,7 @@ public class SidePanel extends JPanel {
myList.setCellRenderer(new GroupedItemsListRenderer<SidePanelItem>(descriptor) {
JPanel myExtraPanel;
SidePanelCountLabel myCountLabel;
CellRendererPane myValidationParent = new CellRendererPane();
final CellRendererPane myValidationParent = new CellRendererPane();
{
mySeparatorComponent.setCaptionCentered(false);
myList.add(myValidationParent);
@@ -80,8 +80,8 @@ public class RenameWrongRefFix implements IntentionAction {
}
} else {
class MyScopeProcessor implements PsiScopeProcessor {
ArrayList<PsiElement> myResult = new ArrayList<>();
boolean myFilterMethods;
final ArrayList<PsiElement> myResult = new ArrayList<>();
final boolean myFilterMethods;
boolean myFilterStatics;
MyScopeProcessor(PsiReferenceExpression refExpression) {
@@ -323,7 +323,7 @@ public class GlobalJavaInspectionContextImpl extends GlobalJavaInspectionContext
};
final DelegatingGlobalSearchScope globalSearchScope = new DelegatingGlobalSearchScope(projectScope) {
Set<FileType> fileTypes = javaManager.getLanguages().stream().map(l -> l.getAssociatedFileType()).collect(Collectors.toSet());
final Set<FileType> fileTypes = javaManager.getLanguages().stream().map(l -> l.getAssociatedFileType()).collect(Collectors.toSet());
@Override
public boolean contains(@NotNull VirtualFile file) {
@@ -83,7 +83,7 @@ public class ExtractClassProcessor extends FixableUsagesRefactoringProcessor {
private boolean delegationRequired;
private final ExtractEnumProcessor myExtractEnumProcessor;
private final PsiClass myClass;
private boolean extractInnerClass;
private final boolean extractInnerClass;
public ExtractClassProcessor(PsiClass sourceClass,
List<? extends PsiField> fields,
@@ -162,8 +162,8 @@ public class ReductionSystem {
public ReductionSystem[] isolate() {
class Node {
int myComponent = -1;
Constraint myConstraint;
Set<Node> myNeighbours = new HashSet<>();
final Constraint myConstraint;
final Set<Node> myNeighbours = new HashSet<>();
Node() {
myConstraint = null;
@@ -73,7 +73,7 @@ public class FluentIterableConversionUtil {
}
if (PsiTypesUtil.compareTypes(parameters[0], targetParameters[0], false)) {
return new TypeConversionDescriptor("$q$.toArray($type$)", null) {
PsiType myType = parameters[0];
final PsiType myType = parameters[0];
@Override
public PsiExpression replace(PsiExpression expression, @NotNull TypeEvaluator evaluator) throws IncorrectOperationException {
@@ -45,7 +45,7 @@ class OffsetTranslator implements Disposable {
}, this);
originalFile.getProject().getMessageBus().connect(this).subscribe(PsiModificationTracker.TOPIC, new PsiModificationTracker.Listener() {
long lastModCount = originalFile.getViewProvider().getModificationStamp();
final long lastModCount = originalFile.getViewProvider().getModificationStamp();
@Override
public void modificationCountChanged() {
if (isUpToDate() && lastModCount != originalFile.getViewProvider().getModificationStamp()) {
@@ -96,7 +96,7 @@ public abstract class CloneDvcsDialog extends DialogWrapper {
@NotNull private final List<String> myLoadedRepositoryHostingServicesNames;
@Nullable private Alarm myRepositoryUrlAutoCompletionTooltipAlarm;
@NotNull private final Set<String> myUniqueAvailableRepositories;
@NotNull private List<ValidationInfo> myRepositoryListLoadingErrors = new ArrayList<>();
@NotNull private final List<ValidationInfo> myRepositoryListLoadingErrors = new ArrayList<>();
public CloneDvcsDialog(@NotNull Project project, @NotNull String displayName, @NotNull String vcsDirectoryName) {
this(project, displayName, vcsDirectoryName, null);
@@ -26,7 +26,7 @@ public class ModuleData extends AbstractNamedData implements Named, ExternalConf
@NotNull private final String myId;
@NotNull private final String myModuleTypeId;
@NotNull private final String myExternalConfigPath;
@NotNull private String myModuleFileDirectoryPath;
@NotNull private final String myModuleFileDirectoryPath;
@Nullable private String myGroup;
@Nullable private String myVersion;
@Nullable private String myDescription;
@@ -206,7 +206,7 @@ public class ShowImplementationsAction extends AnAction implements PopupAction {
private static class ImplementationViewComponentUpdater implements ListComponentUpdater {
private final ImplementationViewComponent myComponent;
private int myIncludeSelfIdx;
private final int myIncludeSelfIdx;
ImplementationViewComponentUpdater(ImplementationViewComponent component, int includeSelfIdx) {
myComponent = component;
@@ -36,7 +36,7 @@ import static com.intellij.codeInsight.template.impl.ListTemplatesHandler.filter
* @author peter
*/
public class LiveTemplateCompletionContributor extends CompletionContributor {
private static Key<Boolean> ourShowTemplatesInTests = Key.create("ShowTemplatesInTests");
private static final Key<Boolean> ourShowTemplatesInTests = Key.create("ShowTemplatesInTests");
@TestOnly
public static void setShowTemplatesInTests(boolean show, @NotNull Disposable parentDisposable) {
@@ -42,7 +42,7 @@ import java.util.*;
public class EnvironmentVariablesTextFieldWithBrowseButton extends TextFieldWithBrowseButton implements UserActivityProviderComponent {
private EnvironmentVariablesData myData = EnvironmentVariablesData.DEFAULT;
private Map<String, String> myParentDefaults = new LinkedHashMap<>();
private final Map<String, String> myParentDefaults = new LinkedHashMap<>();
private final List<ChangeListener> myListeners = ContainerUtil.createLockFreeCopyOnWriteList();
public EnvironmentVariablesTextFieldWithBrowseButton() {
@@ -137,7 +137,7 @@ public class FindPopupPanel extends JBPanel implements FindUI {
private String myUsagesCount;
private String myFilesCount;
private UsageViewPresentation myUsageViewPresentation;
private ComponentValidator myComponentValidator;
private final ComponentValidator myComponentValidator;
FindPopupPanel(@NotNull FindUIHelper helper) {
myHelper = helper;
@@ -74,7 +74,7 @@ public class DetectionExcludesConfigurable implements Configurable {
myEnabledDetectionCheckBox.setBorder(new EmptyBorder(10, 10, 0, 0));
final JBList excludesList = new JBList(myModel);
final ColoredListCellRenderer renderer = new ColoredListCellRenderer() {
JPanel panel = new JPanel(new BorderLayout());
final JPanel panel = new JPanel(new BorderLayout());
{
panel.setBorder(new EmptyBorder(2, 10, 2, 0));
panel.add(this);
@@ -272,7 +272,7 @@ public class ScratchFileActions {
@NotNull
protected Function<VirtualFile, Language> fileLanguage(@NotNull Project project) {
return new Function<VirtualFile, Language>() {
ScratchFileService fileService = ScratchFileService.getInstance();
final ScratchFileService fileService = ScratchFileService.getInstance();
@Override
public Language fun(VirtualFile file) {
@@ -134,7 +134,7 @@ public abstract class ChooseByNameBase implements ChooseByNameViewModel {
private final int myRebuildDelay;
private final Alarm myHideAlarm = new Alarm();
private boolean myShowListAfterCompletionKeyStroke = false;
private final boolean myShowListAfterCompletionKeyStroke = false;
protected JBPopup myTextPopup;
protected JBPopup myDropdownPopup;
@@ -199,7 +199,7 @@ public class DefaultChooseByNameItemProvider implements ChooseByNameItemProvider
ChooseByNameModel model = base.getModel();
Comparator<Object> weightComparator = new Comparator<Object>() {
@SuppressWarnings("unchecked")
@SuppressWarnings("unchecked") final
Comparator<Object> modelComparator = model instanceof Comparator ? (Comparator<Object>)model :
new PathProximityComparator(context);
@@ -17,7 +17,7 @@ import org.jetbrains.annotations.NotNull;
public final class FileEditorPsiTreeChangeListener extends PsiTreeChangeAdapter {
private static final Logger LOG = Logger.getInstance(FileEditorPsiTreeChangeListener.class);
private FileEditorManagerEx myFileEditorManager;
private final FileEditorManagerEx myFileEditorManager;
public FileEditorPsiTreeChangeListener(FileEditorManagerEx psiAwareFileEditorManager) {
myFileEditorManager = psiAwareFileEditorManager;
@@ -30,7 +30,7 @@ public class SeverityRenderer extends ComboBoxTableRenderer<HighlightSeverity> {
static final HighlightSeverity EDIT_SEVERITIES = new HighlightSeverity(InspectionsBundle.message("inspection.edit.severities.text"), -1);
@NotNull
private final Runnable myOnClose;
private ScopesAndSeveritiesTable myTable;
private final ScopesAndSeveritiesTable myTable;
@NotNull
private final Icon myDisabledIcon;
@NotNull
@@ -154,7 +154,7 @@ public class FileBasedIndexProjectHandler implements IndexableFileSet, Disposabl
index.processChangedFiles(project, new Processor<VirtualFile>() {
int filesInProjectToBeIndexed;
String projectBasePath = project.getBasePath();
final String projectBasePath = project.getBasePath();
@Override
public boolean process(VirtualFile file) {
@@ -2050,8 +2050,8 @@ public abstract class DialogWrapper {
}
new Thread("DialogWrapper resizer") {
int time = 200;
int steps = 7;
final int time = 200;
final int steps = 7;
@Override
public void run() {
@@ -29,7 +29,7 @@ public class FilteringTableModel<T> extends AbstractTableModel {
private final List<List<T>> myData = new ArrayList<>();
private final Class<T> myClz;
private Condition<T> myCondition = null;
private ArrayList<Integer> myIndex = new ArrayList<>();
private final ArrayList<Integer> myIndex = new ArrayList<>();
private final TableModelListener myListDataListener = e -> refilter();
@@ -74,7 +74,7 @@ public class ExperimentsDialog extends DialogWrapper {
private TableModel createModel(ExperimentalFeature[] experimentalFeatures) {
return new AbstractTableModel() {
ExperimentalFeature[] features = experimentalFeatures;
final ExperimentalFeature[] features = experimentalFeatures;
@Override
public int getRowCount() {
@@ -40,7 +40,7 @@ class ActivityMonitorAction extends DumbAwareAction {
CompilationMXBean jitBean = ManagementFactory.getCompilationMXBean();
ScheduledFuture<?> future = AppExecutorUtil.getAppScheduledExecutorService().scheduleWithFixedDelay(new Runnable() {
final TLongLongHashMap lastThreadTimes = new TLongLongHashMap();
TObjectLongHashMap<String> subsystemToSamples = new TObjectLongHashMap<>();
final TObjectLongHashMap<String> subsystemToSamples = new TObjectLongHashMap<>();
long lastGcTime = totalGcTime();
long lastJitTime = jitBean.getTotalCompilationTime();
long lastUiUpdate = System.currentTimeMillis();
@@ -453,8 +453,8 @@ public class Switcher extends AnAction implements DumbAware {
}
final VirtualFilesRenderer filesRenderer = new VirtualFilesRenderer(this) {
JPanel myPanel = new JPanel(new BorderLayout());
JLabel myLabel = createPaleLabel("* ");
final JPanel myPanel = new JPanel(new BorderLayout());
final JLabel myLabel = createPaleLabel("* ");
{
myPanel.setOpaque(false);
@@ -68,7 +68,7 @@ public class GrayFilterConfig extends AnAction implements DumbAware {
};
table.getColumnModel().getColumn(1).setCellEditor(new AbstractTableCellEditor() {
JTextField component = new JTextField();
final JTextField component = new JTextField();
@Override
public Object getCellEditorValue() {
@@ -43,7 +43,7 @@ public class TopAnomaliesAction extends ActionGroup {
private static final int LIMIT = 10;
private static final ResettableAction TOP_PARENTS = new ResettableAction("Parents") {
TreeSet<Pair<JComponent, Integer>> top = new TreeSet<>(COMPARATOR);
final TreeSet<Pair<JComponent, Integer>> top = new TreeSet<>(COMPARATOR);
TreeSet<Pair<JComponent, Integer>> old = new TreeSet<>(COMPARATOR);
@Override
@@ -91,7 +91,7 @@ public class TopAnomaliesAction extends ActionGroup {
};
private static final ResettableAction TOP_UI_PROPERTIES = new ResettableAction("ClientProperties") {
TreeSet<Pair<JComponent, Integer>> top = new TreeSet<>(COMPARATOR);
final TreeSet<Pair<JComponent, Integer>> top = new TreeSet<>(COMPARATOR);
TreeSet<Pair<JComponent, Integer>> old = new TreeSet<>(COMPARATOR);
@Override
@@ -99,7 +99,7 @@ public class ActionsCollectorImpl extends ActionsCollector implements Persistent
return action.isGlobal() ? ActionManager.getInstance().getId(action) : null;
}
private State myState = new State();
private final State myState = new State();
@Nullable
@Override
@@ -35,7 +35,7 @@ public class IntentionsCollector implements PersistentStateComponent<IntentionsC
private static final FeatureUsageGroup GROUP = new FeatureUsageGroup("intentions", 1);
private static final String DEFAULT_ID = "third.party.intention";
private State myState = new State();
private final State myState = new State();
@Nullable
@Override
@@ -42,7 +42,7 @@ public class MainMenuCollector implements PersistentStateComponent<MainMenuColle
private static final FeatureUsageGroup GROUP = new FeatureUsageGroup("main.menu", 1);
private static final String GENERATED_ON_RUNTIME_ITEM = "generated.on.runtime";
private State myState = new State();
private final State myState = new State();
@Nullable
@Override
@@ -139,7 +139,7 @@ public class ToolWindowCollector implements PersistentStateComponent<ToolWindowC
return null;
}
private State myState = new State();
private final State myState = new State();
@Nullable
@Override
@@ -27,7 +27,7 @@ public class ShortcutsCollector implements PersistentStateComponent<ShortcutsCol
public final Map<String, Integer> myValues = new HashMap<>();
}
private MyState myState = new MyState();
private final MyState myState = new MyState();
@Override
@NotNull
@@ -38,7 +38,7 @@ public class ToolbarClicksCollector implements PersistentStateComponent<ToolbarC
public Map<String, Integer> myValues = new HashMap<>();
}
private ClicksState myState = new ClicksState();
private final ClicksState myState = new ClicksState();
@Override
public ClicksState getState() {
@@ -26,7 +26,7 @@ import com.intellij.util.Time;
public class StatisticsUploadAssistant {
private static final String IDEA_SUPPRESS_REPORT_STATISTICS = "idea.suppress.statistics.report";
public static final Object LOCK = new Object();
private static EventLogStatisticsService logStatisticsService = new EventLogStatisticsService();
private static final EventLogStatisticsService logStatisticsService = new EventLogStatisticsService();
private StatisticsUploadAssistant(){}
@@ -79,7 +79,7 @@ public class DumbServiceImpl extends DumbService implements Disposable, Modifica
ApplicationManager.getApplication().getMessageBus().connect(project)
.subscribe(BatchFileChangeListener.TOPIC, new BatchFileChangeListener() {
@SuppressWarnings("UnnecessaryFullyQualifiedName") // synchronized, can be accessed from different threads
@SuppressWarnings("UnnecessaryFullyQualifiedName") final // synchronized, can be accessed from different threads
java.util.Stack<AccessToken> stack = new Stack<>();
@Override
@@ -11,7 +11,7 @@ import javax.swing.*;
import java.util.List;
public class JBListUpdater implements ListComponentUpdater {
private JBList myComponent;
private final JBList myComponent;
public JBListUpdater(JBList component) {
myComponent = component;
@@ -8,7 +8,7 @@ import org.jetbrains.annotations.NotNull;
@SuppressWarnings("deprecation")
public class ProblemTypeAdapter implements TroubleInfoCollector {
private ProblemType myProblemType;
private final ProblemType myProblemType;
public ProblemTypeAdapter(ProblemType problemType) {
myProblemType = problemType;
@@ -75,7 +75,7 @@ public class ComboBoxCompositeEditor<I, F extends JComponent> extends JPanel imp
private final ComboBoxCompositeEditorStrategy editorTextFieldStrategy = new ComboBoxCompositeEditorStrategy () {
BiConsumer<I, EditorTextField> defaultOnSetHandler = (anObject, component) -> component.setText((anObject == null) ? "" : anObject.toString());
final BiConsumer<I, EditorTextField> defaultOnSetHandler = (anObject, component) -> component.setText((anObject == null) ? "" : anObject.toString());
@Override
public void setItem(F component, I anObject) {
@@ -113,7 +113,7 @@ public class ComboBoxCompositeEditor<I, F extends JComponent> extends JPanel imp
private final ComboBoxCompositeEditorStrategy jTextFieldStrategy = new ComboBoxCompositeEditorStrategy() {
BiConsumer<I, JTextField> defaultOnSetHandler = (anObject, component) -> component.setText((anObject ==null) ? "" : anObject.toString());
final BiConsumer<I, JTextField> defaultOnSetHandler = (anObject, component) -> component.setText((anObject == null) ? "" : anObject.toString());
@Override
public void setItem(F component, I anObject) {
@@ -261,8 +261,8 @@ public class ShowUIDefaultsAction extends AnAction implements DumbAware {
private void addNewValue() {
ApplicationManager.getApplication().invokeLater(() -> new DialogWrapper(myTable, true) {
JBTextField name = new JBTextField(40);
JBTextField value = new JBTextField(40);
final JBTextField name = new JBTextField(40);
final JBTextField value = new JBTextField(40);
{
setTitle("Add New Value");
init();
@@ -27,7 +27,7 @@ public class NST {
private static final String ourRegistryKeyTouchbar = "ide.mac.touchbar.use";
private static NSTLibrary ourNSTLibrary = null; // NOTE: JNA is stateless (doesn't have any limitations of multi-threaded use)
private static String MIN_OS_VERSION = "10.12.2";
private static final String MIN_OS_VERSION = "10.12.2";
static boolean isSupportedOS() { return SystemInfo.isMac && SystemInfo.isOsVersionAtLeast(MIN_OS_VERSION); }
private static final boolean ourHeadless = GraphicsEnvironment.isHeadless();
@@ -40,7 +40,7 @@ class ProjectData {
private final Map<Editor, EditorData> myEditors = new HashMap<>();
private final Map<ToolWindow, ToolWindowData> myToolWindows = new HashMap<>();
private AtomicInteger myActiveDebugSessions = new AtomicInteger(0);
private final AtomicInteger myActiveDebugSessions = new AtomicInteger(0);
ProjectData(@NotNull Project project) {
myProject = project;
@@ -9,9 +9,9 @@ import org.jetbrains.annotations.Nullable;
import javax.swing.*;
class TBItemPopover extends TBItem {
private Icon myIcon;
private String myText;
private int myWidthPix;
private final Icon myIcon;
private final String myText;
private final int myWidthPix;
private TouchBar myExpandTB;
private TouchBar myTapAndHoldTB;
@@ -17,7 +17,7 @@ import java.util.Set;
* @author yole
*/
class PopupTableAdapter<T> implements PopupChooserBuilder.PopupComponentAdapter<T> {
private PopupChooserBuilder myBuilder;
private final PopupChooserBuilder myBuilder;
private final JTable myTable;
PopupTableAdapter(PopupChooserBuilder builder, JTable table) {
@@ -18,7 +18,7 @@ import java.util.Set;
* @author yole
*/
class PopupTreeAdapter<T> implements PopupChooserBuilder.PopupComponentAdapter<T> {
private PopupChooserBuilder myBuilder;
private final PopupChooserBuilder myBuilder;
private final JTree myTree;
PopupTreeAdapter(PopupChooserBuilder builder, JTree tree) {
@@ -59,7 +59,7 @@ public class RemoteServer {
RMIClientSocketFactory clientSocketFactory = RMISocketFactory.getDefaultSocketFactory();
RMIServerSocketFactory serverSocketFactory = new RMIServerSocketFactory() {
InetAddress loopbackAddress = InetAddress.getByName(getLoopbackAddress());
final InetAddress loopbackAddress = InetAddress.getByName(getLoopbackAddress());
public ServerSocket createServerSocket(int port) throws IOException {
return new ServerSocket(port, 0, loopbackAddress);
}
@@ -11,7 +11,7 @@ import org.jetbrains.annotations.NotNull;
import java.util.List;
public class WindowsElevationUtil {
private static Logger LOG = Logger.getInstance(WindowsElevationUtil.class);
private static final Logger LOG = Logger.getInstance(WindowsElevationUtil.class);
private WindowsElevationUtil() {
}
@@ -79,6 +79,6 @@ public class WindowsElevationUtil {
return FIELDS;
}
private static List<String> FIELDS = createFieldsOrder("TokenIsElevated");
private static final List<String> FIELDS = createFieldsOrder("TokenIsElevated");
}
}
@@ -232,7 +232,7 @@ public abstract class ConcurrentFactoryMap<K,V> implements ConcurrentMap<K,V> {
@Override
public Iterator<K> iterator() {
return new Iterator<K>() {
Iterator<K> it = myDelegate.iterator();
final Iterator<K> it = myDelegate.iterator();
@Override
public boolean hasNext() {
return it.hasNext();
@@ -111,7 +111,7 @@ public class ChangesViewManager implements ChangesViewI, ProjectComponent, Persi
@NotNull private final PropertyChangeListener myGroupingChangeListener;
private MyChangeViewContent myContent;
private boolean myModelUpdateInProgress;
private MyTreeExpander myTreeExpander;
private final MyTreeExpander myTreeExpander;
@NotNull
public static ChangesViewI getInstance(@NotNull Project project) {
@@ -102,7 +102,7 @@ abstract class MultipleValueFilterPopupComponent<Filter extends VcsLogFilter> ex
protected class PredefinedValueAction extends DumbAwareAction {
@NotNull protected final List<String> myValues;
private boolean myAddToRecent;
private final boolean myAddToRecent;
public PredefinedValueAction(@NotNull String value) {
this(Collections.singletonList(value));
@@ -617,7 +617,7 @@ public class XDebuggerUtilImpl extends XDebuggerUtil {
XExecutionStack activeExecutionStack = suspendContext.getActiveExecutionStack();
if (activeExecutionStack != null) {
activeExecutionStack.computeStackFrames(0, new XStackFrameContainerEx() {
List<XStackFrame> myFrames = new ArrayList<>();
final List<XStackFrame> myFrames = new ArrayList<>();
@Override
public void addStackFrames(@NotNull List<? extends XStackFrame> stackFrames, boolean last) {
@@ -65,7 +65,7 @@ public class InheritanceUtil {
final Query<PsiClass> search = ClassInheritorsSearch.search(class1, scope, true);
final boolean[] result = new boolean[1];
search.forEach(new Processor<PsiClass>() {
AtomicInteger count = new AtomicInteger(0);
final AtomicInteger count = new AtomicInteger(0);
@Override
public boolean process(PsiClass inheritor) {
@@ -183,7 +183,7 @@ public class GitVFSListener extends VcsVFSListener {
@Override
protected void performDeletion(@NotNull final List<FilePath> filesToDelete) {
performBackgroundOperation(filesToDelete, GitBundle.getString("remove.removing"), new LongOperationPerRootExecutor() {
Set<File> filesToRefresh = newHashSet();
final Set<File> filesToRefresh = newHashSet();
@Override
public void execute(@NotNull VirtualFile root, @NotNull List<FilePath> files) throws VcsException {
@@ -22,7 +22,7 @@ import org.jetbrains.annotations.NotNull;
*/
@Deprecated
public class GithubAuthDataHolder {
@NotNull private GithubAuthData myAuthData;
@NotNull private final GithubAuthData myAuthData;
public GithubAuthDataHolder(@NotNull GithubAuthData auth) {
myAuthData = auth;
@@ -535,9 +535,9 @@ public class GradleProjectResolverUtil {
DataNode<? extends ExternalEntityData> depOwnerDataNode = null;
if (mergedDependency instanceof ExternalProjectDependency) {
class ProjectDependencyInfo {
@NotNull ModuleData myModuleData;
@Nullable ExternalSourceSet mySourceSet;
Collection<File> dependencyArtifacts;
@NotNull final ModuleData myModuleData;
@Nullable final ExternalSourceSet mySourceSet;
final Collection<File> dependencyArtifacts;
ProjectDependencyInfo(@NotNull ModuleData moduleData,
@Nullable ExternalSourceSet sourceSet,
@@ -547,11 +547,11 @@ public class FinallyProcessor {
Map<BasicBlock, Boolean> mapLast,
boolean skippedFirst) {
class BlockStackEntry {
public BasicBlock blockCatch;
public BasicBlock blockSample;
public final BasicBlock blockCatch;
public final BasicBlock blockSample;
// TODO: correct handling (merging) of multiple paths
public List<int[]> lstStoreVars;
public final List<int[]> lstStoreVars;
BlockStackEntry(BasicBlock blockCatch, BasicBlock blockSample, List<int[]> lstStoreVars) {
this.blockCatch = blockCatch;
@@ -16,7 +16,7 @@ public class IrreducibleCFGDeobfuscator {
public static boolean isStatementIrreducible(Statement statement) {
class Node {
public Integer id;
public final Integer id;
public final Set<Node> preds = new HashSet<>();
public final Set<Node> succs = new HashSet<>();
@@ -56,9 +56,9 @@ public class FlattenStatementsHelper {
private void flattenStatement() {
class StatementStackEntry {
public Statement statement;
public LinkedList<StackEntry> stackFinally;
public List<Exprent> tailExprents;
public final Statement statement;
public final LinkedList<StackEntry> stackFinally;
public final List<Exprent> tailExprents;
public int statementIndex;
public int edgeIndex;
@@ -21,7 +21,7 @@ import java.util.concurrent.atomic.AtomicInteger;
public class ExecutorManager {
private static final ExecutorService myExecutor = new ThreadPoolExecutor(3, Integer.MAX_VALUE, 30 * 60L, TimeUnit.SECONDS,
new SynchronousQueue<Runnable>(),new ThreadFactory() {
AtomicInteger num = new AtomicInteger();
final AtomicInteger num = new AtomicInteger();
@Override
public Thread newThread(Runnable r) {
return new Thread(r, "Maven Embedder "+num.getAndIncrement());
@@ -21,7 +21,7 @@ import java.util.concurrent.atomic.AtomicInteger;
public class ExecutorManager {
private static final ExecutorService myExecutor = new ThreadPoolExecutor(3, Integer.MAX_VALUE, 30 * 60L, TimeUnit.SECONDS,
new SynchronousQueue<Runnable>(),new ThreadFactory() {
AtomicInteger num = new AtomicInteger();
final AtomicInteger num = new AtomicInteger();
@Override
public Thread newThread(Runnable r) {
return new Thread(r, "Maven Embedder "+num.getAndIncrement());
@@ -248,7 +248,7 @@ public class IntroducePropertyAction extends BaseRefactoringAction {
@Override
public UsageSearcher create() {
return new UsageSearcher() {
Set<UsageInfo> usages = new HashSet<>();
final Set<UsageInfo> usages = new HashSet<>();
@Override
public void generate(@NotNull final Processor<Usage> processor) {
@@ -25,7 +25,7 @@ import java.util.Map;
public class MavenCompilerAnnotationProcessorPathsImporter extends MavenImporter {
private Logger LOG = Logger.getInstance("#org.jetbrains.idea.maven.importing.MavenCompilerAnnotationProcessorPathsImporter");
private final Logger LOG = Logger.getInstance("#org.jetbrains.idea.maven.importing.MavenCompilerAnnotationProcessorPathsImporter");
public MavenCompilerAnnotationProcessorPathsImporter() {
super("org.apache.maven.plugins", "maven-compiler-plugin");
@@ -68,7 +68,7 @@ public class BreadcrumbsXmlWrapper extends JComponent implements Disposable {
private boolean myUserCaretChange = true;
private final MergingUpdateQueue myQueue = new MergingUpdateQueue("Breadcrumbs.Queue", 200, true, breadcrumbs);
private List<BreadcrumbListener> myBreadcrumbListeners = new ArrayList<>();
private final List<BreadcrumbListener> myBreadcrumbListeners = new ArrayList<>();
private final Update myUpdate = new Update(this) {
@Override
@@ -15,7 +15,7 @@ import org.jetbrains.annotations.Nullable;
storages = @Storage("editor.xml")
)
public class WebEditorOptions implements PersistentStateComponent<WebEditorOptions> {
private boolean myShowCssColorPreviewInGutter = true;
private final boolean myShowCssColorPreviewInGutter = true;
private boolean mySelectWholeCssIdentifierOnDoubleClick = true;
private boolean myShowCssInlineColorPreview = false;
private boolean myAutomaticallyInsertClosingTag = true;