diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/RedundantSuppressInspectionBase.java b/java/java-analysis-impl/src/com/intellij/codeInspection/RedundantSuppressInspectionBase.java index 388e66022cce..7304094495c6 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/RedundantSuppressInspectionBase.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/RedundantSuppressInspectionBase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,10 +44,10 @@ import java.util.*; * @author cdr */ public class RedundantSuppressInspectionBase extends GlobalInspectionTool { - private BidirectionalMap myQuickFixes = null; + private BidirectionalMap myQuickFixes; private static final Logger LOG = Logger.getInstance("#com.intellij.codeInspection.RedundantSuppressInspection"); - public boolean IGNORE_ALL = false; + public boolean IGNORE_ALL; @Override @NotNull diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/StreamApiMigrationInspection.java b/java/java-analysis-impl/src/com/intellij/codeInspection/StreamApiMigrationInspection.java index 02d49d6cab9a..e868a10530a4 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/StreamApiMigrationInspection.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/StreamApiMigrationInspection.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,7 +51,7 @@ import java.util.List; public class StreamApiMigrationInspection extends BaseJavaBatchLocalInspectionTool { private static final Logger LOG = Logger.getInstance("#" + StreamApiMigrationInspection.class.getName()); - public boolean REPLACE_TRIVIAL_FOREACH = false; + public boolean REPLACE_TRIVIAL_FOREACH; @Nullable @Override diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/bytecodeAnalysis/Analysis.java b/java/java-analysis-impl/src/com/intellij/codeInspection/bytecodeAnalysis/Analysis.java index 90ae880310bd..f06b1bda7065 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/bytecodeAnalysis/Analysis.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/bytecodeAnalysis/Analysis.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,9 +26,12 @@ import org.jetbrains.org.objectweb.asm.tree.analysis.AnalyzerException; import org.jetbrains.org.objectweb.asm.tree.analysis.BasicValue; import org.jetbrains.org.objectweb.asm.tree.analysis.Frame; -import java.util.*; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; -import static com.intellij.codeInspection.bytecodeAnalysis.Direction.*; +import static com.intellij.codeInspection.bytecodeAnalysis.Direction.In; +import static com.intellij.codeInspection.bytecodeAnalysis.Direction.InOut; class AbstractValues { static final class ParamValue extends BasicValue { @@ -213,7 +216,7 @@ abstract class Analysis { final protected List[] computed; final Key aKey; - Res earlyResult = null; + Res earlyResult; protected Analysis(RichControlFlow richControlFlow, Direction direction, boolean stable) { this.richControlFlow = richControlFlow; diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/bytecodeAnalysis/Contracts.java b/java/java-analysis-impl/src/com/intellij/codeInspection/bytecodeAnalysis/Contracts.java index 9d71d4218939..08a529c5a098 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/bytecodeAnalysis/Contracts.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/bytecodeAnalysis/Contracts.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,8 +34,9 @@ import java.util.List; import java.util.Set; import static com.intellij.codeInspection.bytecodeAnalysis.AbstractValues.*; +import static com.intellij.codeInspection.bytecodeAnalysis.Direction.InOut; +import static com.intellij.codeInspection.bytecodeAnalysis.Direction.Out; import static org.jetbrains.org.objectweb.asm.Opcodes.*; -import static com.intellij.codeInspection.bytecodeAnalysis.Direction.*; class InOutAnalysis extends Analysis { @@ -47,8 +48,8 @@ class InOutAnalysis extends Analysis { private final Value inValue; private final int generalizeShift; private Result internalResult; - private int id = 0; - private int pendingTop = 0; + private int id; + private int pendingTop; protected InOutAnalysis(RichControlFlow richControlFlow, Direction direction, boolean[] resultOrigins, boolean stable, State[] pending) { super(richControlFlow, direction, stable); @@ -273,7 +274,7 @@ class InOutInterpreter extends BasicInterpreter { final boolean[] resultOrigins; final boolean nullAnalysis; - boolean deReferenced = false; + boolean deReferenced; InOutInterpreter(Direction direction, InsnList insns, boolean[] resultOrigins) { this.direction = direction; diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/bytecodeAnalysis/NullableMethodAnalysis.java b/java/java-analysis-impl/src/com/intellij/codeInspection/bytecodeAnalysis/NullableMethodAnalysis.java index 2e2924c044ed..b865a9a4af34 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/bytecodeAnalysis/NullableMethodAnalysis.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/bytecodeAnalysis/NullableMethodAnalysis.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -211,12 +211,12 @@ class NullableMethodInterpreter extends BasicInterpreter implements InterpreterE private final int[] originsMapping; final Key[] keys; - Constraint constraint = null; - int delta = 0; - int nullsDelta = 0; + Constraint constraint; + int delta; + int nullsDelta; int notNullInsn = -1; - int notNullCall = 0; - int notNullNull = 0; + int notNullCall; + int notNullNull; NullableMethodInterpreter(InsnList insns, boolean[] origins, int[] originsMapping) { this.insns = insns; diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/bytecodeAnalysis/Parameters.java b/java/java-analysis-impl/src/com/intellij/codeInspection/bytecodeAnalysis/Parameters.java index 52106534d8a7..ad52d2f8a7bb 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/bytecodeAnalysis/Parameters.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/bytecodeAnalysis/Parameters.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,9 +34,9 @@ import java.util.List; import java.util.Set; import static com.intellij.codeInspection.bytecodeAnalysis.AbstractValues.*; +import static com.intellij.codeInspection.bytecodeAnalysis.Direction.In; import static com.intellij.codeInspection.bytecodeAnalysis.PResults.*; import static org.jetbrains.org.objectweb.asm.Opcodes.*; -import static com.intellij.codeInspection.bytecodeAnalysis.Direction.*; abstract class PResults { // SoP = sum of products @@ -211,9 +211,9 @@ class NonNullInAnalysis extends Analysis { } } - private int id = 0; - private Frame nextFrame = null; - private PResult subResult = null; + private int id; + private Frame nextFrame; + private PResult subResult; @NotNull protected Equation analyze() throws AnalyzerException { @@ -383,7 +383,7 @@ class NonNullInAnalysis extends Analysis { } - private int pendingTop = 0; + private int pendingTop; private void pendingPush(PendingAction action) throws AnalyzerException { if (pendingTop >= STEPS_LIMIT) { @@ -437,11 +437,11 @@ class NullableInAnalysis extends Analysis { } } - private int id = 0; - private Frame nextFrame = null; + private int id; + private Frame nextFrame; private PResult myResult = Identity; private PResult subResult = Identity; - private boolean top = false; + private boolean top; @NotNull protected Equation analyze() throws AnalyzerException { @@ -573,7 +573,7 @@ class NullableInAnalysis extends Analysis { } - private int pendingTop = 0; + private int pendingTop; private void pendingPush(State state) throws AnalyzerException { if (pendingTop >= STEPS_LIMIT) { @@ -602,7 +602,7 @@ class NullableInAnalysis extends Analysis { } abstract class NullityInterpreter extends BasicInterpreter { - boolean top = false; + boolean top; final boolean nullableAnalysis; final int nullityMask; private PResult subResult = Identity; diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/bytecodeAnalysis/asm/LeakingParameters.java b/java/java-analysis-impl/src/com/intellij/codeInspection/bytecodeAnalysis/asm/LeakingParameters.java index 42ee796d4bcf..6b7ba379f769 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/bytecodeAnalysis/asm/LeakingParameters.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/bytecodeAnalysis/asm/LeakingParameters.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -299,8 +299,8 @@ class ParametersUsage extends Interpreter { class IParametersUsage extends Interpreter { static final IParamsValue val1 = new IParamsValue(0, 1); static final IParamsValue val2 = new IParamsValue(0, 2); - int leaking = 0; - int nullableLeaking = 0; + int leaking; + int nullableLeaking; int called = -1; final int rangeStart; final int rangeEnd; diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/canBeFinal/CanBeFinalInspection.java b/java/java-analysis-impl/src/com/intellij/codeInspection/canBeFinal/CanBeFinalInspection.java index 3582ce1a293c..9ca3844e0987 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/canBeFinal/CanBeFinalInspection.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/canBeFinal/CanBeFinalInspection.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,8 +47,8 @@ import java.awt.*; public class CanBeFinalInspection extends GlobalJavaBatchInspectionTool { private static final Logger LOG = Logger.getInstance("#com.intellij.codeInspection.canBeFinal.CanBeFinalInspection"); - public boolean REPORT_CLASSES = false; - public boolean REPORT_METHODS = false; + public boolean REPORT_CLASSES; + public boolean REPORT_METHODS; public boolean REPORT_FIELDS = true; public static final String DISPLAY_NAME = InspectionsBundle.message("inspection.can.be.final.display.name"); @NonNls public static final String SHORT_NAME = "CanBeFinal"; diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/DataFlowInspectionBase.java b/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/DataFlowInspectionBase.java index add2fbeced8d..231fbebfbc53 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/DataFlowInspectionBase.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/DataFlowInspectionBase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -63,10 +63,10 @@ import java.util.*; public class DataFlowInspectionBase extends BaseJavaBatchLocalInspectionTool { private static final Logger LOG = Logger.getInstance("#com.intellij.codeInspection.dataFlow.DataFlowInspection"); @NonNls private static final String SHORT_NAME = "ConstantConditions"; - public boolean SUGGEST_NULLABLE_ANNOTATIONS = false; - public boolean DONT_REPORT_TRUE_ASSERT_STATEMENTS = false; - public boolean TREAT_UNKNOWN_MEMBERS_AS_NULLABLE = false; - public boolean IGNORE_ASSERT_STATEMENTS = false; + public boolean SUGGEST_NULLABLE_ANNOTATIONS; + public boolean DONT_REPORT_TRUE_ASSERT_STATEMENTS; + public boolean TREAT_UNKNOWN_MEMBERS_AS_NULLABLE; + public boolean IGNORE_ASSERT_STATEMENTS; public boolean REPORT_CONSTANT_REFERENCE_VALUES = true; @Override diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationInspectionBase.java b/java/java-analysis-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationInspectionBase.java index c253cb159aa8..47fb7a64bca7 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationInspectionBase.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationInspectionBase.java @@ -77,7 +77,7 @@ public class UnusedDeclarationInspectionBase extends GlobalInspectionTool { final List myExtensions = ContainerUtil.createLockFreeCopyOnWriteList(); final UnusedSymbolLocalInspectionBase myLocalInspectionBase = createUnusedSymbolLocalInspection(); - private Set myProcessedSuspicious = null; + private Set myProcessedSuspicious; private int myPhase; private GlobalInspectionContext myContext; private final boolean myEnabledInEditor; diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/defUse/DefUseInspectionBase.java b/java/java-analysis-impl/src/com/intellij/codeInspection/defUse/DefUseInspectionBase.java index f3880bfef990..d7ef822d828f 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/defUse/DefUseInspectionBase.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/defUse/DefUseInspectionBase.java @@ -34,7 +34,7 @@ import java.util.*; import java.util.List; public class DefUseInspectionBase extends BaseJavaBatchLocalInspectionTool { - public boolean REPORT_PREFIX_EXPRESSIONS = false; + public boolean REPORT_PREFIX_EXPRESSIONS; public boolean REPORT_POSTFIX_EXPRESSIONS = true; public boolean REPORT_REDUNDANT_INITIALIZER = true; diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/deprecation/DeprecationInspection.java b/java/java-analysis-impl/src/com/intellij/codeInspection/deprecation/DeprecationInspection.java index b02c02657532..081053a6ed53 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/deprecation/DeprecationInspection.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/deprecation/DeprecationInspection.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,7 +44,7 @@ public class DeprecationInspection extends BaseJavaBatchLocalInspectionTool { public static final String DISPLAY_NAME = DeprecationUtil.DEPRECATION_DISPLAY_NAME; public static final String IGNORE_METHODS_OF_DEPRECATED_NAME = "IGNORE_METHODS_OF_DEPRECATED"; - public boolean IGNORE_INSIDE_DEPRECATED = false; + public boolean IGNORE_INSIDE_DEPRECATED; public boolean IGNORE_ABSTRACT_DEPRECATED_OVERRIDES = true; public boolean IGNORE_IMPORT_STATEMENTS = true; public boolean IGNORE_METHODS_OF_DEPRECATED = true; diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/duplicateThrows/DuplicateThrowsInspection.java b/java/java-analysis-impl/src/com/intellij/codeInspection/duplicateThrows/DuplicateThrowsInspection.java index c49057015244..5a8665a534c8 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/duplicateThrows/DuplicateThrowsInspection.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/duplicateThrows/DuplicateThrowsInspection.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ import javax.swing.*; public class DuplicateThrowsInspection extends BaseJavaBatchLocalInspectionTool implements CleanupLocalInspectionTool { @SuppressWarnings("PublicField") - public boolean ignoreSubclassing = false; + public boolean ignoreSubclassing; @Override @NotNull diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/ex/EntryPointsManagerBase.java b/java/java-analysis-impl/src/com/intellij/codeInspection/ex/EntryPointsManagerBase.java index ab23d803aa57..1a5e464551eb 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/ex/EntryPointsManagerBase.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/ex/EntryPointsManagerBase.java @@ -77,7 +77,7 @@ public abstract class EntryPointsManagerBase extends EntryPointsManager implemen @NonNls private static final String VERSION_ATTR = "version"; @NonNls private static final String ENTRY_POINT_ATTR = "entry_point"; private boolean myAddNonJavaEntries = true; - private boolean myResolved = false; + private boolean myResolved; protected final Project myProject; private long myLastModificationCount = -1; diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/inheritance/search/InheritorsStatisticalDataSearch.java b/java/java-analysis-impl/src/com/intellij/codeInspection/inheritance/search/InheritorsStatisticalDataSearch.java index 4266b66cb6ed..c28ccc2d6096 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/inheritance/search/InheritorsStatisticalDataSearch.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/inheritance/search/InheritorsStatisticalDataSearch.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -118,7 +118,7 @@ public class InheritorsStatisticalDataSearch { myAllNotAnonymousInheritors = new HashSet(); } - private int myAnonymousInheritorsCount = 0; + private int myAnonymousInheritorsCount; private Set getAllNotAnonymousInheritors() { return myAllNotAnonymousInheritors; diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/java15api/Java15APIUsageInspectionBase.java b/java/java-analysis-impl/src/com/intellij/codeInspection/java15api/Java15APIUsageInspectionBase.java index ab764a1f518e..a95ad064e8bf 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/java15api/Java15APIUsageInspectionBase.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/java15api/Java15APIUsageInspectionBase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -98,7 +98,7 @@ public class Java15APIUsageInspectionBase extends BaseJavaBatchLocalInspectionTo ourDefaultMethods.add("java.util.Iterator#remove()"); } - protected LanguageLevel myEffectiveLanguageLevel = null; + protected LanguageLevel myEffectiveLanguageLevel; @Nullable private static Set getForbiddenApi(@NotNull LanguageLevel languageLevel) { diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/javaDoc/JavaDocLocalInspectionBase.java b/java/java-analysis-impl/src/com/intellij/codeInspection/javaDoc/JavaDocLocalInspectionBase.java index b263fc278ffe..04167ce144a4 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/javaDoc/JavaDocLocalInspectionBase.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/javaDoc/JavaDocLocalInspectionBase.java @@ -78,17 +78,17 @@ public class JavaDocLocalInspectionBase extends BaseJavaBatchLocalInspectionTool public Options INNER_CLASS_OPTIONS = new Options("none", ""); public Options METHOD_OPTIONS = new Options("none", "@return@param@throws or @exception"); public Options FIELD_OPTIONS = new Options("none", ""); - public boolean IGNORE_DEPRECATED = false; + public boolean IGNORE_DEPRECATED; public boolean IGNORE_JAVADOC_PERIOD = true; @SuppressWarnings("unused") @Deprecated - public boolean IGNORE_DUPLICATED_THROWS = false; - public boolean IGNORE_POINT_TO_ITSELF = false; + public boolean IGNORE_DUPLICATED_THROWS; + public boolean IGNORE_POINT_TO_ITSELF; public String myAdditionalJavadocTags = ""; private boolean myIgnoreDuplicatedThrows = true; - private boolean myIgnoreEmptyDescriptions = false; - private boolean myIgnoreSimpleAccessors = false; + private boolean myIgnoreEmptyDescriptions; + private boolean myIgnoreSimpleAccessors; public void setPackageOption(String modifier, String tags) { PACKAGE_OPTIONS.ACCESS_JAVADOC_REQUIRED_FOR = modifier; @@ -451,7 +451,7 @@ public class JavaDocLocalInspectionBase extends BaseJavaBatchLocalInspectionTool private class ProblemHolderImpl implements JavadocHighlightUtil.ProblemHolder { private final InspectionManager myManager; private final boolean myOnTheFly; - private List myProblems = null; + private List myProblems; private ProblemHolderImpl(InspectionManager manager, boolean onTheFly) { myManager = manager; diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/nullable/NullableStuffInspectionBase.java b/java/java-analysis-impl/src/com/intellij/codeInspection/nullable/NullableStuffInspectionBase.java index 229979ca347d..44a28e2c7062 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/nullable/NullableStuffInspectionBase.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/nullable/NullableStuffInspectionBase.java @@ -52,9 +52,9 @@ public class NullableStuffInspectionBase extends BaseJavaBatchLocalInspectionToo @SuppressWarnings({"WeakerAccess"}) public boolean REPORT_NOTNULL_PARAMETER_OVERRIDES_NULLABLE = true; @Deprecated @SuppressWarnings({"WeakerAccess"}) public boolean REPORT_NOT_ANNOTATED_PARAMETER_OVERRIDES_NOTNULL = true; @SuppressWarnings({"WeakerAccess"}) public boolean REPORT_NOT_ANNOTATED_GETTER = true; - @SuppressWarnings({"WeakerAccess"}) public boolean IGNORE_EXTERNAL_SUPER_NOTNULL = false; + @SuppressWarnings({"WeakerAccess"}) public boolean IGNORE_EXTERNAL_SUPER_NOTNULL; @SuppressWarnings({"WeakerAccess"}) public boolean REQUIRE_NOTNULL_FIELDS_INITIALIZED = true; - @SuppressWarnings({"WeakerAccess"}) public boolean REPORT_NOTNULL_PARAMETERS_OVERRIDES_NOT_ANNOTATED = false; + @SuppressWarnings({"WeakerAccess"}) public boolean REPORT_NOTNULL_PARAMETERS_OVERRIDES_NOT_ANNOTATED; @Deprecated @SuppressWarnings({"WeakerAccess"}) public boolean REPORT_NOT_ANNOTATED_SETTER_PARAMETER = true; @Deprecated @SuppressWarnings({"WeakerAccess"}) public boolean REPORT_ANNOTATION_NOT_PROPAGATED_TO_OVERRIDERS = true; // remains for test @SuppressWarnings({"WeakerAccess"}) public boolean REPORT_NULLS_PASSED_TO_NON_ANNOTATED_METHOD = true; diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/redundantCast/RedundantCastInspection.java b/java/java-analysis-impl/src/com/intellij/codeInspection/redundantCast/RedundantCastInspection.java index 930485558c20..2e4e80599c1b 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/redundantCast/RedundantCastInspection.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/redundantCast/RedundantCastInspection.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,8 +46,8 @@ public class RedundantCastInspection extends GenericsInspectionToolBase { private static final String DISPLAY_NAME = InspectionsBundle.message("inspection.redundant.cast.display.name"); @NonNls private static final String SHORT_NAME = "RedundantCast"; - public boolean IGNORE_ANNOTATED_METHODS = false; - public boolean IGNORE_SUSPICIOUS_METHOD_CALLS = false; + public boolean IGNORE_ANNOTATED_METHODS; + public boolean IGNORE_SUSPICIOUS_METHOD_CALLS; public RedundantCastInspection() { diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/uncheckedWarnings/UncheckedWarningLocalInspectionBase.java b/java/java-analysis-impl/src/com/intellij/codeInspection/uncheckedWarnings/UncheckedWarningLocalInspectionBase.java index accdc0b2b17b..b938eef5f260 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/uncheckedWarnings/UncheckedWarningLocalInspectionBase.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/uncheckedWarnings/UncheckedWarningLocalInspectionBase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,11 +50,11 @@ public class UncheckedWarningLocalInspectionBase extends BaseJavaBatchLocalInspe public static final String DISPLAY_NAME = InspectionsBundle.message("unchecked.warning"); @NonNls private static final String ID = "unchecked"; private static final Logger LOG = Logger.getInstance("#" + UncheckedWarningLocalInspectionBase.class); - public boolean IGNORE_UNCHECKED_ASSIGNMENT = false; - public boolean IGNORE_UNCHECKED_GENERICS_ARRAY_CREATION = false; - public boolean IGNORE_UNCHECKED_CALL = false; - public boolean IGNORE_UNCHECKED_CAST = false; - public boolean IGNORE_UNCHECKED_OVERRIDING = false; + public boolean IGNORE_UNCHECKED_ASSIGNMENT; + public boolean IGNORE_UNCHECKED_GENERICS_ARRAY_CREATION; + public boolean IGNORE_UNCHECKED_CALL; + public boolean IGNORE_UNCHECKED_CAST; + public boolean IGNORE_UNCHECKED_OVERRIDING; protected static JCheckBox createSetting(final String cbText, final boolean option, diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/visibility/VisibilityInspection.java b/java/java-analysis-impl/src/com/intellij/codeInspection/visibility/VisibilityInspection.java index e4d3b33a5cfc..6fb30d7070d5 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/visibility/VisibilityInspection.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/visibility/VisibilityInspection.java @@ -59,7 +59,7 @@ public class VisibilityInspection extends GlobalJavaBatchInspectionTool { private static final Logger LOG = Logger.getInstance("#com.intellij.codeInspection.visibility.VisibilityInspection"); public boolean SUGGEST_PACKAGE_LOCAL_FOR_MEMBERS = true; public boolean SUGGEST_PACKAGE_LOCAL_FOR_TOP_CLASSES = true; - public boolean SUGGEST_PRIVATE_FOR_INNERS = false; + public boolean SUGGEST_PRIVATE_FOR_INNERS; private static final String DISPLAY_NAME = InspectionsBundle.message("inspection.visibility.display.name"); @NonNls public static final String SHORT_NAME = "WeakerAccess"; private static final String CAN_BE_PRIVATE = InspectionsBundle.message("inspection.visibility.compose.suggestion", VisibilityUtil.toPresentableText(PsiModifier.PRIVATE)); diff --git a/java/java-analysis-impl/src/com/intellij/find/findUsages/JavaClassFindUsagesOptions.java b/java/java-analysis-impl/src/com/intellij/find/findUsages/JavaClassFindUsagesOptions.java index 4339d36ffb38..a36824cebe36 100644 --- a/java/java-analysis-impl/src/com/intellij/find/findUsages/JavaClassFindUsagesOptions.java +++ b/java/java-analysis-impl/src/com/intellij/find/findUsages/JavaClassFindUsagesOptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,13 +26,13 @@ import java.util.LinkedHashSet; * @author peter */ public class JavaClassFindUsagesOptions extends JavaFindUsagesOptions { - public boolean isMethodsUsages = false; - public boolean isFieldsUsages = false; - public boolean isDerivedClasses = false; - public boolean isImplementingClasses = false; - public boolean isDerivedInterfaces = false; + public boolean isMethodsUsages; + public boolean isFieldsUsages; + public boolean isDerivedClasses; + public boolean isImplementingClasses; + public boolean isDerivedInterfaces; public boolean isCheckDeepInheritance = true; - public boolean isIncludeInherited = false; + public boolean isIncludeInherited; public JavaClassFindUsagesOptions(@NotNull Project project) { super(project); diff --git a/java/java-analysis-impl/src/com/intellij/find/findUsages/JavaFindUsagesOptions.java b/java/java-analysis-impl/src/com/intellij/find/findUsages/JavaFindUsagesOptions.java index 60b650ce293a..a990879fafff 100644 --- a/java/java-analysis-impl/src/com/intellij/find/findUsages/JavaFindUsagesOptions.java +++ b/java/java-analysis-impl/src/com/intellij/find/findUsages/JavaFindUsagesOptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ import java.util.LinkedHashSet; * @author peter */ public abstract class JavaFindUsagesOptions extends FindUsagesOptions { - public boolean isSkipImportStatements = false; + public boolean isSkipImportStatements; public JavaFindUsagesOptions(@NotNull Project project) { super(project); diff --git a/java/java-analysis-impl/src/com/intellij/find/findUsages/JavaMethodFindUsagesOptions.java b/java/java-analysis-impl/src/com/intellij/find/findUsages/JavaMethodFindUsagesOptions.java index ab39b82d109f..87970138d70a 100644 --- a/java/java-analysis-impl/src/com/intellij/find/findUsages/JavaMethodFindUsagesOptions.java +++ b/java/java-analysis-impl/src/com/intellij/find/findUsages/JavaMethodFindUsagesOptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,11 +26,11 @@ import java.util.LinkedHashSet; * @author peter */ public class JavaMethodFindUsagesOptions extends JavaFindUsagesOptions { - public boolean isOverridingMethods = false; - public boolean isImplementingMethods = false; + public boolean isOverridingMethods; + public boolean isImplementingMethods; public boolean isCheckDeepInheritance = true; - public boolean isIncludeInherited = false; - public boolean isIncludeOverloadUsages = false; + public boolean isIncludeInherited; + public boolean isIncludeOverloadUsages; public JavaMethodFindUsagesOptions(@NotNull Project project) { super(project); diff --git a/java/java-analysis-impl/src/com/intellij/find/findUsages/JavaPackageFindUsagesOptions.java b/java/java-analysis-impl/src/com/intellij/find/findUsages/JavaPackageFindUsagesOptions.java index 93cc0db69e9e..081284123e7d 100644 --- a/java/java-analysis-impl/src/com/intellij/find/findUsages/JavaPackageFindUsagesOptions.java +++ b/java/java-analysis-impl/src/com/intellij/find/findUsages/JavaPackageFindUsagesOptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,9 +26,9 @@ import java.util.LinkedHashSet; * @author peter */ public class JavaPackageFindUsagesOptions extends JavaFindUsagesOptions { - public boolean isClassesUsages = false; + public boolean isClassesUsages; public boolean isIncludeSubpackages = true; - public boolean isSkipPackageStatements = false; + public boolean isSkipPackageStatements; public JavaPackageFindUsagesOptions(@NotNull Project project) { super(project); diff --git a/java/java-analysis-impl/src/com/intellij/refactoring/extractMethod/InputVariables.java b/java/java-analysis-impl/src/com/intellij/refactoring/extractMethod/InputVariables.java index ad9897ae8c31..ccab96611fcf 100644 --- a/java/java-analysis-impl/src/com/intellij/refactoring/extractMethod/InputVariables.java +++ b/java/java-analysis-impl/src/com/intellij/refactoring/extractMethod/InputVariables.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,8 +48,8 @@ public class InputVariables { private ParametersFolder myFolding; private boolean myFoldingAvailable; - private Set myUsedInstanceFields = null; - private boolean myPassFields = false; + private Set myUsedInstanceFields; + private boolean myPassFields; public InputVariables(final List inputVariables, Project project, diff --git a/java/java-analysis-impl/src/com/intellij/refactoring/extractMethod/ParametersFolder.java b/java/java-analysis-impl/src/com/intellij/refactoring/extractMethod/ParametersFolder.java index b7e0e48f8c4b..3cf591b9d34a 100644 --- a/java/java-analysis-impl/src/com/intellij/refactoring/extractMethod/ParametersFolder.java +++ b/java/java-analysis-impl/src/com/intellij/refactoring/extractMethod/ParametersFolder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,7 +44,7 @@ public class ParametersFolder { private final Set myUsedNames = new HashSet(); private final Set myDeleted = new HashSet(); - private boolean myFoldingSelectedByDefault = false; + private boolean myFoldingSelectedByDefault; public void clear() { diff --git a/java/java-analysis-impl/src/com/intellij/refactoring/util/duplicates/DuplicatesFinder.java b/java/java-analysis-impl/src/com/intellij/refactoring/util/duplicates/DuplicatesFinder.java index c34982debacf..99d7bdeb25fa 100644 --- a/java/java-analysis-impl/src/com/intellij/refactoring/util/duplicates/DuplicatesFinder.java +++ b/java/java-analysis-impl/src/com/intellij/refactoring/util/duplicates/DuplicatesFinder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,7 +46,7 @@ public class DuplicatesFinder { private final InputVariables myParameters; private final List myOutputParameters; private final List myPatternAsList; - private boolean myMultipleExitPoints = false; + private boolean myMultipleExitPoints; @Nullable private final ReturnValue myReturnValue; public DuplicatesFinder(PsiElement[] pattern, diff --git a/java/java-analysis-impl/src/com/intellij/refactoring/util/duplicates/Match.java b/java/java-analysis-impl/src/com/intellij/refactoring/util/duplicates/Match.java index 10a3238ae7b6..5d3cb6f9f802 100644 --- a/java/java-analysis-impl/src/com/intellij/refactoring/util/duplicates/Match.java +++ b/java/java-analysis-impl/src/com/intellij/refactoring/util/duplicates/Match.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,8 +51,8 @@ public final class Match { private final Map> myParameterValues = new HashMap>(); private final Map> myParameterOccurrences = new HashMap>(); private final Map myDeclarationCorrespondence = new HashMap(); - private ReturnValue myReturnValue = null; - private Ref myInstanceExpression = null; + private ReturnValue myReturnValue; + private Ref myInstanceExpression; final Map myChangedParams = new HashMap(); private final boolean myIgnoreParameterTypes; diff --git a/java/java-analysis-impl/src/org/jetbrains/java/generate/config/Config.java b/java/java-analysis-impl/src/org/jetbrains/java/generate/config/Config.java index 95b93d9f9028..a10e0d59fdba 100644 --- a/java/java-analysis-impl/src/org/jetbrains/java/generate/config/Config.java +++ b/java/java-analysis-impl/src/org/jetbrains/java/generate/config/Config.java @@ -21,24 +21,24 @@ package org.jetbrains.java.generate.config; */ public class Config { - public boolean useFullyQualifiedName = false; + public boolean useFullyQualifiedName; public InsertWhere insertNewMethodOption = InsertWhere.AT_CARET; public DuplicationPolicy whenDuplicatesOption = DuplicationPolicy.ASK; public boolean filterConstantField = true; - public boolean filterEnumField = false; - public boolean filterTransientModifier = false; + public boolean filterEnumField; + public boolean filterTransientModifier; public boolean filterStaticModifier = true; - public String filterFieldName = null; - public String filterMethodName = null; - public String filterMethodType = null; - public String filterFieldType = null; + public String filterFieldName; + public String filterMethodName; + public String filterMethodType; + public String filterFieldType; public boolean filterLoggers = true; - public boolean addImplementSerializable = false; - public boolean enableMethods = false; + public boolean addImplementSerializable; + public boolean enableMethods; public boolean jumpToMethod = true; // jump cursor to toString method - public int sortElements = 0; // 0 = none, 1 = asc, 2 = desc + public int sortElements; // 0 = none, 1 = asc, 2 = desc - private FilterPattern myPattern = null; + private FilterPattern myPattern; public boolean isUseFullyQualifiedName() { return useFullyQualifiedName; diff --git a/java/java-analysis-impl/src/org/jetbrains/java/generate/config/FilterPattern.java b/java/java-analysis-impl/src/org/jetbrains/java/generate/config/FilterPattern.java index e56ac4f3d0ee..c91c6abba820 100644 --- a/java/java-analysis-impl/src/org/jetbrains/java/generate/config/FilterPattern.java +++ b/java/java-analysis-impl/src/org/jetbrains/java/generate/config/FilterPattern.java @@ -51,10 +51,10 @@ public class FilterPattern { private boolean transientModifier; private boolean enumField; private boolean loggers; - private Pattern methodNamePattern = null; - private Pattern methodTypePattern = null; - private Pattern fieldNamePattern = null; - private Pattern fieldTypePattern = null; + private Pattern methodNamePattern; + private Pattern methodTypePattern; + private Pattern fieldNamePattern; + private Pattern fieldTypePattern; public boolean fieldMatches(PsiField field) { if (isConstantField() && PsiAdapter.isConstantField(field)) { diff --git a/java/java-analysis-impl/src/org/jetbrains/java/generate/inspection/ClassHasNoToStringMethodInspection.java b/java/java-analysis-impl/src/org/jetbrains/java/generate/inspection/ClassHasNoToStringMethodInspection.java index a5359d5a1392..3100c9fca2bb 100644 --- a/java/java-analysis-impl/src/org/jetbrains/java/generate/inspection/ClassHasNoToStringMethodInspection.java +++ b/java/java-analysis-impl/src/org/jetbrains/java/generate/inspection/ClassHasNoToStringMethodInspection.java @@ -53,13 +53,13 @@ public class ClassHasNoToStringMethodInspection extends AbstractToStringInspecti /** User options for excluded deprecated classes */ public boolean excludeDeprecated = true; // must be public for JDOMSerialization /** User options for excluded enum classes */ - public boolean excludeEnum = false; // must be public for JDOMSerialization + public boolean excludeEnum; // must be public for JDOMSerialization /** User options for excluded abstract classes */ - public boolean excludeAbstract = false; // must be public for JDOMSerialization + public boolean excludeAbstract; // must be public for JDOMSerialization - public boolean excludeTestCode = false; + public boolean excludeTestCode; - public boolean excludeInnerClasses = false; + public boolean excludeInnerClasses; public ClassHasNoToStringMethodInspection() { try { diff --git a/java/java-impl/src/com/intellij/codeEditor/printing/HyperlinksToClassesOption.java b/java/java-impl/src/com/intellij/codeEditor/printing/HyperlinksToClassesOption.java index 3326e97fe2f6..7a22d4754c94 100644 --- a/java/java-impl/src/com/intellij/codeEditor/printing/HyperlinksToClassesOption.java +++ b/java/java-impl/src/com/intellij/codeEditor/printing/HyperlinksToClassesOption.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,7 +34,7 @@ import java.util.TreeMap; public class HyperlinksToClassesOption extends PrintOption { private JCheckBox myCbGenerateHyperlinksToClasses; - private boolean isGenerateHyperlinksToClasses = false; + private boolean isGenerateHyperlinksToClasses; @Nullable public TreeMap collectReferences(PsiFile psiFile, Map filesMap) { diff --git a/java/java-impl/src/com/intellij/codeInsight/completion/AllClassesGetter.java b/java/java-impl/src/com/intellij/codeInsight/completion/AllClassesGetter.java index 2a87f9fc8e29..99247cfd287f 100644 --- a/java/java-impl/src/com/intellij/codeInsight/completion/AllClassesGetter.java +++ b/java/java-impl/src/com/intellij/codeInsight/completion/AllClassesGetter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -154,7 +154,7 @@ public class AllClassesGetter { int limit = Registry.intValue("ide.completion.variant.limit"); Processor processor = new Processor() { - int count = 0; + int count; final Set qNames = new THashSet(); final boolean pkgContext = JavaCompletionUtil.inSomePackage(context); final String packagePrefix = getPackagePrefix(context, parameters.getOffset()); diff --git a/java/java-impl/src/com/intellij/codeInsight/completion/MemberLookupHelper.java b/java/java-impl/src/com/intellij/codeInsight/completion/MemberLookupHelper.java index f665920528d2..6589f4a815e3 100644 --- a/java/java-impl/src/com/intellij/codeInsight/completion/MemberLookupHelper.java +++ b/java/java-impl/src/com/intellij/codeInsight/completion/MemberLookupHelper.java @@ -1,3 +1,18 @@ +/* + * Copyright 2000-2016 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.intellij.codeInsight.completion; import com.intellij.codeInsight.lookup.LookupElementPresentation; @@ -16,7 +31,7 @@ public class MemberLookupHelper { private final PsiMember myMember; private final boolean myMergedOverloads; @Nullable private final PsiClass myContainingClass; - private boolean myShouldImport = false; + private boolean myShouldImport; public MemberLookupHelper(List overloads, PsiClass containingClass, boolean shouldImport) { this(overloads.get(0), containingClass, shouldImport, true); diff --git a/java/java-impl/src/com/intellij/codeInsight/completion/StaticMemberProcessor.java b/java/java-impl/src/com/intellij/codeInsight/completion/StaticMemberProcessor.java index e79fe27ac5c2..5a152a7c6eaf 100644 --- a/java/java-impl/src/com/intellij/codeInsight/completion/StaticMemberProcessor.java +++ b/java/java-impl/src/com/intellij/codeInsight/completion/StaticMemberProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,10 @@ import gnu.trove.THashSet; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Set; /** * @author peter @@ -40,7 +43,7 @@ public abstract class StaticMemberProcessor { private final PsiElement myPosition; private final Project myProject; private final PsiResolveHelper myResolveHelper; - private boolean myHintShown = false; + private boolean myHintShown; private final boolean myPackagedContext; public StaticMemberProcessor(final PsiElement position) { diff --git a/java/java-impl/src/com/intellij/codeInsight/completion/scope/JavaCompletionProcessor.java b/java/java-impl/src/com/intellij/codeInsight/completion/scope/JavaCompletionProcessor.java index 152f82650739..6a681fd182d2 100644 --- a/java/java-impl/src/com/intellij/codeInsight/completion/scope/JavaCompletionProcessor.java +++ b/java/java-impl/src/com/intellij/codeInsight/completion/scope/JavaCompletionProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,8 +50,8 @@ import java.util.Set; public class JavaCompletionProcessor extends BaseScopeProcessor implements ElementClassHint { private final boolean myInJavaDoc; - private boolean myStatic = false; - private PsiElement myDeclarationHolder = null; + private boolean myStatic; + private PsiElement myDeclarationHolder; private final Map myResults = new LinkedHashMap<>(); private final Set mySecondRateResults = ContainerUtil.newIdentityTroveSet(); private final Set myShadowedNames = ContainerUtil.newHashSet(); @@ -60,10 +60,10 @@ public class JavaCompletionProcessor extends BaseScopeProcessor implements Eleme private final PsiElement myElement; private final PsiElement myScope; private final ElementFilter myFilter; - private boolean myMembersFlag = false; - private boolean myQualified = false; - private PsiType myQualifierType = null; - private PsiClass myQualifierClass = null; + private boolean myMembersFlag; + private boolean myQualified; + private PsiType myQualifierType; + private PsiClass myQualifierClass; private final Condition myMatcher; private final Options myOptions; private final boolean myAllowStaticWithInstanceQualifier; diff --git a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/AddMethodQualifierFix.java b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/AddMethodQualifierFix.java index 1c6fd53e460f..ce0ee8fefe91 100644 --- a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/AddMethodQualifierFix.java +++ b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/AddMethodQualifierFix.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,6 @@ import com.intellij.openapi.ui.popup.util.BaseListPopupStep; import com.intellij.psi.*; import com.intellij.ui.popup.list.ListPopupImpl; import com.intellij.util.IncorrectOperationException; -import com.intellij.util.ObjectUtils; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.TestOnly; @@ -42,7 +41,7 @@ public class AddMethodQualifierFix implements IntentionAction { private static final boolean UNIT_TEST_MODE = ApplicationManager.getApplication().isUnitTestMode(); private final SmartPsiElementPointer myMethodCall; - private List myCandidates = null; + private List myCandidates; public AddMethodQualifierFix(final PsiMethodCallExpression methodCallExpression) { myMethodCall = SmartPointerManager.getInstance(methodCallExpression.getProject()).createSmartPsiElementPointer(methodCallExpression); diff --git a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/RenameWrongRefFix.java b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/RenameWrongRefFix.java index 82cca2862eac..c6ecd4b31013 100644 --- a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/RenameWrongRefFix.java +++ b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/RenameWrongRefFix.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -102,7 +102,7 @@ public class RenameWrongRefFix implements IntentionAction { class MyScopeProcessor extends BaseScopeProcessor { ArrayList myResult = new ArrayList(); boolean myFilterMethods; - boolean myFilterStatics = false; + boolean myFilterStatics; MyScopeProcessor(PsiReferenceExpression refExpression) { myFilterMethods = refExpression.getParent() instanceof PsiMethodCallExpression; diff --git a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/SurroundWithTryCatchFix.java b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/SurroundWithTryCatchFix.java index b0264dc22c52..5a48b1abb2c9 100644 --- a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/SurroundWithTryCatchFix.java +++ b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/SurroundWithTryCatchFix.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,7 +39,7 @@ import org.jetbrains.annotations.NotNull; public class SurroundWithTryCatchFix implements IntentionAction { private static final Logger LOG = Logger.getInstance("#com.intellij.codeInsight.daemon.impl.quickfix.SurroundWithTryCatchFix"); - private PsiElement myStatement = null; + private PsiElement myStatement; public SurroundWithTryCatchFix(@NotNull PsiElement element) { final PsiFunctionalExpression functionalExpression = PsiTreeUtil.getParentOfType(element, PsiFunctionalExpression.class, false, PsiStatement.class); diff --git a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/SwitchStatementBranch.java b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/SwitchStatementBranch.java index f361a95e1cf7..cc7602917cc8 100644 --- a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/SwitchStatementBranch.java +++ b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/SwitchStatementBranch.java @@ -30,8 +30,8 @@ class SwitchStatementBranch { new ArrayList(5); private final List m_pendingWhiteSpace = new ArrayList(2); - private boolean m_default = false; - private boolean m_hasStatements = false; + private boolean m_default; + private boolean m_hasStatements; public void addCaseValue(String labelString) { m_caseValues.add(labelString); diff --git a/java/java-impl/src/com/intellij/codeInsight/editorActions/AutoFormatTypedHandler.java b/java/java-impl/src/com/intellij/codeInsight/editorActions/AutoFormatTypedHandler.java index 0e2a3de30933..2a7c9f38283d 100644 --- a/java/java-impl/src/com/intellij/codeInsight/editorActions/AutoFormatTypedHandler.java +++ b/java/java-impl/src/com/intellij/codeInsight/editorActions/AutoFormatTypedHandler.java @@ -45,7 +45,7 @@ import org.jetbrains.annotations.TestOnly; import java.util.List; public class AutoFormatTypedHandler extends TypedActionHandlerBase { - private static boolean myIsEnabledInTests = false; + private static boolean myIsEnabledInTests; private static char[] NO_SPACE_AFTER = { '+', '-', '*', '/', '%', '&', '^', '|', '<', '>', '!', '=', ' ' diff --git a/java/java-impl/src/com/intellij/codeInsight/editorActions/moveUpDown/DeclarationMover.java b/java/java-impl/src/com/intellij/codeInsight/editorActions/moveUpDown/DeclarationMover.java index 3b56a946e281..4d2d0e5c56b4 100644 --- a/java/java-impl/src/com/intellij/codeInsight/editorActions/moveUpDown/DeclarationMover.java +++ b/java/java-impl/src/com/intellij/codeInsight/editorActions/moveUpDown/DeclarationMover.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,7 +38,7 @@ import java.util.List; class DeclarationMover extends LineMover { private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.editor.actions.moveUpDown.DeclarationMover"); private PsiEnumConstant myEnumToInsertSemicolonAfter; - private boolean moveEnumConstant = false; + private boolean moveEnumConstant; @Override public void beforeMove(@NotNull final Editor editor, @NotNull final MoveInfo info, final boolean down) { diff --git a/java/java-impl/src/com/intellij/codeInsight/generation/GenerateDelegateHandler.java b/java/java-impl/src/com/intellij/codeInsight/generation/GenerateDelegateHandler.java index 6028ec3d564c..30071b845e9d 100644 --- a/java/java-impl/src/com/intellij/codeInsight/generation/GenerateDelegateHandler.java +++ b/java/java-impl/src/com/intellij/codeInsight/generation/GenerateDelegateHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,7 +46,7 @@ import java.util.*; */ public class GenerateDelegateHandler implements LanguageCodeInsightActionHandler { private static final Logger LOG = Logger.getInstance("#com.intellij.codeInsight.generation.GenerateDelegateHandler"); - private boolean myToCopyJavaDoc = false; + private boolean myToCopyJavaDoc; @Override public boolean isValidFor(Editor editor, PsiFile file) { diff --git a/java/java-impl/src/com/intellij/codeInsight/generation/GenerateEqualsHandler.java b/java/java-impl/src/com/intellij/codeInsight/generation/GenerateEqualsHandler.java index b8f5a477097d..55e6aac1da51 100644 --- a/java/java-impl/src/com/intellij/codeInsight/generation/GenerateEqualsHandler.java +++ b/java/java-impl/src/com/intellij/codeInsight/generation/GenerateEqualsHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,9 +37,9 @@ import java.util.List; */ public class GenerateEqualsHandler extends GenerateMembersHandlerBase { private static final Logger LOG = Logger.getInstance("#com.intellij.codeInsight.generation.GenerateEqualsHandler"); - private PsiField[] myEqualsFields = null; - private PsiField[] myHashCodeFields = null; - private PsiField[] myNonNullFields = null; + private PsiField[] myEqualsFields; + private PsiField[] myHashCodeFields; + private PsiField[] myNonNullFields; private static final PsiElementClassMember[] DUMMY_RESULT = new PsiElementClassMember[1]; //cannot return empty array, but this result won't be used anyway public GenerateEqualsHandler() { diff --git a/java/java-impl/src/com/intellij/codeInsight/generation/GenerateMembersHandlerBase.java b/java/java-impl/src/com/intellij/codeInsight/generation/GenerateMembersHandlerBase.java index 8e674adca489..1f9e4a55ad83 100644 --- a/java/java-impl/src/com/intellij/codeInsight/generation/GenerateMembersHandlerBase.java +++ b/java/java-impl/src/com/intellij/codeInsight/generation/GenerateMembersHandlerBase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,7 +53,7 @@ public abstract class GenerateMembersHandlerBase implements CodeInsightActionHan private static final Logger LOG = Logger.getInstance("#com.intellij.codeInsight.generation.GenerateMembersHandlerBase"); private final String myChooserTitle; - protected boolean myToCopyJavaDoc = false; + protected boolean myToCopyJavaDoc; public GenerateMembersHandlerBase(String chooserTitle) { myChooserTitle = chooserTitle; diff --git a/java/java-impl/src/com/intellij/codeInsight/generation/surroundWith/JavaExpressionSurroundDescriptor.java b/java/java-impl/src/com/intellij/codeInsight/generation/surroundWith/JavaExpressionSurroundDescriptor.java index 43924d9199c3..691e9a36831e 100644 --- a/java/java-impl/src/com/intellij/codeInsight/generation/surroundWith/JavaExpressionSurroundDescriptor.java +++ b/java/java-impl/src/com/intellij/codeInsight/generation/surroundWith/JavaExpressionSurroundDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ import java.util.Collections; * @author ven */ public class JavaExpressionSurroundDescriptor implements SurroundDescriptor { - private Surrounder[] mySurrounders = null; + private Surrounder[] mySurrounders; private static final Surrounder[] SURROUNDERS = { new JavaWithParenthesesSurrounder(), diff --git a/java/java-impl/src/com/intellij/codeInsight/generation/surroundWith/JavaWithTryCatchSurrounder.java b/java/java-impl/src/com/intellij/codeInsight/generation/surroundWith/JavaWithTryCatchSurrounder.java index 996d61483451..482ffd851162 100644 --- a/java/java-impl/src/com/intellij/codeInsight/generation/surroundWith/JavaWithTryCatchSurrounder.java +++ b/java/java-impl/src/com/intellij/codeInsight/generation/surroundWith/JavaWithTryCatchSurrounder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,7 +32,7 @@ import java.util.Collections; import java.util.List; public class JavaWithTryCatchSurrounder extends JavaStatementsSurrounder { - protected boolean myGenerateFinally = false; + protected boolean myGenerateFinally; @Override public String getTemplateDescription() { diff --git a/java/java-impl/src/com/intellij/codeInsight/highlighting/HighlightImportedElementsHandler.java b/java/java-impl/src/com/intellij/codeInsight/highlighting/HighlightImportedElementsHandler.java index 71e301aa91f6..9ae19918b5c2 100644 --- a/java/java-impl/src/com/intellij/codeInsight/highlighting/HighlightImportedElementsHandler.java +++ b/java/java-impl/src/com/intellij/codeInsight/highlighting/HighlightImportedElementsHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ public class HighlightImportedElementsHandler extends HighlightUsagesHandlerBase private final PsiElement myTarget; private final PsiImportStatementBase myImportStatement; private final boolean myImportStatic; - private Map> myClassReferenceListMap = null; + private Map> myClassReferenceListMap; public HighlightImportedElementsHandler(Editor editor, PsiFile file, PsiElement target, PsiImportStatementBase importStatement) { super(editor, file); diff --git a/java/java-impl/src/com/intellij/codeInsight/intention/impl/AddOnDemandStaticImportAction.java b/java/java-impl/src/com/intellij/codeInsight/intention/impl/AddOnDemandStaticImportAction.java index cc6687acbcb4..aa36b456f33d 100644 --- a/java/java-impl/src/com/intellij/codeInsight/intention/impl/AddOnDemandStaticImportAction.java +++ b/java/java-impl/src/com/intellij/codeInsight/intention/impl/AddOnDemandStaticImportAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -146,7 +146,7 @@ public class AddOnDemandStaticImportAction extends BaseElementAtCaretIntentionAc final TIntArrayList expressionToDequalifyOffsets = new TIntArrayList(); copy.accept(new JavaRecursiveElementWalkingVisitor() { - int delta = 0; + int delta; @Override public void visitReferenceElement(PsiJavaCodeReferenceElement expression) { if (isParameterizedReference(expression)) return; diff --git a/java/java-impl/src/com/intellij/codeInsight/intention/impl/DeannotateIntentionAction.java b/java/java-impl/src/com/intellij/codeInsight/intention/impl/DeannotateIntentionAction.java index 52deff695f95..60b33eb24b64 100644 --- a/java/java-impl/src/com/intellij/codeInsight/intention/impl/DeannotateIntentionAction.java +++ b/java/java-impl/src/com/intellij/codeInsight/intention/impl/DeannotateIntentionAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,7 +44,7 @@ import java.util.List; public class DeannotateIntentionAction implements IntentionAction, LowPriorityAction { private static final Logger LOG = Logger.getInstance("#" + DeannotateIntentionAction.class.getName()); - private String myAnnotationName = null; + private String myAnnotationName; @Override @NotNull diff --git a/java/java-impl/src/com/intellij/codeInsight/intention/impl/ReplaceCastWithVariableAction.java b/java/java-impl/src/com/intellij/codeInsight/intention/impl/ReplaceCastWithVariableAction.java index 14a85ef7e348..a612a87b3312 100644 --- a/java/java-impl/src/com/intellij/codeInsight/intention/impl/ReplaceCastWithVariableAction.java +++ b/java/java-impl/src/com/intellij/codeInsight/intention/impl/ReplaceCastWithVariableAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -116,7 +116,7 @@ public class ReplaceCastWithVariableAction extends PsiElementBaseIntentionAction scope.accept( new JavaRecursiveElementWalkingVisitor() { - private boolean inScope = false; + private boolean inScope; @Override public void visitElement(PsiElement element) { diff --git a/java/java-impl/src/com/intellij/codeInspection/inferNullity/InferNullityAnnotationsAction.java b/java/java-impl/src/com/intellij/codeInspection/inferNullity/InferNullityAnnotationsAction.java index 1d29c7308ebc..25d1294818e9 100644 --- a/java/java-impl/src/com/intellij/codeInspection/inferNullity/InferNullityAnnotationsAction.java +++ b/java/java-impl/src/com/intellij/codeInspection/inferNullity/InferNullityAnnotationsAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -197,7 +197,7 @@ public class InferNullityAnnotationsAction extends BaseAnalysisAction { @Override public void run() { scope.accept(new PsiElementVisitor() { - int myFileCount = 0; + int myFileCount; @Override public void visitFile(final PsiFile file) { diff --git a/java/java-impl/src/com/intellij/codeInspection/unusedReturnValue/UnusedReturnValue.java b/java/java-impl/src/com/intellij/codeInspection/unusedReturnValue/UnusedReturnValue.java index 2949a79562db..7a8f9d413467 100644 --- a/java/java-impl/src/com/intellij/codeInspection/unusedReturnValue/UnusedReturnValue.java +++ b/java/java-impl/src/com/intellij/codeInspection/unusedReturnValue/UnusedReturnValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,7 +44,7 @@ import java.util.List; public class UnusedReturnValue extends GlobalJavaBatchInspectionTool{ private MakeVoidQuickFix myQuickFix; - public boolean IGNORE_BUILDER_PATTERN = false; + public boolean IGNORE_BUILDER_PATTERN; @Override @Nullable diff --git a/java/java-impl/src/com/intellij/cyclicDependencies/CyclicDependenciesBuilder.java b/java/java-impl/src/com/intellij/cyclicDependencies/CyclicDependenciesBuilder.java index a38a1485c606..3539683dbacd 100644 --- a/java/java-impl/src/com/intellij/cyclicDependencies/CyclicDependenciesBuilder.java +++ b/java/java-impl/src/com/intellij/cyclicDependencies/CyclicDependenciesBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,7 +46,7 @@ public class CyclicDependenciesBuilder{ private final Map>> myBackwardFilesInDependentPackages = new HashMap>>(); private final Map> myPackageDependencies = new HashMap>(); private HashMap>> myCyclicDependencies = new HashMap>>(); - private int myFileCount = 0; + private int myFileCount; private final ForwardDependenciesBuilder myForwardBuilder; private String myRootNodeNameInUsageView; diff --git a/java/java-impl/src/com/intellij/cyclicDependencies/CyclicDependenciesUtil.java b/java/java-impl/src/com/intellij/cyclicDependencies/CyclicDependenciesUtil.java index f15268681cf3..79625827f7c4 100644 --- a/java/java-impl/src/com/intellij/cyclicDependencies/CyclicDependenciesUtil.java +++ b/java/java-impl/src/com/intellij/cyclicDependencies/CyclicDependenciesUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ public class CyclicDependenciesUtil{ final TIntArrayList sccs = dfstBuilder.getSCCs(); final List> chunks = new ArrayList>(); sccs.forEach(new TIntProcedure() { - int myTNumber = 0; + int myTNumber; public boolean execute(int size) { Set packs = new LinkedHashSet(); for (int j = 0; j < size; j++) { diff --git a/java/java-impl/src/com/intellij/internal/DupIconsFinder.java b/java/java-impl/src/com/intellij/internal/DupIconsFinder.java index 63ebcdc759de..43224cfb8e4a 100644 --- a/java/java-impl/src/com/intellij/internal/DupIconsFinder.java +++ b/java/java-impl/src/com/intellij/internal/DupIconsFinder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,8 +31,8 @@ import java.util.Map; public class DupIconsFinder { private static final MultiMap hashes = new MultiMap(); - private static int totalClusters = 0; - private static int totalDups = 0; + private static int totalClusters; + private static int totalDups; public static void main(String[] args) throws Exception { File root = new File("/Users/max/images/icons"); diff --git a/java/java-impl/src/com/intellij/javadoc/JavadocConfiguration.java b/java/java-impl/src/com/intellij/javadoc/JavadocConfiguration.java index 0a9415f38cc4..a7248ef1694e 100644 --- a/java/java-impl/src/com/intellij/javadoc/JavadocConfiguration.java +++ b/java/java-impl/src/com/intellij/javadoc/JavadocConfiguration.java @@ -32,15 +32,15 @@ public class JavadocConfiguration { public boolean OPTION_NAVIGATOR = true; public boolean OPTION_INDEX = true; public boolean OPTION_SEPARATE_INDEX = true; - public boolean OPTION_DOCUMENT_TAG_USE = false; - public boolean OPTION_DOCUMENT_TAG_AUTHOR = false; - public boolean OPTION_DOCUMENT_TAG_VERSION = false; + public boolean OPTION_DOCUMENT_TAG_USE; + public boolean OPTION_DOCUMENT_TAG_AUTHOR; + public boolean OPTION_DOCUMENT_TAG_VERSION; public boolean OPTION_DOCUMENT_TAG_DEPRECATED = true; public boolean OPTION_DEPRECATED_LIST = true; public String OTHER_OPTIONS = ""; public String HEAP_SIZE; public String LOCALE; public boolean OPEN_IN_BROWSER = true; - public boolean OPTION_INCLUDE_LIBS = false; - public boolean OPTION_LINK_TO_JDK_DOCS = false; + public boolean OPTION_INCLUDE_LIBS; + public boolean OPTION_LINK_TO_JDK_DOCS; } \ No newline at end of file diff --git a/java/java-impl/src/com/intellij/lang/java/JavaImportOptimizer.java b/java/java-impl/src/com/intellij/lang/java/JavaImportOptimizer.java index eddd536d19fb..7601d5dee787 100644 --- a/java/java-impl/src/com/intellij/lang/java/JavaImportOptimizer.java +++ b/java/java-impl/src/com/intellij/lang/java/JavaImportOptimizer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,7 +47,7 @@ public class JavaImportOptimizer implements ImportOptimizer { if (newImportList == null) return EmptyRunnable.getInstance(); return new CollectingInfoRunnable() { - private int myImportListLengthDiff = 0; + private int myImportListLengthDiff; @Override public void run() { diff --git a/java/java-impl/src/com/intellij/packageDependencies/ui/TreeModelBuilder.java b/java/java-impl/src/com/intellij/packageDependencies/ui/TreeModelBuilder.java index 994f2dda4796..6a7f23070da2 100644 --- a/java/java-impl/src/com/intellij/packageDependencies/ui/TreeModelBuilder.java +++ b/java/java-impl/src/com/intellij/packageDependencies/ui/TreeModelBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -71,14 +71,14 @@ public class TreeModelBuilder { private final Map> myModuleNodes = new HashMap>(); private final Map> myModuleGroupNodes = new HashMap>(); private final Map> myLibraryNodes = new HashMap>(); - private int myScannedFileCount = 0; - private int myTotalFileCount = 0; - private int myMarkedFileCount = 0; - private GeneralGroupNode myAllLibsNode = null; + private int myScannedFileCount; + private int myTotalFileCount; + private int myMarkedFileCount; + private GeneralGroupNode myAllLibsNode; - private GeneralGroupNode mySourceRoot = null; - private GeneralGroupNode myTestRoot = null; - private GeneralGroupNode myLibsRoot = null; + private GeneralGroupNode mySourceRoot; + private GeneralGroupNode myTestRoot; + private GeneralGroupNode myLibsRoot; public static final String PRODUCTION_NAME = AnalysisScopeBundle.message("package.dependencies.production.node.text"); public static final String TEST_NAME = AnalysisScopeBundle.message("package.dependencies.test.node.text"); @@ -166,8 +166,8 @@ public class TreeModelBuilder { public void run() { countFiles(project); myFileIndex.iterateContent(new ContentIterator() { - PackageDependenciesNode lastParent = null; - VirtualFile dir = null; + PackageDependenciesNode lastParent; + VirtualFile dir; public boolean processFile(VirtualFile fileOrDir) { if (!fileOrDir.isDirectory()) { if (lastParent != null && !Comparing.equal(dir, fileOrDir.getParent())) { @@ -195,7 +195,7 @@ public class TreeModelBuilder { private void processFilesRecursively(@NotNull VirtualFile file) { VfsUtilCore.visitChildrenRecursively(file, new VirtualFileVisitor() { - private PackageDependenciesNode parent = null; + private PackageDependenciesNode parent; @Override public boolean visitFile(@NotNull VirtualFile file) { diff --git a/java/java-impl/src/com/intellij/psi/AbstractQualifiedReference.java b/java/java-impl/src/com/intellij/psi/AbstractQualifiedReference.java index d0d7cce6e280..60e72e4c47ed 100644 --- a/java/java-impl/src/com/intellij/psi/AbstractQualifiedReference.java +++ b/java/java-impl/src/com/intellij/psi/AbstractQualifiedReference.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -245,7 +245,7 @@ public abstract class AbstractQualifiedReference myResults = new LinkedHashSet(); @Override diff --git a/java/java-impl/src/com/intellij/psi/codeStyle/JavaCodeStyleSettings.java b/java/java-impl/src/com/intellij/psi/codeStyle/JavaCodeStyleSettings.java index 9a7268339b7e..d31f94e11175 100644 --- a/java/java-impl/src/com/intellij/psi/codeStyle/JavaCodeStyleSettings.java +++ b/java/java-impl/src/com/intellij/psi/codeStyle/JavaCodeStyleSettings.java @@ -21,19 +21,19 @@ public class JavaCodeStyleSettings extends CustomCodeStyleSettings { super("JavaCodeStyleSettings", container); } - public boolean SPACES_WITHIN_ANGLE_BRACKETS = false; + public boolean SPACES_WITHIN_ANGLE_BRACKETS; //Type arguments - public boolean SPACE_AFTER_CLOSING_ANGLE_BRACKET_IN_TYPE_ARGUMENT = false; + public boolean SPACE_AFTER_CLOSING_ANGLE_BRACKET_IN_TYPE_ARGUMENT; //Type parameters - public boolean SPACE_BEFORE_OPENING_ANGLE_BRACKET_IN_TYPE_PARAMETER = false; + public boolean SPACE_BEFORE_OPENING_ANGLE_BRACKET_IN_TYPE_PARAMETER; public boolean SPACE_AROUND_TYPE_BOUNDS_IN_TYPE_PARAMETERS = true; - public boolean DO_NOT_WRAP_AFTER_SINGLE_ANNOTATION = false; + public boolean DO_NOT_WRAP_AFTER_SINGLE_ANNOTATION; public int ANNOTATION_PARAMETER_WRAP = CommonCodeStyleSettings.DO_NOT_WRAP; - public boolean ALIGN_MULTILINE_ANNOTATION_PARAMETERS = false; + public boolean ALIGN_MULTILINE_ANNOTATION_PARAMETERS; public int BLANK_LINES_AROUND_INITIALIZER = 1; diff --git a/java/java-impl/src/com/intellij/psi/filters/types/AssignableFromFilter.java b/java/java-impl/src/com/intellij/psi/filters/types/AssignableFromFilter.java index 23309bd687c0..8cd68e40f2e2 100644 --- a/java/java-impl/src/com/intellij/psi/filters/types/AssignableFromFilter.java +++ b/java/java-impl/src/com/intellij/psi/filters/types/AssignableFromFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,8 +31,8 @@ import org.jetbrains.annotations.Nullable; * To change this template use Options | File Templates. */ public class AssignableFromFilter implements ElementFilter{ - private PsiType myType = null; - private String myClassName = null; + private PsiType myType; + private String myClassName; public AssignableFromFilter(PsiType type){ myType = type; diff --git a/java/java-impl/src/com/intellij/psi/formatter/java/AbstractJavaBlock.java b/java/java-impl/src/com/intellij/psi/formatter/java/AbstractJavaBlock.java index eb662ce4ddd9..a4ecc6bf3c25 100644 --- a/java/java-impl/src/com/intellij/psi/formatter/java/AbstractJavaBlock.java +++ b/java/java-impl/src/com/intellij/psi/formatter/java/AbstractJavaBlock.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -58,9 +58,9 @@ public abstract class AbstractJavaBlock extends AbstractBlock implements JavaBlo private final Indent myIndent; protected Indent myChildIndent; protected Alignment myChildAlignment; - protected boolean myUseChildAttributes = false; + protected boolean myUseChildAttributes; @NotNull protected final AlignmentStrategy myAlignmentStrategy; - private boolean myIsAfterClassKeyword = false; + private boolean myIsAfterClassKeyword; protected Alignment myReservedAlignment; protected Alignment myReservedAlignment2; diff --git a/java/java-impl/src/com/intellij/psi/formatter/java/SyntheticCodeBlock.java b/java/java-impl/src/com/intellij/psi/formatter/java/SyntheticCodeBlock.java index 7cc75fd34bf5..30f1960119e3 100644 --- a/java/java-impl/src/com/intellij/psi/formatter/java/SyntheticCodeBlock.java +++ b/java/java-impl/src/com/intellij/psi/formatter/java/SyntheticCodeBlock.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,7 +42,7 @@ public class SyntheticCodeBlock implements Block, JavaBlock{ private final TextRange myTextRange; private ChildAttributes myChildAttributes; - private boolean myIsIncomplete = false; + private boolean myIsIncomplete; public SyntheticCodeBlock(List subBlocks, Alignment alignment, diff --git a/java/java-impl/src/com/intellij/psi/impl/cache/SmartIntToIntArrayMap.java b/java/java-impl/src/com/intellij/psi/impl/cache/SmartIntToIntArrayMap.java index 387962a8b03b..04fceda6884e 100644 --- a/java/java-impl/src/com/intellij/psi/impl/cache/SmartIntToIntArrayMap.java +++ b/java/java-impl/src/com/intellij/psi/impl/cache/SmartIntToIntArrayMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ import org.jetbrains.annotations.Nullable; * @author max */ public class SmartIntToIntArrayMap { - @Nullable TIntObjectHashMap myMultipleValuesMap = null; + @Nullable TIntObjectHashMap myMultipleValuesMap; TIntIntHashMap mySingleValueMap = new TIntIntHashMap(10, 0.9f); public int[] keys() { diff --git a/java/java-impl/src/com/intellij/psi/impl/source/PsiCodeFragmentImpl.java b/java/java-impl/src/com/intellij/psi/impl/source/PsiCodeFragmentImpl.java index ed5847ee0b59..fa0c7e2fbb95 100644 --- a/java/java-impl/src/com/intellij/psi/impl/source/PsiCodeFragmentImpl.java +++ b/java/java-impl/src/com/intellij/psi/impl/source/PsiCodeFragmentImpl.java @@ -93,7 +93,7 @@ public class PsiCodeFragmentImpl extends PsiFileImpl implements JavaCodeFragment return clone; } - private FileViewProvider myViewProvider = null; + private FileViewProvider myViewProvider; @Override @NotNull diff --git a/java/java-impl/src/com/intellij/psi/stubsHierarchy/impl/SingleClassHierarchyBuilder.java b/java/java-impl/src/com/intellij/psi/stubsHierarchy/impl/SingleClassHierarchyBuilder.java index f4e44af567c5..7127414b5962 100644 --- a/java/java-impl/src/com/intellij/psi/stubsHierarchy/impl/SingleClassHierarchyBuilder.java +++ b/java/java-impl/src/com/intellij/psi/stubsHierarchy/impl/SingleClassHierarchyBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,7 +55,7 @@ public class SingleClassHierarchyBuilder { private final HierarchyService myHierarchyService; protected final BitSet myProcessedSet = new BitSet(); private final ProjectFileIndex myProjectIndex; - boolean isInSourceMode = false; + boolean isInSourceMode; private UnitProcessor(Project project, HierarchyService hierarchyService) { myProject = project; diff --git a/java/java-impl/src/com/intellij/refactoring/JavaRefactoringSettings.java b/java/java-impl/src/com/intellij/refactoring/JavaRefactoringSettings.java index 2e27afaeec6c..ca10fa56307c 100644 --- a/java/java-impl/src/com/intellij/refactoring/JavaRefactoringSettings.java +++ b/java/java-impl/src/com/intellij/refactoring/JavaRefactoringSettings.java @@ -60,9 +60,9 @@ public class JavaRefactoringSettings implements PersistentStateComponent myUsages = new LinkedHashSet(); private PsiClass myInnerClass; private boolean myChangeReturnType; diff --git a/java/java-impl/src/com/intellij/refactoring/extractclass/BackpointerUsageVisitor.java b/java/java-impl/src/com/intellij/refactoring/extractclass/BackpointerUsageVisitor.java index 06178817fd40..fc4f709344c2 100644 --- a/java/java-impl/src/com/intellij/refactoring/extractclass/BackpointerUsageVisitor.java +++ b/java/java-impl/src/com/intellij/refactoring/extractclass/BackpointerUsageVisitor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ import com.intellij.psi.*; import java.util.List; class BackpointerUsageVisitor extends JavaRecursiveElementWalkingVisitor { - private PsiMember myCause = null; + private PsiMember myCause; private final List myFields; private final List myInnerClasses; diff --git a/java/java-impl/src/com/intellij/refactoring/extractclass/ExtractClassProcessor.java b/java/java-impl/src/com/intellij/refactoring/extractclass/ExtractClassProcessor.java index 3332ce2ed234..944100216317 100644 --- a/java/java-impl/src/com/intellij/refactoring/extractclass/ExtractClassProcessor.java +++ b/java/java-impl/src/com/intellij/refactoring/extractclass/ExtractClassProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -81,7 +81,7 @@ public class ExtractClassProcessor extends FixableUsagesRefactoringProcessor { private final String newClassName; private final String delegateFieldName; private final boolean requiresBackpointer; - private boolean delegationRequired = false; + private boolean delegationRequired; private final ExtractEnumProcessor myExtractEnumProcessor; private final PsiClass myClass; private boolean extractInnerClass; diff --git a/java/java-impl/src/com/intellij/refactoring/extractclass/ExtractedClassBuilder.java b/java/java-impl/src/com/intellij/refactoring/extractclass/ExtractedClassBuilder.java index 03e7138eee23..4e42bd3cab93 100644 --- a/java/java-impl/src/com/intellij/refactoring/extractclass/ExtractedClassBuilder.java +++ b/java/java-impl/src/com/intellij/refactoring/extractclass/ExtractedClassBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,8 +38,8 @@ import java.util.Set; class ExtractedClassBuilder { private static final Logger LOGGER = Logger.getInstance("com.siyeh.rpp.extractclass.ExtractedClassBuilder"); - private String className = null; - private String packageName = null; + private String className; + private String packageName; private final List fields = new ArrayList(5); private final List methods = new ArrayList(5); private final List initializers = new ArrayList(5); @@ -48,9 +48,9 @@ class ExtractedClassBuilder { private final List typeParams = new ArrayList(); private final List interfaces = new ArrayList(); - private boolean requiresBackPointer = false; - private String originalClassName = null; - private String backPointerName = null; + private boolean requiresBackPointer; + private String originalClassName; + private String backPointerName; private Project myProject; private JavaCodeStyleManager myJavaCodeStyleManager; private Set myFieldsNeedingSetters; diff --git a/java/java-impl/src/com/intellij/refactoring/introduceField/IntroduceConstantHandler.java b/java/java-impl/src/com/intellij/refactoring/introduceField/IntroduceConstantHandler.java index d084cb0ce339..aa2f8bd60c04 100644 --- a/java/java-impl/src/com/intellij/refactoring/introduceField/IntroduceConstantHandler.java +++ b/java/java-impl/src/com/intellij/refactoring/introduceField/IntroduceConstantHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -228,7 +228,7 @@ public class IntroduceConstantHandler extends BaseExpressionToFieldHandler { } private static class IsStaticFinalInitializerExpression extends ClassMemberReferencesVisitor { - private PsiElement myElementReference = null; + private PsiElement myElementReference; private final PsiExpression myInitializer; public IsStaticFinalInitializerExpression(PsiClass aClass, PsiExpression initializer) { diff --git a/java/java-impl/src/com/intellij/refactoring/introduceParameter/EnclosingMethodSelectionDialog.java b/java/java-impl/src/com/intellij/refactoring/introduceParameter/EnclosingMethodSelectionDialog.java index 346b1571f690..3c92436fd9eb 100644 --- a/java/java-impl/src/com/intellij/refactoring/introduceParameter/EnclosingMethodSelectionDialog.java +++ b/java/java-impl/src/com/intellij/refactoring/introduceParameter/EnclosingMethodSelectionDialog.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,7 +29,6 @@ import com.intellij.openapi.ui.DialogWrapper; import com.intellij.psi.PsiMethod; import com.intellij.refactoring.RefactoringBundle; import com.intellij.refactoring.ui.MethodCellRenderer; -import com.intellij.ui.IdeBorderFactory; import com.intellij.ui.ScrollPaneFactory; import com.intellij.ui.components.JBList; import org.jetbrains.annotations.NotNull; @@ -41,7 +40,7 @@ import java.util.List; public class EnclosingMethodSelectionDialog extends DialogWrapper { private final List myEnclosingMethods; - private JList myEnclosingMethodsList = null; + private JList myEnclosingMethodsList; private final JCheckBox myCbReplaceInstanceOf = new JCheckBox(RefactoringBundle.message("use.interface.superclass.in.instanceof")); private static final String REFACTORING_NAME = RefactoringBundle.message("introduce.parameter.title"); diff --git a/java/java-impl/src/com/intellij/refactoring/introduceParameter/InplaceIntroduceParameterUI.java b/java/java-impl/src/com/intellij/refactoring/introduceParameter/InplaceIntroduceParameterUI.java index 1dd601d63801..ec5e04232ee2 100644 --- a/java/java-impl/src/com/intellij/refactoring/introduceParameter/InplaceIntroduceParameterUI.java +++ b/java/java-impl/src/com/intellij/refactoring/introduceParameter/InplaceIntroduceParameterUI.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,10 +15,12 @@ */ package com.intellij.refactoring.introduceParameter; -import com.intellij.ui.ListCellRendererWrapper; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.LabeledComponent; -import com.intellij.psi.*; +import com.intellij.psi.PsiExpression; +import com.intellij.psi.PsiLocalVariable; +import com.intellij.psi.PsiMethod; +import com.intellij.psi.PsiParameter; import com.intellij.psi.codeStyle.CodeStyleSettingsManager; import com.intellij.psi.util.PsiUtil; import com.intellij.refactoring.IntroduceParameterRefactoring; @@ -27,6 +29,7 @@ import com.intellij.refactoring.RefactoringBundle; import com.intellij.refactoring.introduce.inplace.KeyboardComboSwitcher; import com.intellij.refactoring.ui.TypeSelectorManager; import com.intellij.ui.IdeBorderFactory; +import com.intellij.ui.ListCellRendererWrapper; import com.intellij.util.ui.UIUtil; import gnu.trove.TIntArrayList; @@ -40,7 +43,7 @@ import java.awt.event.ItemListener; */ public abstract class InplaceIntroduceParameterUI extends IntroduceParameterSettingsUI { private JComboBox myReplaceFieldsCb; - private boolean myHasWriteAccess = false; + private boolean myHasWriteAccess; private final Project myProject; private final TypeSelectorManager myTypeSelectorManager; private final PsiExpression[] myOccurrences; diff --git a/java/java-impl/src/com/intellij/refactoring/introduceParameter/IntroduceParameterDialog.java b/java/java-impl/src/com/intellij/refactoring/introduceParameter/IntroduceParameterDialog.java index 51af3a7b7cf3..9850709ba39a 100644 --- a/java/java-impl/src/com/intellij/refactoring/introduceParameter/IntroduceParameterDialog.java +++ b/java/java-impl/src/com/intellij/refactoring/introduceParameter/IntroduceParameterDialog.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,7 +60,7 @@ public class IntroduceParameterDialog extends RefactoringDialog { private final boolean myMustBeFinal; private final PsiExpression myExpression; private final PsiLocalVariable myLocalVar; - protected JCheckBox myCbDeclareFinal = null; + protected JCheckBox myCbDeclareFinal; protected JCheckBox myCbCollapseToLambda; // private JComponent myParameterNameField = null; @@ -73,7 +73,7 @@ public class IntroduceParameterDialog extends RefactoringDialog { private NameSuggestionsField.DataChanged myParameterNameChangedListener; private final IntroduceParameterSettingsPanel myPanel; - private boolean myHasWriteAccess = false; + private boolean myHasWriteAccess; IntroduceParameterDialog(@NotNull Project project, @NotNull List classMembersList, diff --git a/java/java-impl/src/com/intellij/refactoring/introduceParameter/IntroduceParameterProcessor.java b/java/java-impl/src/com/intellij/refactoring/introduceParameter/IntroduceParameterProcessor.java index 8951fa5d86e2..6b2d3fa95559 100644 --- a/java/java-impl/src/com/intellij/refactoring/introduceParameter/IntroduceParameterProcessor.java +++ b/java/java-impl/src/com/intellij/refactoring/introduceParameter/IntroduceParameterProcessor.java @@ -304,7 +304,7 @@ public class IntroduceParameterProcessor extends BaseRefactoringProcessor implem } public static class AnySupers extends JavaRecursiveElementWalkingVisitor { - private boolean myResult = false; + private boolean myResult; @Override public void visitSuperExpression(PsiSuperExpression expression) { myResult = true; } @@ -319,7 +319,7 @@ public class IntroduceParameterProcessor extends BaseRefactoringProcessor implem } public class AnySameNameVariables extends JavaRecursiveElementWalkingVisitor { - private Pair conflict = null; + private Pair conflict; public Pair getConflict() { return conflict; diff --git a/java/java-impl/src/com/intellij/refactoring/introduceParameter/IntroduceParameterSettingsUI.java b/java/java-impl/src/com/intellij/refactoring/introduceParameter/IntroduceParameterSettingsUI.java index af4c559bbc80..3daccf8cfd94 100644 --- a/java/java-impl/src/com/intellij/refactoring/introduceParameter/IntroduceParameterSettingsUI.java +++ b/java/java-impl/src/com/intellij/refactoring/introduceParameter/IntroduceParameterSettingsUI.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,18 +43,18 @@ public abstract class IntroduceParameterSettingsUI { protected final boolean myIsInvokedOnDeclaration; protected final boolean myHasInitializer; - protected StateRestoringCheckBox myCbDeleteLocalVariable = null; - protected StateRestoringCheckBox myCbUseInitializer = null; - protected JRadioButton myReplaceFieldsWithGettersNoneRadio = null; - protected JRadioButton myReplaceFieldsWithGettersInaccessibleRadio = null; - protected JRadioButton myReplaceFieldsWithGettersAllRadio = null; + protected StateRestoringCheckBox myCbDeleteLocalVariable; + protected StateRestoringCheckBox myCbUseInitializer; + protected JRadioButton myReplaceFieldsWithGettersNoneRadio; + protected JRadioButton myReplaceFieldsWithGettersInaccessibleRadio; + protected JRadioButton myReplaceFieldsWithGettersAllRadio; protected final ButtonGroup myReplaceFieldsWithGettersButtonGroup = new ButtonGroup(); protected final PsiParameter[] myParametersToRemove; protected final boolean[] myParametersToRemoveChecked; protected final boolean myIsLocalVariable; - protected JCheckBox myCbReplaceAllOccurences = null; - protected JCheckBox myCbGenerateDelegate = null; + protected JCheckBox myCbReplaceAllOccurences; + protected JCheckBox myCbGenerateDelegate; public IntroduceParameterSettingsUI(PsiLocalVariable onLocalVariable, PsiExpression onExpression, diff --git a/java/java-impl/src/com/intellij/refactoring/introduceVariable/IntroduceVariableDialog.java b/java/java-impl/src/com/intellij/refactoring/introduceVariable/IntroduceVariableDialog.java index 9523408a3a49..2175489557dd 100644 --- a/java/java-impl/src/com/intellij/refactoring/introduceVariable/IntroduceVariableDialog.java +++ b/java/java-impl/src/com/intellij/refactoring/introduceVariable/IntroduceVariableDialog.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,6 @@ package com.intellij.refactoring.introduceVariable; import com.intellij.openapi.help.HelpManager; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.DialogWrapper; -import com.intellij.psi.JavaPsiFacade; import com.intellij.psi.PsiExpression; import com.intellij.psi.PsiNameHelper; import com.intellij.psi.PsiType; @@ -48,7 +47,7 @@ class IntroduceVariableDialog extends DialogWrapper implements IntroduceVariable private NameSuggestionsField myNameField; private JCheckBox myCbReplaceAll; - private StateRestoringCheckBox myCbReplaceWrite = null; + private StateRestoringCheckBox myCbReplaceWrite; private JCheckBox myCbFinal; private boolean myCbFinalState; private TypeSelector myTypeSelector; diff --git a/java/java-impl/src/com/intellij/refactoring/introduceparameterobject/JavaIntroduceParameterObjectClassDescriptor.java b/java/java-impl/src/com/intellij/refactoring/introduceparameterobject/JavaIntroduceParameterObjectClassDescriptor.java index 62c6cf0acb41..069aa33ab90d 100644 --- a/java/java-impl/src/com/intellij/refactoring/introduceparameterobject/JavaIntroduceParameterObjectClassDescriptor.java +++ b/java/java-impl/src/com/intellij/refactoring/introduceparameterobject/JavaIntroduceParameterObjectClassDescriptor.java @@ -324,7 +324,7 @@ public class JavaIntroduceParameterObjectClassDescriptor extends IntroduceParame private final PsiParameter param; - private PsiField fieldAssigned = null; + private PsiField fieldAssigned; ParamAssignmentFinder(PsiParameter param) { this.param = param; diff --git a/java/java-impl/src/com/intellij/refactoring/introduceparameterobject/ParameterObjectBuilder.java b/java/java-impl/src/com/intellij/refactoring/introduceparameterobject/ParameterObjectBuilder.java index ac91a848aae8..13510f2de268 100644 --- a/java/java-impl/src/com/intellij/refactoring/introduceparameterobject/ParameterObjectBuilder.java +++ b/java/java-impl/src/com/intellij/refactoring/introduceparameterobject/ParameterObjectBuilder.java @@ -30,8 +30,8 @@ import java.util.Iterator; import java.util.List; class ParameterObjectBuilder { - private String className = null; - private String packageName = null; + private String className; + private String packageName; private final List fields = new ArrayList(5); private final List typeParams = new ArrayList(); private Project myProject; diff --git a/java/java-impl/src/com/intellij/refactoring/memberPullUp/JavaPullUpHelper.java b/java/java-impl/src/com/intellij/refactoring/memberPullUp/JavaPullUpHelper.java index d2524b4a03a3..b660567f2c55 100644 --- a/java/java-impl/src/com/intellij/refactoring/memberPullUp/JavaPullUpHelper.java +++ b/java/java-impl/src/com/intellij/refactoring/memberPullUp/JavaPullUpHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,7 +60,7 @@ public class JavaPullUpHelper implements PullUpHelper { private final PsiClass myTargetSuperClass; private final boolean myIsTargetInterface; private final DocCommentPolicy myJavaDocPolicy; - private Set myMembersAfterMove = null; + private Set myMembersAfterMove; private final Set myMembersToMove; private final Project myProject; diff --git a/java/java-impl/src/com/intellij/refactoring/memberPullUp/PullUpProcessor.java b/java/java-impl/src/com/intellij/refactoring/memberPullUp/PullUpProcessor.java index 770dd19073aa..cc4faae65b6f 100644 --- a/java/java-impl/src/com/intellij/refactoring/memberPullUp/PullUpProcessor.java +++ b/java/java-impl/src/com/intellij/refactoring/memberPullUp/PullUpProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -66,8 +66,8 @@ public class PullUpProcessor extends BaseRefactoringProcessor implements PullUpD private final PsiClass myTargetSuperClass; private final MemberInfo[] myMembersToMove; private final DocCommentPolicy myJavaDocPolicy; - private Set myMembersAfterMove = null; - private Set myMovedMembers = null; + private Set myMembersAfterMove; + private Set myMovedMembers; private final Map> myProcessors = ContainerUtil.newHashMap(); public PullUpProcessor(PsiClass sourceClass, PsiClass targetSuperClass, MemberInfo[] membersToMove, DocCommentPolicy javaDocPolicy) { diff --git a/java/java-impl/src/com/intellij/refactoring/migration/MigrationMapSet.java b/java/java-impl/src/com/intellij/refactoring/migration/MigrationMapSet.java index 4c1a640a0e92..1bcc190b45de 100644 --- a/java/java-impl/src/com/intellij/refactoring/migration/MigrationMapSet.java +++ b/java/java-impl/src/com/intellij/refactoring/migration/MigrationMapSet.java @@ -1,6 +1,6 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ import java.util.Iterator; public class MigrationMapSet { private static final Logger LOG = Logger.getInstance("#com.intellij.refactoring.migration.MigrationMapSet"); - private ArrayList myMaps = null; + private ArrayList myMaps; @NonNls private static final String MIGRATION_MAP = "migrationMap"; @NonNls private static final String ENTRY = "entry"; @NonNls private static final String NAME = "name"; diff --git a/java/java-impl/src/com/intellij/refactoring/move/moveClassesOrPackages/AutocreatingSingleSourceRootMoveDestination.java b/java/java-impl/src/com/intellij/refactoring/move/moveClassesOrPackages/AutocreatingSingleSourceRootMoveDestination.java index ce19d6bacaa5..2ad63ce6195f 100644 --- a/java/java-impl/src/com/intellij/refactoring/move/moveClassesOrPackages/AutocreatingSingleSourceRootMoveDestination.java +++ b/java/java-impl/src/com/intellij/refactoring/move/moveClassesOrPackages/AutocreatingSingleSourceRootMoveDestination.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -97,7 +97,7 @@ public class AutocreatingSingleSourceRootMoveDestination extends AutocreatingMov return true; } - PsiDirectory myTargetDirectory = null; + PsiDirectory myTargetDirectory; private PsiDirectory getDirectory() throws IncorrectOperationException { if (myTargetDirectory == null) { myTargetDirectory = RefactoringUtil.createPackageDirectoryInSourceRoot(myPackage, mySourceRoot); diff --git a/java/java-impl/src/com/intellij/refactoring/move/moveMembers/MoveMembersDialog.java b/java/java-impl/src/com/intellij/refactoring/move/moveMembers/MoveMembersDialog.java index f5eb13ce7376..261a907a6606 100644 --- a/java/java-impl/src/com/intellij/refactoring/move/moveMembers/MoveMembersDialog.java +++ b/java/java-impl/src/com/intellij/refactoring/move/moveMembers/MoveMembersDialog.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,10 @@ */ package com.intellij.refactoring.move.moveMembers; -import com.intellij.ide.util.*; +import com.intellij.ide.util.ClassFilter; +import com.intellij.ide.util.PackageUtil; +import com.intellij.ide.util.TreeClassChooser; +import com.intellij.ide.util.TreeClassChooserFactory; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.command.CommandProcessor; import com.intellij.openapi.editor.event.DocumentAdapter; @@ -39,7 +42,6 @@ import com.intellij.refactoring.move.MoveDialogBase; import com.intellij.refactoring.ui.JavaVisibilityPanel; import com.intellij.refactoring.ui.MemberSelectionPanel; import com.intellij.refactoring.ui.MemberSelectionTable; -import com.intellij.refactoring.ui.RefactoringDialog; import com.intellij.refactoring.util.CommonRefactoringUtil; import com.intellij.refactoring.util.classMembers.MemberInfo; import com.intellij.refactoring.util.classMembers.UsesAndInterfacesDependencyMemberInfoModel; @@ -407,7 +409,7 @@ public class MoveMembersDialog extends MoveDialogBase implements MoveMembersOpti } private class MyMemberInfoModel extends UsesAndInterfacesDependencyMemberInfoModel { - PsiClass myTargetClass = null; + PsiClass myTargetClass; public MyMemberInfoModel() { super(mySourceClass, null, false, DEFAULT_CONTAINMENT_VERIFIER); } diff --git a/java/java-impl/src/com/intellij/refactoring/psi/ArrayIterator.java b/java/java-impl/src/com/intellij/refactoring/psi/ArrayIterator.java index 1fd8875f475f..3d492299baf6 100644 --- a/java/java-impl/src/com/intellij/refactoring/psi/ArrayIterator.java +++ b/java/java-impl/src/com/intellij/refactoring/psi/ArrayIterator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ import java.util.NoSuchElementException; class ArrayIterator implements Iterator{ private final T[] contents; - private int currentIndex = 0; + private int currentIndex; private final Object lock = new Object(); ArrayIterator(T[] contents){ diff --git a/java/java-impl/src/com/intellij/refactoring/turnRefsToSuper/TurnRefsToSuperDialog.java b/java/java-impl/src/com/intellij/refactoring/turnRefsToSuper/TurnRefsToSuperDialog.java index e1946746fae1..b3afdb12ab7f 100644 --- a/java/java-impl/src/com/intellij/refactoring/turnRefsToSuper/TurnRefsToSuperDialog.java +++ b/java/java-impl/src/com/intellij/refactoring/turnRefsToSuper/TurnRefsToSuperDialog.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,7 +42,7 @@ public class TurnRefsToSuperDialog extends RefactoringDialog { @NotNull private final PsiClass mySubClass; private final List mySuperClasses; - private JList mySuperClassesList = null; + private JList mySuperClassesList; private final JCheckBox myCbReplaceInstanceOf = new JCheckBox(); TurnRefsToSuperDialog(Project project, @NotNull PsiClass subClass, List superClasses) { diff --git a/java/java-impl/src/com/intellij/refactoring/typeCook/deductive/PsiTypeVariableFactory.java b/java/java-impl/src/com/intellij/refactoring/typeCook/deductive/PsiTypeVariableFactory.java index 95535071b50e..a09e0ec1fa19 100644 --- a/java/java-impl/src/com/intellij/refactoring/typeCook/deductive/PsiTypeVariableFactory.java +++ b/java/java-impl/src/com/intellij/refactoring/typeCook/deductive/PsiTypeVariableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ import java.util.*; * @author db */ public class PsiTypeVariableFactory { - private int myCurrent = 0; + private int myCurrent; private final List> myClusters = new LinkedList>(); private final Map> myVarCluster = new HashMap>(); diff --git a/java/java-impl/src/com/intellij/refactoring/typeCook/deductive/resolver/BindingFactory.java b/java/java-impl/src/com/intellij/refactoring/typeCook/deductive/resolver/BindingFactory.java index 14b9a1715050..3e0083e58467 100644 --- a/java/java-impl/src/com/intellij/refactoring/typeCook/deductive/resolver/BindingFactory.java +++ b/java/java-impl/src/com/intellij/refactoring/typeCook/deductive/resolver/BindingFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -481,7 +481,7 @@ public class BindingFactory { if (type != null) { class Verifier extends PsiExtendedTypeVisitor { - boolean myFlag = false; + boolean myFlag; @Override public Void visitTypeVariable(final PsiTypeVariable var) { if (var.getIndex() == index) { @@ -565,7 +565,7 @@ public class BindingFactory { public int getWidth() { class MyProcecure implements TObjectProcedure { - int width = 0; + int width; public boolean execute(PsiType type) { if (substitute(type) != null) width++; return true; diff --git a/java/java-impl/src/com/intellij/refactoring/typeCook/deductive/resolver/ResolverTree.java b/java/java-impl/src/com/intellij/refactoring/typeCook/deductive/resolver/ResolverTree.java index a58e0561c449..00ec0fd5cc4b 100644 --- a/java/java-impl/src/com/intellij/refactoring/typeCook/deductive/resolver/ResolverTree.java +++ b/java/java-impl/src/com/intellij/refactoring/typeCook/deductive/resolver/ResolverTree.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,7 +50,7 @@ public class ResolverTree { private final Project myProject; private final TObjectIntHashMap myBindingDegree; //How many times this type variable is bound in the system private final Settings mySettings; - private boolean mySolutionFound = false; + private boolean mySolutionFound; private Set myConstraints; @@ -244,7 +244,7 @@ public class ResolverTree { final Map index = new HashMap(); sccs.forEach(new TIntProcedure() { - int myTNumber = 0; + int myTNumber; @Override public boolean execute(int size) { diff --git a/java/java-impl/src/com/intellij/refactoring/typeMigration/TypeMigrationLabeler.java b/java/java-impl/src/com/intellij/refactoring/typeMigration/TypeMigrationLabeler.java index 7d00278f324d..f93cfcb0e6bc 100644 --- a/java/java-impl/src/com/intellij/refactoring/typeMigration/TypeMigrationLabeler.java +++ b/java/java-impl/src/com/intellij/refactoring/typeMigration/TypeMigrationLabeler.java @@ -77,7 +77,7 @@ public class TypeMigrationLabeler { private final LinkedHashMap myNewExpressionTypeChange; private final LinkedHashMap myClassTypeArgumentsChange; - private TypeMigrationUsageInfo[] myMigratedUsages = null; + private TypeMigrationUsageInfo[] myMigratedUsages; private TypeMigrationUsageInfo myCurrentRoot; private final Map>> myRootsTree = diff --git a/java/java-impl/src/com/intellij/refactoring/util/classMembers/ElementNeedsThis.java b/java/java-impl/src/com/intellij/refactoring/util/classMembers/ElementNeedsThis.java index 8bcacc8333e9..3f3c7e7479c4 100644 --- a/java/java-impl/src/com/intellij/refactoring/util/classMembers/ElementNeedsThis.java +++ b/java/java-impl/src/com/intellij/refactoring/util/classMembers/ElementNeedsThis.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ import com.intellij.psi.util.PsiUtil; * @author dsl */ public class ElementNeedsThis extends ClassThisReferencesVisitor { - private boolean myResult = false; + private boolean myResult; private final PsiElement myMember; public ElementNeedsThis(PsiClass aClass, PsiElement member) { diff --git a/java/java-impl/src/com/intellij/refactoring/util/classMembers/InterfaceMemberDependencyGraph.java b/java/java-impl/src/com/intellij/refactoring/util/classMembers/InterfaceMemberDependencyGraph.java index d04b5b7d3c98..741a29b66226 100644 --- a/java/java-impl/src/com/intellij/refactoring/util/classMembers/InterfaceMemberDependencyGraph.java +++ b/java/java-impl/src/com/intellij/refactoring/util/classMembers/InterfaceMemberDependencyGraph.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ import java.util.Iterator; import java.util.Set; public class InterfaceMemberDependencyGraph> implements MemberDependencyGraph { - protected HashSet myInterfaceDependencies = null; + protected HashSet myInterfaceDependencies; protected HashMap> myMembersToInterfacesMap = new HashMap>(); protected HashSet myImplementedInterfaces; protected HashMap> myMethodsFromInterfaces; diff --git a/java/java-impl/src/com/intellij/refactoring/util/classRefs/ClassReferenceScanner.java b/java/java-impl/src/com/intellij/refactoring/util/classRefs/ClassReferenceScanner.java index 2ee99941aebc..faa9cdc1910d 100644 --- a/java/java-impl/src/com/intellij/refactoring/util/classRefs/ClassReferenceScanner.java +++ b/java/java-impl/src/com/intellij/refactoring/util/classRefs/ClassReferenceScanner.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ import com.intellij.psi.*; */ public abstract class ClassReferenceScanner { protected PsiClass myClass; - private PsiReference[] myReferences = null; + private PsiReference[] myReferences; public abstract PsiReference[] findReferences(); diff --git a/java/java-impl/src/com/intellij/refactoring/util/duplicates/MethodDuplicatesHandler.java b/java/java-impl/src/com/intellij/refactoring/util/duplicates/MethodDuplicatesHandler.java index a6d97af3d961..88c54b97c43e 100644 --- a/java/java-impl/src/com/intellij/refactoring/util/duplicates/MethodDuplicatesHandler.java +++ b/java/java-impl/src/com/intellij/refactoring/util/duplicates/MethodDuplicatesHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -161,7 +161,7 @@ public class MethodDuplicatesHandler implements RefactoringActionHandler, Contex } scope.accept(new PsiRecursiveElementVisitor() { - private int myFileCount = 0; + private int myFileCount; @Override public void visitFile(final PsiFile file) { if (progressIndicator != null){ if (progressIndicator.isCanceled()) return; diff --git a/java/java-impl/src/com/intellij/refactoring/util/occurrences/BaseOccurrenceManager.java b/java/java-impl/src/com/intellij/refactoring/util/occurrences/BaseOccurrenceManager.java index 4113e2cd6ca1..dd61924b09ce 100644 --- a/java/java-impl/src/com/intellij/refactoring/util/occurrences/BaseOccurrenceManager.java +++ b/java/java-impl/src/com/intellij/refactoring/util/occurrences/BaseOccurrenceManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,8 +28,8 @@ import java.util.ArrayList; * @author dsl */ public abstract class BaseOccurrenceManager implements OccurrenceManager { - private PsiExpression[] myOccurrences = null; - private PsiElement myAnchorStatement = null; + private PsiExpression[] myOccurrences; + private PsiElement myAnchorStatement; protected final OccurrenceFilter myFilter; public BaseOccurrenceManager(OccurrenceFilter filter) { diff --git a/java/java-impl/src/com/intellij/refactoring/wrapreturnvalue/ReturnValueBeanBuilder.java b/java/java-impl/src/com/intellij/refactoring/wrapreturnvalue/ReturnValueBeanBuilder.java index 965083e8ddc0..b880c8402e6a 100644 --- a/java/java-impl/src/com/intellij/refactoring/wrapreturnvalue/ReturnValueBeanBuilder.java +++ b/java/java-impl/src/com/intellij/refactoring/wrapreturnvalue/ReturnValueBeanBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,10 +29,10 @@ import java.util.List; class ReturnValueBeanBuilder { private final List myTypeParams = new ArrayList(); - private String myClassName = null; - private String myPackageName = null; - private Project myProject = null; - private PsiType myValueType = null; + private String myClassName; + private String myPackageName; + private Project myProject; + private PsiType myValueType; private boolean myStatic; public void setClassName(String className) { diff --git a/java/java-impl/src/com/intellij/unscramble/ThreadState.java b/java/java-impl/src/com/intellij/unscramble/ThreadState.java index d4952446a3fb..2c47f96b72f5 100644 --- a/java/java-impl/src/com/intellij/unscramble/ThreadState.java +++ b/java/java-impl/src/com/intellij/unscramble/ThreadState.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2010 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ public class ThreadState { private String myJavaThreadState; private String myThreadStateDetail; private String myExtraState; - private boolean isDaemon = false; + private boolean isDaemon; private final Set myThreadsWaitingForMyLock = new HashSet(); private final Set myDeadlockedThreads = new HashSet(); diff --git a/java/java-impl/src/com/intellij/unscramble/UnscrambleListener.java b/java/java-impl/src/com/intellij/unscramble/UnscrambleListener.java index f0e279528494..ad42513edc03 100644 --- a/java/java-impl/src/com/intellij/unscramble/UnscrambleListener.java +++ b/java/java-impl/src/com/intellij/unscramble/UnscrambleListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +31,7 @@ import java.util.regex.Pattern; */ public class UnscrambleListener extends ApplicationActivationListener.Adapter { private static final int MAX_STACKTRACE_SIZE = 100 * 1024; - private String stacktrace = null; + private String stacktrace; @Override public void applicationActivated(final IdeFrame ideFrame) { diff --git a/java/java-indexing-impl/src/com/intellij/codeInsight/ReadableExternalAnnotationsManager.java b/java/java-indexing-impl/src/com/intellij/codeInsight/ReadableExternalAnnotationsManager.java index 4dd8e62e78a8..c4682cfbbdc9 100644 --- a/java/java-indexing-impl/src/com/intellij/codeInsight/ReadableExternalAnnotationsManager.java +++ b/java/java-indexing-impl/src/com/intellij/codeInsight/ReadableExternalAnnotationsManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ import org.jetbrains.annotations.Nullable; import java.util.*; public class ReadableExternalAnnotationsManager extends BaseExternalAnnotationsManager { - @Nullable private Set myAnnotationsRoots = null; + @Nullable private Set myAnnotationsRoots; public ReadableExternalAnnotationsManager(PsiManager psiManager) { super(psiManager); diff --git a/java/java-indexing-impl/src/com/intellij/psi/impl/search/AllClassesSearchExecutor.java b/java/java-indexing-impl/src/com/intellij/psi/impl/search/AllClassesSearchExecutor.java index 067db93f8551..d90a814afe57 100644 --- a/java/java-indexing-impl/src/com/intellij/psi/impl/search/AllClassesSearchExecutor.java +++ b/java/java-indexing-impl/src/com/intellij/psi/impl/search/AllClassesSearchExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -104,7 +104,7 @@ public class AllClassesSearchExecutor implements QueryExecutor() { - int i = 0; + int i; @Override public boolean process(String s) { diff --git a/java/java-psi-api/src/com/intellij/ide/util/JavaAnonymousClassesHelper.java b/java/java-psi-api/src/com/intellij/ide/util/JavaAnonymousClassesHelper.java index ae6b362792ad..a11fb2f2feb9 100644 --- a/java/java-psi-api/src/com/intellij/ide/util/JavaAnonymousClassesHelper.java +++ b/java/java-psi-api/src/com/intellij/ide/util/JavaAnonymousClassesHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,7 +50,7 @@ public class JavaAnonymousClassesHelper { public CachedValueProvider.Result> compute(final PsiClass upper) { final Map map = new THashMap(); upper.accept(new JavaRecursiveElementWalkingVisitor() { - int index = 0; + int index; @Override public void visitAnonymousClass(PsiAnonymousClass aClass) { diff --git a/java/java-psi-api/src/com/intellij/psi/util/ClassUtil.java b/java/java-psi-api/src/com/intellij/psi/util/ClassUtil.java index 9e005ffd2eef..98085e944c5b 100644 --- a/java/java-psi-api/src/com/intellij/psi/util/ClassUtil.java +++ b/java/java-psi-api/src/com/intellij/psi/util/ClassUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -112,7 +112,7 @@ public class ClassUtil { final String name = prefix.length() < indexName.length() ? indexName.substring(prefix.length()) : null; final PsiClass[] result = new PsiClass[1]; containingClass.accept(new JavaRecursiveElementVisitor() { - private int myCurrentIdx = 0; + private int myCurrentIdx; @Override public void visitElement(PsiElement element) {