diff --git a/java/java-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationInspection.java b/java/java-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationInspection.java index ac1728c039c7..cf0f034ef894 100644 --- a/java/java-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationInspection.java +++ b/java/java-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationInspection.java @@ -270,6 +270,15 @@ public class UnusedDeclarationInspection extends FilteringInspectionTool { } } + private static boolean isExternalizableNoParameterConstructor(PsiMethod method, RefClass refClass) { + if (!method.isConstructor()) return false; + if (!method.hasModifierProperty(PsiModifier.PUBLIC)) return false; + final PsiParameterList parameterList = method.getParameterList(); + if (parameterList.getParametersCount() != 0) return false; + final PsiClass aClass = method.getContainingClass(); + return aClass == null || isExternalizable(aClass, refClass); + } + private static boolean isSerializationImplicitlyUsedField(PsiField field) { @NonNls final String name = field.getName(); if (!HighlightUtil.SERIAL_VERSION_UID_FIELD_NAME.equals(name) && !"serialPersistentFields".equals(name)) return false; @@ -330,6 +339,15 @@ public class UnusedDeclarationInspection extends FilteringInspectionTool { return false; } + private static boolean isExternalizable(PsiClass aClass, RefClass refClass) { + final GlobalSearchScope scope = aClass.getResolveScope(); + final PsiClass externalizableClass = JavaPsiFacade.getInstance(aClass.getProject()).findClass("java.io.Externalizable", scope); + if (externalizableClass == null) { + return false; + } + return isSerializable(aClass, refClass, externalizableClass); + } + private static boolean isSerializable(PsiClass aClass, RefClass refClass, PsiClass serializableClass) { if (aClass == null) return false; if (aClass.isInheritor(serializableClass, true)) return true; @@ -600,7 +618,7 @@ public class UnusedDeclarationInspection extends FilteringInspectionTool { private static boolean isSerializablePatternMethod(PsiMethod psiMethod, RefClass refClass) { return isReadObjectMethod(psiMethod, refClass) || isWriteObjectMethod(psiMethod, refClass) || isReadResolveMethod(psiMethod, refClass) || - isWriteReplaceMethod(psiMethod, refClass); + isWriteReplaceMethod(psiMethod, refClass) || isExternalizableNoParameterConstructor(psiMethod, refClass); } private void enqueueMethodUsages(final RefMethod refMethod) { diff --git a/java/java-impl/src/com/intellij/codeInspection/redundantCast/RedundantCastInspection.java b/java/java-impl/src/com/intellij/codeInspection/redundantCast/RedundantCastInspection.java index d9003a471e1d..ed84a732f4b7 100644 --- a/java/java-impl/src/com/intellij/codeInspection/redundantCast/RedundantCastInspection.java +++ b/java/java-impl/src/com/intellij/codeInspection/redundantCast/RedundantCastInspection.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2012 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. @@ -24,7 +24,6 @@ import com.intellij.codeInspection.miscGenerics.SuspiciousCollectionsMethodCalls import com.intellij.codeInspection.ui.MultipleCheckboxOptionsPanel; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; -import com.intellij.openapi.util.Comparing; import com.intellij.openapi.util.WriteExternalException; import com.intellij.psi.*; import com.intellij.psi.util.PsiUtil; @@ -82,7 +81,7 @@ public class RedundantCastInspection extends GenericsInspectionToolBase { @Override public JComponent createOptionsPanel() { final MultipleCheckboxOptionsPanel optionsPanel = new MultipleCheckboxOptionsPanel(this); - optionsPanel.addCheckbox("Ignore casts appeared in suspicious collections method calls", "IGNORE_SUSPICIOUS_METHOD_CALLS"); + optionsPanel.addCheckbox("Ignore casts in suspicious collections method calls", "IGNORE_SUSPICIOUS_METHOD_CALLS"); optionsPanel.addCheckbox("Ignore casts to invoke @NotNull method which overrides @Nullable", "IGNORE_ANNOTATED_METHODS"); return optionsPanel; } diff --git a/java/java-impl/src/com/intellij/refactoring/makeStatic/MakeMethodStaticProcessor.java b/java/java-impl/src/com/intellij/refactoring/makeStatic/MakeMethodStaticProcessor.java index f4dc9bf994f6..bd8ed35c3cb7 100644 --- a/java/java-impl/src/com/intellij/refactoring/makeStatic/MakeMethodStaticProcessor.java +++ b/java/java-impl/src/com/intellij/refactoring/makeStatic/MakeMethodStaticProcessor.java @@ -167,9 +167,7 @@ public class MakeMethodStaticProcessor extends MakeMethodOrClassStaticProcessor< PsiReferenceExpression methodRef = (PsiReferenceExpression) element; PsiElement parent = methodRef.getParent(); - LOG.assertTrue(parent instanceof PsiMethodCallExpression); - PsiMethodCallExpression methodCall = (PsiMethodCallExpression) parent; PsiExpression instanceRef; instanceRef = methodRef.getQualifierExpression(); @@ -192,21 +190,25 @@ public class MakeMethodStaticProcessor extends MakeMethodOrClassStaticProcessor< if (mySettings.getNewParametersNumber() > 1) { int copyingSafetyLevel = RefactoringUtil.verifySafeCopyExpression(instanceRef); if (copyingSafetyLevel == RefactoringUtil.EXPR_COPY_PROHIBITED) { - String tempVar = RefactoringUtil.createTempVar(instanceRef, methodCall, true); + String tempVar = RefactoringUtil.createTempVar(instanceRef, parent, true); instanceRef = factory.createExpressionFromText(tempVar, null); } } PsiElement anchor = null; - PsiExpressionList argList = methodCall.getArgumentList(); - PsiExpression[] exprs = argList.getExpressions(); - if (mySettings.isMakeClassParameter()) { - if (exprs.length > 0) { - anchor = argList.addBefore(instanceRef, exprs[0]); - } - else { - anchor = argList.add(instanceRef); + PsiExpressionList argList = null; + PsiExpression[] exprs = new PsiExpression[0]; + if (parent instanceof PsiMethodCallExpression) { + argList = ((PsiMethodCallExpression)parent).getArgumentList(); + exprs = argList.getExpressions(); + if (mySettings.isMakeClassParameter()) { + if (exprs.length > 0) { + anchor = argList.addBefore(instanceRef, exprs[0]); + } + else { + anchor = argList.add(instanceRef); + } } } diff --git a/java/java-impl/src/com/intellij/refactoring/makeStatic/MakeStaticHandler.java b/java/java-impl/src/com/intellij/refactoring/makeStatic/MakeStaticHandler.java index b0dee3bfdd19..9b08c17dd5f5 100644 --- a/java/java-impl/src/com/intellij/refactoring/makeStatic/MakeStaticHandler.java +++ b/java/java-impl/src/com/intellij/refactoring/makeStatic/MakeStaticHandler.java @@ -31,14 +31,17 @@ import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.editor.ScrollType; +import com.intellij.openapi.progress.ProgressManager; import com.intellij.openapi.project.Project; import com.intellij.psi.*; import com.intellij.psi.codeStyle.JavaCodeStyleManager; import com.intellij.psi.codeStyle.VariableKind; +import com.intellij.psi.search.searches.MethodReferencesSearch; import com.intellij.refactoring.HelpID; import com.intellij.refactoring.RefactoringActionHandler; import com.intellij.refactoring.RefactoringBundle; import com.intellij.refactoring.util.CommonRefactoringUtil; +import com.intellij.util.Processor; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -83,7 +86,7 @@ public class MakeStaticHandler implements RefactoringActionHandler { invoke(member); } - public static void invoke(PsiTypeParameterListOwner member) { + public static void invoke(final PsiTypeParameterListOwner member) { final Project project = member.getProject(); final InternalUsageInfo[] classRefsInMember = MakeStaticUtil.findClassRefsInMember(member, false); @@ -95,7 +98,26 @@ public class MakeStaticHandler implements RefactoringActionHandler { AbstractMakeStaticDialog dialog; if (!ApplicationManager.getApplication().isUnitTestMode()) { - if (classRefsInMember.length > 0) { + final boolean[] hasMethodReferenceOnInstance = new boolean[] {false}; + if (member instanceof PsiMethod) { + if (!ProgressManager.getInstance().runProcessWithProgressSynchronously(new Runnable() { + @Override + public void run() { + hasMethodReferenceOnInstance[0] = !MethodReferencesSearch.search((PsiMethod)member).forEach(new Processor() { + @Override + public boolean process(PsiReference reference) { + final PsiElement element = reference.getElement(); + if (element instanceof PsiMethodReferenceExpression) { + return false; + } + return true; + } + }); + } + }, "Search for method references", true, project)) return; + } + + if (classRefsInMember.length > 0 || hasMethodReferenceOnInstance[0]) { final PsiType type = JavaPsiFacade.getInstance(project).getElementFactory().createType(member.getContainingClass()); //TODO: callback String[] nameSuggestions = diff --git a/java/java-tests/testData/refactoring/makeMethodStatic/afterMethodReference.java b/java/java-tests/testData/refactoring/makeMethodStatic/afterMethodReference.java new file mode 100644 index 000000000000..033185957bd5 --- /dev/null +++ b/java/java-tests/testData/refactoring/makeMethodStatic/afterMethodReference.java @@ -0,0 +1,9 @@ +class Test4 { + void test() { + Foo2 f = Test4::yyy; + } + static void yyy(Test4 anObject) {} +} +interface Foo2 { + void bar(T j); +} \ No newline at end of file diff --git a/java/java-tests/testData/refactoring/makeMethodStatic/beforeMethodReference.java b/java/java-tests/testData/refactoring/makeMethodStatic/beforeMethodReference.java new file mode 100644 index 000000000000..15f3172314a0 --- /dev/null +++ b/java/java-tests/testData/refactoring/makeMethodStatic/beforeMethodReference.java @@ -0,0 +1,9 @@ +class Test4 { + void test() { + Foo2 f = Test4::yyy; + } + void yyy() {} +} +interface Foo2 { + void bar(T j); +} \ No newline at end of file diff --git a/java/java-tests/testSrc/com/intellij/refactoring/MakeMethodStaticTest.java b/java/java-tests/testSrc/com/intellij/refactoring/MakeMethodStaticTest.java index 8a13016944f3..db89b9420021 100644 --- a/java/java-tests/testSrc/com/intellij/refactoring/MakeMethodStaticTest.java +++ b/java/java-tests/testSrc/com/intellij/refactoring/MakeMethodStaticTest.java @@ -19,7 +19,6 @@ import com.intellij.JavaTestUtil; import com.intellij.codeInsight.TargetElementUtilBase; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiMethod; -import com.intellij.psi.PsiTypeParameterListOwner; import com.intellij.refactoring.makeStatic.MakeMethodStaticProcessor; import com.intellij.refactoring.makeStatic.MakeStaticUtil; import com.intellij.refactoring.makeStatic.Settings; @@ -186,13 +185,21 @@ public class MakeMethodStaticTest extends LightRefactoringTestCase { assertFalse(MakeStaticUtil.isParameterNeeded((PsiMethod)element)); } + public void testMethodReference() throws Exception { + doTest(true); + } + public void testPreserveParametersAlignment() throws Exception { doTest(); } private void doTest() throws Exception { + doTest(false); + } + + private void doTest(final boolean addClassParameter) throws Exception { configureByFile("/refactoring/makeMethodStatic/before" + getTestName(false) + ".java"); - perform(false); + perform(addClassParameter); checkResultByFile("/refactoring/makeMethodStatic/after" + getTestName(false) + ".java"); } diff --git a/jps/jps-builders/src/org/jetbrains/jps/incremental/java/JavaBuilder.java b/jps/jps-builders/src/org/jetbrains/jps/incremental/java/JavaBuilder.java index a224ba271caa..d33844602abf 100644 --- a/jps/jps-builders/src/org/jetbrains/jps/incremental/java/JavaBuilder.java +++ b/jps/jps-builders/src/org/jetbrains/jps/incremental/java/JavaBuilder.java @@ -358,7 +358,7 @@ public class JavaBuilder extends ModuleLevelBuilder { context.checkCanceled(); - if (!forms.isEmpty() || addNotNullAssertions) { + if (diagnosticSink.getErrorCount() == 0 && (!forms.isEmpty() || addNotNullAssertions)) { final Map chunkSourcePath = ProjectPaths.getSourceRootsWithDependents(chunk); final InstrumentationClassFinder finder = createInstrumentationClassFinder(platformCp, classpath, chunkSourcePath, outputSink); @@ -367,8 +367,7 @@ public class JavaBuilder extends ModuleLevelBuilder { try { context.processMessage(new ProgressMessage("Instrumenting forms [" + chunkName + "]")); instrumentForms(context, chunk, chunkSourcePath, finder, forms, outputSink); - JpsUiDesignerConfiguration configuration = JpsUiDesignerExtensionService.getInstance().getUiDesignerConfiguration( - pd.getProject()); + JpsUiDesignerConfiguration configuration = JpsUiDesignerExtensionService.getInstance().getUiDesignerConfiguration(pd.getProject()); if (configuration != null && configuration.isCopyFormsRuntimeToOutput()) { for (ModuleBuildTarget target : chunk.getTargets()) { if (!target.isTests()) { diff --git a/platform/lang-impl/src/com/intellij/application/options/TabbedLanguageCodeStylePanel.java b/platform/lang-impl/src/com/intellij/application/options/TabbedLanguageCodeStylePanel.java index 207e393d40c6..85afce18b3e9 100644 --- a/platform/lang-impl/src/com/intellij/application/options/TabbedLanguageCodeStylePanel.java +++ b/platform/lang-impl/src/com/intellij/application/options/TabbedLanguageCodeStylePanel.java @@ -17,6 +17,7 @@ package com.intellij.application.options; import com.intellij.application.options.codeStyle.*; import com.intellij.lang.Language; +import com.intellij.openapi.Disposable; import com.intellij.openapi.application.ApplicationBundle; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.editor.colors.EditorColorsScheme; @@ -482,6 +483,13 @@ public abstract class TabbedLanguageCodeStylePanel extends CodeStyleAbstractPane public ConfigurableWrapper(@NotNull Configurable configurable, CodeStyleSettings settings) { super(settings); myConfigurable = configurable; + + Disposer.register(this, new Disposable() { + @Override + public void dispose() { + myConfigurable.disposeUIResources(); + } + }); } @Override diff --git a/platform/platform-impl/src/com/intellij/ide/plugins/InstalledPluginsTableModel.java b/platform/platform-impl/src/com/intellij/ide/plugins/InstalledPluginsTableModel.java index 0bc4b1ff33ed..f550aaac0de2 100644 --- a/platform/platform-impl/src/com/intellij/ide/plugins/InstalledPluginsTableModel.java +++ b/platform/platform-impl/src/com/intellij/ide/plugins/InstalledPluginsTableModel.java @@ -105,7 +105,7 @@ public class InstalledPluginsTableModel extends PluginTableModel { return false; } - public static void updateExistingPlugin(IdeaPluginDescriptor descriptor, IdeaPluginDescriptor existing) { + public static void updateExistingPlugin(IdeaPluginDescriptor descriptor, @Nullable IdeaPluginDescriptor existing) { if (existing != null) { updateExistingPluginInfo(descriptor, existing); updatedPlugins.add(existing.getPluginId()); diff --git a/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateChecker.java b/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateChecker.java index 30ce19603e6d..f76079ccd92d 100644 --- a/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateChecker.java +++ b/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateChecker.java @@ -601,14 +601,16 @@ public final class UpdateChecker { boolean installed = false; for (PluginDownloader downloader : downloaders) { if (getDisabledToUpdatePlugins().contains(downloader.getPluginId())) continue; - try { - final IdeaPluginDescriptor descriptor = downloader.getDescriptor(); - InstalledPluginsTableModel.updateExistingPlugin(descriptor, PluginManager.getPlugin(descriptor.getPluginId())); - downloader.install(); - installed = true; - } - catch (IOException e) { - LOG.info(e); + final IdeaPluginDescriptor descriptor = downloader.getDescriptor(); + if (descriptor != null) { + try { + InstalledPluginsTableModel.updateExistingPlugin(descriptor, PluginManager.getPlugin(descriptor.getPluginId())); + downloader.install(); + installed = true; + } + catch (IOException e) { + LOG.info(e); + } } } return installed; diff --git a/platform/projectModel-api/src/com/intellij/ide/highlighter/ProjectFileType.java b/platform/projectModel-api/src/com/intellij/ide/highlighter/ProjectFileType.java index 6284fc653a17..43f5958808d5 100644 --- a/platform/projectModel-api/src/com/intellij/ide/highlighter/ProjectFileType.java +++ b/platform/projectModel-api/src/com/intellij/ide/highlighter/ProjectFileType.java @@ -45,7 +45,7 @@ public class ProjectFileType implements InternalFileType { } public Icon getIcon() { - return AllIcons.Nodes.IdeaProject; + return AllIcons.Nodes.IdeaModule; } public boolean isBinary() { diff --git a/plugins/InspectionGadgets/src/com/siyeh/ig/j2me/SimplifiableIfStatementInspection.java b/plugins/InspectionGadgets/src/com/siyeh/ig/j2me/SimplifiableIfStatementInspection.java index c490e76bdce1..3946a0bebb52 100644 --- a/plugins/InspectionGadgets/src/com/siyeh/ig/j2me/SimplifiableIfStatementInspection.java +++ b/plugins/InspectionGadgets/src/com/siyeh/ig/j2me/SimplifiableIfStatementInspection.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2011 Bas Leijdekkers + * Copyright 2006-2012 Bas Leijdekkers * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,8 +36,7 @@ public class SimplifiableIfStatementInspection extends BaseInspection { @Override @NotNull public String getDisplayName() { - return InspectionGadgetsBundle.message( - "simplifiable.if.statement.display.name"); + return InspectionGadgetsBundle.message("simplifiable.if.statement.display.name"); } @Override @@ -175,23 +174,31 @@ public class SimplifiableIfStatementInspection extends BaseInspection { return builder.toString(); } - private static void getPresentableText(PsiElement element, StringBuilder builder) { + private static void getPresentableText(@Nullable PsiElement element, StringBuilder builder) { if (element == null) { return; } if (element instanceof PsiWhiteSpace) { + final PsiElement prevSibling = element.getPrevSibling(); + if (prevSibling instanceof PsiComment) { + final PsiComment comment = (PsiComment)prevSibling; + if (JavaTokenType.END_OF_LINE_COMMENT.equals(comment.getTokenType())) { + builder.append('\n'); + return; + } + } builder.append(' '); return; } final PsiElement[] children = element.getChildren(); - if (children.length != 0) { + if (children.length == 0) { + builder.append(element.getText()); + } + else { for (PsiElement child : children) { getPresentableText(child, builder); } } - else { - builder.append(element.getText()); - } } @@ -258,10 +265,10 @@ public class SimplifiableIfStatementInspection extends BaseInspection { private static class SimplifiableIfStatementFix extends InspectionGadgetsFix { + @Override @NotNull public String getName() { - return InspectionGadgetsBundle.message( - "constant.conditional.expression.simplify.quickfix"); + return InspectionGadgetsBundle.message("constant.conditional.expression.simplify.quickfix"); } @Override diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AbsoluteAlignmentInUserInterface.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AbsoluteAlignmentInUserInterface.html index b8f077cbb07b..ad23d1591d53 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AbsoluteAlignmentInUserInterface.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AbsoluteAlignmentInUserInterface.html @@ -1,6 +1,6 @@ -This inspection reports usages of absolute alignment constants from AWT and Swing. Internationalized applications should make use of +Reports usages of absolute alignment constants from AWT and Swing. Internationalized applications should make use of relative alignment, because it respects locale component orientation settings.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractClassExtendsConcreteClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractClassExtendsConcreteClass.html index 048db14336ad..f7e86c126f8c 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractClassExtendsConcreteClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractClassExtendsConcreteClass.html @@ -1,6 +1,6 @@ -This inspection reports abstract classes which extend concrete classes. +Reports abstract classes which extend concrete classes.

Powered by InspectionGadgets diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractClassNeverImplemented.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractClassNeverImplemented.html index f376345bc0a6..ce076a41378e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractClassNeverImplemented.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractClassNeverImplemented.html @@ -1,6 +1,6 @@ -This inspection reports abstract classes which have no +Reports abstract classes which have no concrete subclasses.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractClassWithOnlyOneDirectInheritor.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractClassWithOnlyOneDirectInheritor.html index b3e221670183..41f07bbdb33f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractClassWithOnlyOneDirectInheritor.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractClassWithOnlyOneDirectInheritor.html @@ -3,7 +3,7 @@ This inspection is intended for J2ME and other highly resource constrained environments. Applying the results of this inspection without consideration might have negative effects on code clarity and design.

-This inspection reports abstract classes which have precisely one +Reports abstract classes which have precisely one direct inheritor. While such classes may offer admirable clarity of design, in memory-constrained or bandwidth-limited environments, they needlessly increase the total footprint of the application. Consider merging the abstract class with its inheritor. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractClassWithoutAbstractMethods.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractClassWithoutAbstractMethods.html index 5b4a91ebfa03..39fff09deefc 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractClassWithoutAbstractMethods.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractClassWithoutAbstractMethods.html @@ -1,6 +1,6 @@ -This inspection reports abstract classes without abstract methods. +Reports abstract classes without abstract methods.

Powered by InspectionGadgets diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractMethodCallInConstructor.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractMethodCallInConstructor.html index d48a2e44b3e8..1d1eb80747df 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractMethodCallInConstructor.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractMethodCallInConstructor.html @@ -1,6 +1,6 @@ -This inspection reports any calls of abstract methods within a constructor of an +Reports any calls of abstract methods within a constructor of an abstract class. Such calls may result in subtle bugs, as the object is not guaranteed to be initialized before the method call occurs. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractMethodOverridesAbstractMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractMethodOverridesAbstractMethod.html index 414cf09d5f8b..4c1218701baf 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractMethodOverridesAbstractMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractMethodOverridesAbstractMethod.html @@ -1,6 +1,6 @@ -This inspection reports abstract methods which override abstract methods. Methods with +Reports abstract methods which override abstract methods. Methods with different return types or exception declarations than the method they override are not reported by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractMethodOverridesConcreteMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractMethodOverridesConcreteMethod.html index e24f5d3730bf..9a2e3bdb7984 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractMethodOverridesConcreteMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractMethodOverridesConcreteMethod.html @@ -1,6 +1,6 @@ -This inspection reports abstract methods which override concrete methods. +Reports abstract methods which override concrete methods. Methods overridden from java.lang.Object are not reported by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractMethodWithMissingImplementations.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractMethodWithMissingImplementations.html index e82aaf50701c..334f803ef457 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractMethodWithMissingImplementations.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractMethodWithMissingImplementations.html @@ -1,6 +1,6 @@ -This inspection reports any abstract methods which are not implemented in every concrete +Reports any abstract methods which are not implemented in every concrete subclass. This is a compile-time error on the subclasses, while this inspection reports the problem at the point of the abstract method. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AccessToNonThreadSafeStaticFieldFromInstance.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AccessToNonThreadSafeStaticFieldFromInstance.html index c8d7b9c1d532..6ecb309b89cb 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AccessToNonThreadSafeStaticFieldFromInstance.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AccessToNonThreadSafeStaticFieldFromInstance.html @@ -1,6 +1,6 @@ -This inspection reports on any access to a static field +Reports on any access to a static field of any non-threadsafe type specified below, which is accessed from an instance field or a non-synchronized block. It is possible that the static field is accessed from multiple threads, which can lead to unspecified side effects. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AccessToStaticFieldLockedOnInstance.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AccessToStaticFieldLockedOnInstance.html index b80c141def96..7231f599027c 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AccessToStaticFieldLockedOnInstance.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AccessToStaticFieldLockedOnInstance.html @@ -1,6 +1,6 @@ -This inspection reports on any access to a non-constant static field which is +Reports on any access to a non-constant static field which is locked on either this or an instance field of this. Locking a static field on instance data does not prevent the field from being modified by other instances, and thus may result in surprising race conditions. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AmbiguousFieldAccess.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AmbiguousFieldAccess.html index feeb51174161..50f48488edc7 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AmbiguousFieldAccess.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AmbiguousFieldAccess.html @@ -1,6 +1,6 @@ -This inspection reports field accesses of a super class where a local variable, parameter or field of the same name is available +Reports field accesses of a super class where a local variable, parameter or field of the same name is available in the surrounding class. In this case a cursory reader of the code may think that a variable in the surrounding class is accessed, when in fact a field from the super class is accessed. To make the intent of the code more clear it is recommended to add a this qualifier to the field access call. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AmbiguousMethodCall.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AmbiguousMethodCall.html index 60f14823a34a..82b3a24ead63 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AmbiguousMethodCall.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AmbiguousMethodCall.html @@ -1,6 +1,6 @@ -This inspection reports any method calls to super methods where a method +Reports any method calls to super methods where a method with the same name is available in the surrounding class. In this case a cursory reader of the code may think that a method in the surrounding class is called, when in fact a method from the super class is called. To make the diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/Annotation.html b/plugins/InspectionGadgets/src/inspectionDescriptions/Annotation.html index 8897b1eb04ce..9892b6ed85fb 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/Annotation.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/Annotation.html @@ -1,6 +1,6 @@ -This inspection reports any uses of annotations. +Reports any uses of annotations. Annotations are not supported under Java 1.4 or earlier JVMs.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AnnotationClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AnnotationClass.html index 9500c4943f26..6bad5d4bb509 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AnnotationClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AnnotationClass.html @@ -1,6 +1,6 @@ -This inspection reports annotation interfaces. +Reports annotation interfaces. Such interfaces are not supported under Java 1.4 or earlier JVMs.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AnnotationNamingConvention.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AnnotationNamingConvention.html index 66ec962d05db..5868ee95bce2 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AnnotationNamingConvention.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AnnotationNamingConvention.html @@ -1,6 +1,6 @@ -This inspection reports annotation classes whose names are either too short, too long, or do not follow +Reports annotation classes whose names are either too short, too long, or do not follow the specified regular expression pattern.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AnonymousClassComplexity.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AnonymousClassComplexity.html index b191aa95ca6a..ff78e208becc 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AnonymousClassComplexity.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AnonymousClassComplexity.html @@ -1,6 +1,6 @@ -This inspection reports anonymous inner classes with too high of a total complexity. The +Reports anonymous inner classes with too high of a total complexity. The total complexity of a class is the sum of the cyclomatic complexities of all the methods and initializers the class declares. Inherited methods and initializers are not counted toward the total complexity. Anonymous classes with more than very low complexities may be diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AnonymousClassMethodCount.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AnonymousClassMethodCount.html index 4263cb93b908..6ba388da5fb1 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AnonymousClassMethodCount.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AnonymousClassMethodCount.html @@ -1,6 +1,6 @@ -This inspection reports anonymous inner class with too many methods. +Reports anonymous inner class with too many methods. Anonymous classes with more than a very low number of methods may be difficult to understand, and should probably be promoted to become named inner classes. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AnonymousClassVariableHidesContainingMethodVariable.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AnonymousClassVariableHidesContainingMethodVariable.html index 06f514b4b017..fd91e739c055 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AnonymousClassVariableHidesContainingMethodVariable.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AnonymousClassVariableHidesContainingMethodVariable.html @@ -1,6 +1,6 @@ -This inspection reports anonymous class variables being named identically to variables of a containing method. +Reports anonymous class variables being named identically to variables of a containing method. Such a variable name may be confusing.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AnonymousInnerClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AnonymousInnerClass.html index 32a72153d559..48a556821b0e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AnonymousInnerClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AnonymousInnerClass.html @@ -1,6 +1,6 @@ -This inspection reports any anonymous inner classes. +Reports any anonymous inner classes. Some code standards discourage the use of anonymous inner classes.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AnonymousInnerClassMayBeStatic.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AnonymousInnerClassMayBeStatic.html index c9d5655ba410..800c58452b54 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AnonymousInnerClassMayBeStatic.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AnonymousInnerClassMayBeStatic.html @@ -3,7 +3,7 @@ This inspection is intended for J2ME and other highly resource constrained environments. Applying the results of this inspection without consideration might have negative effects on code clarity and design.

-This inspection reports any anonymous inner classes which may safely be made into a named +Reports any anonymous inner classes which may safely be made into a named static inner class. An inner class may be static if it doesn't reference its enclosing class instance or local variables. A static inner class uses slightly less memory. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ArchaicSystemPropertyAccess.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ArchaicSystemPropertyAccess.html index 379e16d4eed6..593c93c2acba 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ArchaicSystemPropertyAccess.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ArchaicSystemPropertyAccess.html @@ -1,6 +1,6 @@ -This inspection reports any calls to Integer.getInteger() or Boolean.getBoolean(). +Reports any calls to Integer.getInteger() or Boolean.getBoolean(). These methods fetch integer and boolean values from the system properties for a given key. Due to their underexpressive names and confusing location of functionality, it's easy for novice programmers to attempt to use these diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ArrayEquality.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ArrayEquality.html index 5254963d52e0..253ad5b9fbe9 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ArrayEquality.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ArrayEquality.html @@ -1,6 +1,6 @@ -This inspection reports any use of == to test for Array equality, +Reports any use of == to test for Array equality, rather than the "java.util.Arrays.equals()" method.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ArrayEquals.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ArrayEquals.html index f669c81c2393..7fa82e5de42f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ArrayEquals.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ArrayEquals.html @@ -1,6 +1,6 @@ -This inspection reports equals() being called +Reports equals() being called to compare two arrays. Calling equals() on an array compares identity and is equivalent to using ==. Use Arrays.equals() to compare the contents of two arrays diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ArrayHashCode.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ArrayHashCode.html index 7612809e4a6b..2c439ada20f0 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ArrayHashCode.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ArrayHashCode.html @@ -1,6 +1,6 @@ -This inspection reports hashCode() being called +Reports hashCode() being called on an array. To get the same hash code for two arrays with identical contents call Arrays.hashCode(). Use Arrays.deepHashCode() to calculate the hash diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ArrayLengthInLoopCondition.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ArrayLengthInLoopCondition.html index 7530079c4a06..00dcf390706b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ArrayLengthInLoopCondition.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ArrayLengthInLoopCondition.html @@ -3,7 +3,7 @@ This inspection is intended for J2ME and other highly resource constrained environments. Applying the results of this inspection without consideration might have negative effects on code clarity and design.

-This inspection reports any access to the .length of an array in the condition part of a +Reports any access to the .length of an array in the condition part of a loop statement. In highly resource constrained environments, such calls may have adverse performance implications. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ArraysAsListWithZeroOrOneArgument.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ArraysAsListWithZeroOrOneArgument.html index bffd6b70e9ba..14022859518a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ArraysAsListWithZeroOrOneArgument.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ArraysAsListWithZeroOrOneArgument.html @@ -1,6 +1,6 @@ -This inspection reports any calls to Arrays.asList() with zero arguments or only one argument. Such calls could be replaced +Reports any calls to Arrays.asList() with zero arguments or only one argument. Such calls could be replaced with either a call to Collections.singletonList() or Collections.emptyList() which will save some memory.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AssertAsName.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AssertAsName.html index e1f3f3d7ac2d..20150c46ba35 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AssertAsName.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AssertAsName.html @@ -1,6 +1,6 @@ -This inspection reports variables, methods, or classes named +Reports variables, methods, or classes named assert. Such names are legal under Java 1.3 or earlier JVMs, but will cause problems under Java 1.4 or later. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AssertEqualsBetweenInconvertibleTypes.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AssertEqualsBetweenInconvertibleTypes.html index 105ecb0a2b50..57aa66ec2d4e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AssertEqualsBetweenInconvertibleTypes.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AssertEqualsBetweenInconvertibleTypes.html @@ -1,6 +1,6 @@ -This inspection reports any calls to JUnit's assertEquals() +Reports any calls to JUnit's assertEquals() method where the expected result and actual result arguments are of incompatible types. While such a call might theoretically be useful, most likely it represents a bug. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AssertEqualsCalledOnArray.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AssertEqualsCalledOnArray.html index 1da4deb18939..29e2db67e527 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AssertEqualsCalledOnArray.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AssertEqualsCalledOnArray.html @@ -1,6 +1,6 @@ -This inspection reports any calls to JUnit's assertEquals() +Reports any calls to JUnit's assertEquals() method with arguments of type array. Arrays should be checked with one of the assertArrayEquals() methods. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AssertEqualsMayBeAssertSame.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AssertEqualsMayBeAssertSame.html index 08f1a1eaf99e..7be047fa4d87 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AssertEqualsMayBeAssertSame.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AssertEqualsMayBeAssertSame.html @@ -1,6 +1,6 @@ -This inspection reports any calls to org.junit.Assert.assertEquals() +Reports any calls to org.junit.Assert.assertEquals() or junit.framework.Assert.assertEquals() which can be replaced with an equivalent call to assertSame(). This is possible when the arguments are instances of a final class which does not override diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AssertStatement.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AssertStatement.html index 4f9996911b21..15092a366659 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AssertStatement.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AssertStatement.html @@ -1,6 +1,6 @@ -This inspection reports assert statements. +Reports assert statements. Such statements are not supported under Java 1.3 or earlier JVMs.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AssertWithSideEffects.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AssertWithSideEffects.html index cd9b6022fe1f..7b179f681cf8 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AssertWithSideEffects.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AssertWithSideEffects.html @@ -1,6 +1,6 @@ -This inspection reports any assert statements +Reports any assert statements that cause side effects outside of the assert statement. Since assertions can be switched off, the side effects are not guaranteed to happen and can cause subtle bugs. Common unwanted side effects detected by this inspection are modifications of variables diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AssertsWithoutMessages.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AssertsWithoutMessages.html index bdc0e5b2f78e..67faa0d730b1 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AssertsWithoutMessages.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AssertsWithoutMessages.html @@ -1,6 +1,6 @@ -This inspection reports calls to JUnit assertXXX() or fail() methods that do not have an error message string argument. +Reports calls to JUnit assertXXX() or fail() methods that do not have an error message string argument. An error message on assertion failure may help clarify the test case's intent.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToCatchBlockParameter.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToCatchBlockParameter.html index ae41b029cd0f..e47901700c9a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToCatchBlockParameter.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToCatchBlockParameter.html @@ -1,6 +1,6 @@ -This inspection reports assignment to variable declared as a catch block parameter. +Reports assignment to variable declared as a catch block parameter. While occasionally intended, this construct can be confusing.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToCollectionFieldFromParameter.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToCollectionFieldFromParameter.html index e57073ae82ab..0662276e44d3 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToCollectionFieldFromParameter.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToCollectionFieldFromParameter.html @@ -1,6 +1,6 @@ -This inspection reports any attempt to assign an array or Collection field from a method parameter. +Reports any attempt to assign an array or Collection field from a method parameter. Since the array or Collection may have its contents modified by the calling method, this construct may result in an object having its state modified unexpectedly. While occasionally useful for performance reasons, this construct is inherently bug-prone. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToDateFieldFromParameter.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToDateFieldFromParameter.html index 44a64b0083fc..cc1003b35d1e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToDateFieldFromParameter.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToDateFieldFromParameter.html @@ -1,6 +1,6 @@ -This inspection reports any attempt to assign a java.lang.Date or +Reports any attempt to assign a java.lang.Date or java.lang.Calendar field from a method parameter. Since Date or Calendar are often treated as immutable values but are actually mutable, assigning to such a field from a method parameter may diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToForLoopParameter.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToForLoopParameter.html index c11f72964547..94c4d40a0de7 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToForLoopParameter.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToForLoopParameter.html @@ -1,6 +1,6 @@ -This inspection reports assignment a variable declared in a for statement +Reports assignment a variable declared in a for statement in the body of that statement. It also reports any attempt to increment or decrement the variable. While occasionally intended, this construct can be extremely confusing, and is often the result of a typo. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToMethodParameter.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToMethodParameter.html index 4b011915e702..9139a9d0075e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToMethodParameter.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToMethodParameter.html @@ -1,6 +1,6 @@ -This inspection reports assignment to a +Reports assignment to a variable declared as a method parameter. It also reports any attempt to increment or decrement the variable. While occasionally intended, this construct can be extremely confusing, and is often the result of a typo. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToNull.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToNull.html index f334cf99cafc..0ddd836b10ce 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToNull.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToNull.html @@ -1,6 +1,6 @@ -This inspection reports the assignment of a variable to +Reports the assignment of a variable to null, outside of declarations. While occasionally useful for triggering garbage collection, this construct may make the code more prone diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToStaticFieldFromInstanceMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToStaticFieldFromInstanceMethod.html index 24bbbda8b706..9e049f3c3e60 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToStaticFieldFromInstanceMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentToStaticFieldFromInstanceMethod.html @@ -1,6 +1,6 @@ -This inspection reports any assignments to static fields from within +Reports any assignments to static fields from within instance methods. While legal, such assignments are tricky to do safely, and are often a result of fields being inadvertently marked static. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentUsedAsCondition.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentUsedAsCondition.html index 0fdc942c68be..6bf27a16cda6 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentUsedAsCondition.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AssignmentUsedAsCondition.html @@ -1,6 +1,6 @@ -This inspection reports an assignment being +Reports an assignment being used as the condition of an if, while, for or do statement. While occasionally intended, this usage is confusing, and often indicates a typo diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AutoBoxing.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AutoBoxing.html index a0a76015fe51..947a583b882b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AutoBoxing.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AutoBoxing.html @@ -1,6 +1,6 @@ -This inspection reports "auto-boxing", i.e. the automatic wrapping of primitive values as objects, where needed. +Reports "auto-boxing", i.e. the automatic wrapping of primitive values as objects, where needed. Code which relies on auto-boxing will not work in pre-Java 5.0 environments.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AutoUnboxing.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AutoUnboxing.html index 30d5516e3e36..62ace95d3849 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AutoUnboxing.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AutoUnboxing.html @@ -1,6 +1,6 @@ -This inspection reports "auto-unboxing", e.g. the automatic unwrapping of objects into primitive values, where needed. +Reports "auto-unboxing", e.g. the automatic unwrapping of objects into primitive values, where needed. Code which relies on auto-boxing will not work in pre-Java 5.0 environments.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AwaitNotInLoop.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AwaitNotInLoop.html index 1e1a328988f3..be1242a4f5f4 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AwaitNotInLoop.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AwaitNotInLoop.html @@ -1,6 +1,6 @@ -This inspection reports on any call to java.util.concurrent.locks.Condition.await() not made inside a loop. +Reports on any call to java.util.concurrent.locks.Condition.await() not made inside a loop. await() and related methods are normally used to suspend a thread until a condition is signalled as true, and that condition should be checked after the await() returns. A loop is the clearest way to achieve this. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AwaitWithoutCorrespondingSignal.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AwaitWithoutCorrespondingSignal.html index 484570eb4cf1..330165ea99a9 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AwaitWithoutCorrespondingSignal.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AwaitWithoutCorrespondingSignal.html @@ -1,6 +1,6 @@ -This inspection reports on any call to Condition.signal() +Reports on any call to Condition.signal() or Condition.signalAll() for which no call to a corresponding Condition.await() can be found. Only calls which target fields of the current class are reported by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/BadExceptionCaught.html b/plugins/InspectionGadgets/src/inspectionDescriptions/BadExceptionCaught.html index aaf157e4ec57..46d30f4f61d3 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/BadExceptionCaught.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/BadExceptionCaught.html @@ -1,6 +1,6 @@ -This inspection reports catch clauses +Reports catch clauses which catch inappropriate exceptions. Some exceptions, for instance java.lang.NullPointerException and java.lang.IllegalMonitorStateException represent programming errors diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/BadExceptionDeclared.html b/plugins/InspectionGadgets/src/inspectionDescriptions/BadExceptionDeclared.html index dcc66510d848..efba188b6f81 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/BadExceptionDeclared.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/BadExceptionDeclared.html @@ -1,6 +1,6 @@ -This inspection reports inappropriate exceptions declared by methods. One use of this inspection would be to warn of +Reports inappropriate exceptions declared by methods. One use of this inspection would be to warn of throws clauses which declare overly generic exceptions (e.g. java.lang.Exception or java.lang.Throwable).

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/BadExceptionThrown.html b/plugins/InspectionGadgets/src/inspectionDescriptions/BadExceptionThrown.html index 1dbe08a6c3c0..4d8043e5b43d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/BadExceptionThrown.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/BadExceptionThrown.html @@ -1,6 +1,6 @@ -This inspection reports throw statements +Reports throw statements which throw inappropriate exceptions. One use of this inspection would be to warn of throw statements which throw overly generic exceptions (e.g. java.lang.Exception or java.io.IOException). diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/BadOddness.html b/plugins/InspectionGadgets/src/inspectionDescriptions/BadOddness.html index e3be8a7b2960..809439d82ecb 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/BadOddness.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/BadOddness.html @@ -1,6 +1,6 @@ -This inspection reports any checks for oddness of the form: +Reports any checks for oddness of the form:

x % 2 == 1
Such checks will fail for negative odd values, which is probably not the behaviour intended. Consider using:
x % 2 != 0
or:
(x & 1) == 1
instead. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/BeforeClassOrAfterClassIsPublicStaticVoidNoArg.html b/plugins/InspectionGadgets/src/inspectionDescriptions/BeforeClassOrAfterClassIsPublicStaticVoidNoArg.html index 660b1c41bdc3..c7521fa36d46 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/BeforeClassOrAfterClassIsPublicStaticVoidNoArg.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/BeforeClassOrAfterClassIsPublicStaticVoidNoArg.html @@ -1,6 +1,6 @@ -This inspection reports JUnit 4.0 @BeforeClass or @AfterClass method +Reports JUnit 4.0 @BeforeClass or @AfterClass method is not declared public static, does not return void, or takes arguments. Such methods are easy to create inadvertently, and will not be executed by JUnit tests runners. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/BeforeOrAfterIsPublicVoidNoArg.html b/plugins/InspectionGadgets/src/inspectionDescriptions/BeforeOrAfterIsPublicVoidNoArg.html index 5e60068122c0..95abe77d65ee 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/BeforeOrAfterIsPublicVoidNoArg.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/BeforeOrAfterIsPublicVoidNoArg.html @@ -1,6 +1,6 @@ -This inspection reports JUnit 4.0 @Before or @After method +Reports JUnit 4.0 @Before or @After method is not declared public, does not return void, or takes arguments. Such methods are easy to create inadvertently, and will not be executed by JUnit tests runners. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/BigDecimalEquals.html b/plugins/InspectionGadgets/src/inspectionDescriptions/BigDecimalEquals.html index 96e143dc66eb..ba70c2f4f11d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/BigDecimalEquals.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/BigDecimalEquals.html @@ -1,6 +1,6 @@ -This inspection reports .equals() being called +Reports .equals() being called to compare two java.math.BigDecimal numbers. This is normally a mistake, as two java.math.BigDecimals are only equal if they are equal in both value and scale, so that 2.0 is not equal to 2.00 diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/BooleanConstructor.html b/plugins/InspectionGadgets/src/inspectionDescriptions/BooleanConstructor.html index 389c43c7bcd2..8721643a2f53 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/BooleanConstructor.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/BooleanConstructor.html @@ -1,6 +1,6 @@ -This inspection reports any attempt to instantiate a new Boolean +Reports any attempt to instantiate a new Boolean object. Constructing new Boolean objects is rarely necessary, and may cause performance problems if done often enough. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/BooleanMethodIsAlwaysInverted.html b/plugins/InspectionGadgets/src/inspectionDescriptions/BooleanMethodIsAlwaysInverted.html index e2e25891201b..05186ba4486d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/BooleanMethodIsAlwaysInverted.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/BooleanMethodIsAlwaysInverted.html @@ -1,6 +1,6 @@ -This inspection reports methods with a boolean return type +Reports methods with a boolean return type the usages of which always occur in negated context. Since this inspection requires global code analysis, it is only available in batch inspection mode.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/BooleanMethodNameMustStartWithQuestion.html b/plugins/InspectionGadgets/src/inspectionDescriptions/BooleanMethodNameMustStartWithQuestion.html index a6ee832de6b9..d10fa441fee9 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/BooleanMethodNameMustStartWithQuestion.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/BooleanMethodNameMustStartWithQuestion.html @@ -1,6 +1,6 @@ -This inspection reports boolean methods whose names do not start with a question +Reports boolean methods whose names do not start with a question word. Boolean methods that override library methods are ignored by this inspection.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/BooleanVariableAlwaysNegated.html b/plugins/InspectionGadgets/src/inspectionDescriptions/BooleanVariableAlwaysNegated.html index 745938fe47c1..bb55c91752d8 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/BooleanVariableAlwaysNegated.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/BooleanVariableAlwaysNegated.html @@ -1,6 +1,6 @@ -This inspection reports any boolean variables or fields which are always negated +Reports any boolean variables or fields which are always negated when its value is used.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/BoxingBoxedValue.html b/plugins/InspectionGadgets/src/inspectionDescriptions/BoxingBoxedValue.html index 6fa5b3092cb9..2b886793f928 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/BoxingBoxedValue.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/BoxingBoxedValue.html @@ -1,6 +1,6 @@ -This inspection reports boxing of already boxed values. This is a useless +Reports boxing of already boxed values. This is a useless operation since any boxed value will first be auto-unboxed before boxing the value again. If done inside an inner loop such code may cause performance problems. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/BreakStatement.html b/plugins/InspectionGadgets/src/inspectionDescriptions/BreakStatement.html index 2167c84064b0..4e53e59cb92b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/BreakStatement.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/BreakStatement.html @@ -1,6 +1,6 @@ -This inspection reports break statements, +Reports break statements, other than at the end of a switch statement branch. break statements complicate refactoring, and can be confusing. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/BreakStatementWithLabel.html b/plugins/InspectionGadgets/src/inspectionDescriptions/BreakStatementWithLabel.html index 6b9578dcea8b..ed4169ddd9c3 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/BreakStatementWithLabel.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/BreakStatementWithLabel.html @@ -1,6 +1,6 @@ -This inspection reports break statements with labels. +Reports break statements with labels. Labeled break statements complicate refactoring, and can be confusing.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/BusyWait.html b/plugins/InspectionGadgets/src/inspectionDescriptions/BusyWait.html index 5914fcf7db7c..c426a3a5dd20 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/BusyWait.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/BusyWait.html @@ -1,6 +1,6 @@ -This inspection reports calls to java.lang.Thread.sleep() that occur inside loops. Such calls +Reports calls to java.lang.Thread.sleep() that occur inside loops. Such calls are indicative of "busy-waiting". Busy-waiting is often inefficient, and may result in unexpected deadlocks as busy-waiting threads do not release locked resources. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CStyleArrayDeclaration.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CStyleArrayDeclaration.html index 40b3e09db8e6..6e288e27df32 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CStyleArrayDeclaration.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CStyleArrayDeclaration.html @@ -1,6 +1,6 @@ -This inspection reports array declarations made using C-style syntax, with the array indicator attached to the variable, +Reports array declarations made using C-style syntax, with the array indicator attached to the variable, rather than Java-style syntax, with the array indicator attached to the type.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CachedNumberConstructorCall.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CachedNumberConstructorCall.html index 1b76b03a4c3e..42d332fedd15 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CachedNumberConstructorCall.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CachedNumberConstructorCall.html @@ -1,6 +1,6 @@ -This inspection reports any attempt to instantiate a new Long, +Reports any attempt to instantiate a new Long, Integer, Short or Byte object from a primitive long, integer, short or diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CallToNativeMethodWhileLocked.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CallToNativeMethodWhileLocked.html index 817aebc8d27f..16879d7a0abb 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CallToNativeMethodWhileLocked.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CallToNativeMethodWhileLocked.html @@ -1,6 +1,6 @@ -This inspection reports any to methods declared native while in +Reports any to methods declared native while in a synchronized block or method. While not necessarily representing a problem, such calls cause an expensive context switch, and are best kept out of synchronized contexts, if possible. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CallToSimpleGetterInClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CallToSimpleGetterInClass.html index 8ed084450224..4ba453d5c3d6 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CallToSimpleGetterInClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CallToSimpleGetterInClass.html @@ -1,6 +1,6 @@ -This inspection reports any calls to a simple property getter from within the property's class. +Reports any calls to a simple property getter from within the property's class. A simple property getter is defined as one which simply returns the value of a field, and does no other calculation. Such simple getter calls may be safely inlined, at a small performance improvement. Some coding standards also suggest against the use of simple getters for code clarity diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CallToSimpleSetterInClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CallToSimpleSetterInClass.html index 0ae86f62cf09..862c15ce7770 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CallToSimpleSetterInClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CallToSimpleSetterInClass.html @@ -1,6 +1,6 @@ -This inspection reports any calls to a simple property setter from within the property's class. +Reports any calls to a simple property setter from within the property's class. A simple property setter is defined as one which simply assigns the value of its parameter to a field, and does no other calculation. Such simple setter calls may be safely inlined, at a small performance improvement. Some coding standards also suggest against the use of simple setters for code clarity diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CallToStringConcatCanBeReplacedByOperator.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CallToStringConcatCanBeReplacedByOperator.html index c061a1cd1d3e..e123a7912883 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CallToStringConcatCanBeReplacedByOperator.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CallToStringConcatCanBeReplacedByOperator.html @@ -1,6 +1,6 @@ -This inspection reports calls to the concat method +Reports calls to the concat method of a java.lang.String object. Such calls can be replaced with the '+' operator for increased code clarity and possible increased performance if the method was invoked on a constant with a constant argument. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CastConflictsWithInstanceof.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CastConflictsWithInstanceof.html index 2f767e6bb496..542027d04f06 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CastConflictsWithInstanceof.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CastConflictsWithInstanceof.html @@ -1,6 +1,6 @@ -This inspection reports type cast expressions which are surrounded by an +Reports type cast expressions which are surrounded by an instanceof check for a different type. While it is possible that this was intended, such a construct is most likely an error, and will result in a java.lang.ClassCastException at runtime. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CastThatLosesPrecision.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CastThatLosesPrecision.html index dc07dbae4ce3..c57cec6e82c7 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CastThatLosesPrecision.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CastThatLosesPrecision.html @@ -1,6 +1,6 @@ -This inspection reports any cast operations between built-in numeric types which may +Reports any cast operations between built-in numeric types which may result in loss of precision. Such casts are not necessarily a problem, but may result in difficult to trace bugs if the loss of precision is unexpected. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CastToConcreteClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CastToConcreteClass.html index 585311f920e2..a4073a02c69a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CastToConcreteClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CastToConcreteClass.html @@ -1,6 +1,6 @@ -This inspection reports casting a value to a concrete class, rather than an interface. +Reports casting a value to a concrete class, rather than an interface. Such declarations may represent a failure of abstraction, and may make testing more difficult. Declarations whose classes come from system or third-party libraries will not be reported by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CastToIncompatibleInterface.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CastToIncompatibleInterface.html index 06614592084d..6004938cb20b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CastToIncompatibleInterface.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CastToIncompatibleInterface.html @@ -1,6 +1,6 @@ -This inspection reports type cast expressions where +Reports type cast expressions where the cast type is an interface, and the cast expression has a class type which neither implements the cast interface, nor has any visible subclasses which implement or extend the cast interface. While it is possible that this was intended, such a construct is most likely an error, and will diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CaughtExceptionImmediatelyRethrown.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CaughtExceptionImmediatelyRethrown.html index 9c9ce6a716b0..6a7fc72c4c97 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CaughtExceptionImmediatelyRethrown.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CaughtExceptionImmediatelyRethrown.html @@ -1,6 +1,6 @@ -This inspection reports any catch block where +Reports any catch block where the caught exception is immediately rethrown, without performing any action on it. Such catch blocks are unnecessary or lack error handling. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ChainedEquality.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ChainedEquality.html index 6812f317f5c7..f94be23d4ea5 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ChainedEquality.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ChainedEquality.html @@ -1,6 +1,6 @@ -This inspection reports chained equality comparisons (i.e. a==b==c). +Reports chained equality comparisons (i.e. a==b==c). Such comparisons are confusing.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ChainedMethodCall.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ChainedMethodCall.html index ce81b8cafe81..3585d15a17cb 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ChainedMethodCall.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ChainedMethodCall.html @@ -1,6 +1,6 @@ -This inspection reports method calls whose target is another +Reports method calls whose target is another method call.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ChannelResource.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ChannelResource.html index a8e093082073..dd1c2303e00d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ChannelResource.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ChannelResource.html @@ -1,6 +1,6 @@ -This inspection reports any Channel which is not opened in +Reports any Channel which is not opened in front of a try block and closed in the corresponding finally block. Such resources may be inadvertently leaked if an exception is thrown before the resource is closed. Channel resources reported diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CharUsedInArithmeticContext.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CharUsedInArithmeticContext.html index dabb5f1e72aa..4695875b731b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CharUsedInArithmeticContext.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CharUsedInArithmeticContext.html @@ -1,6 +1,6 @@ -This inspection reports on any expressions of type char which are used in +Reports on any expressions of type char which are used in addition or subtraction expressions.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CharacterComparison.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CharacterComparison.html index 34aba2994513..be73f438911f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CharacterComparison.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CharacterComparison.html @@ -1,6 +1,6 @@ -This inspection reports any ordinal comparison of char values. In an internationalized +Reports any ordinal comparison of char values. In an internationalized environment, such comparisons are rarely correct.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CheckForOutOfMemoryOnLargeArrayAllocation.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CheckForOutOfMemoryOnLargeArrayAllocation.html index aa05e43069d1..aa9df540e177 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CheckForOutOfMemoryOnLargeArrayAllocation.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CheckForOutOfMemoryOnLargeArrayAllocation.html @@ -3,7 +3,7 @@ This inspection is intended for J2ME and other highly resource constrained environments. Applying the results of this inspection without consideration might have negative effects on code clarity and design.

-This inspection reports large array allocations which do not check +Reports large array allocations which do not check for java.lang.OutOfMemoryError. In memory constrained environments, allocations of large data objects should probably be checked for memory depletion. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CheckedExceptionClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CheckedExceptionClass.html index 0efb2ee7f8f9..22e6b52e4b05 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CheckedExceptionClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CheckedExceptionClass.html @@ -1,6 +1,6 @@ -This inspection reports checked exception classes (i.e. subclasses of Exception which are +Reports checked exception classes (i.e. subclasses of Exception which are not also subclasses of RuntimeException). Certain coding standards require that all user-defined exception classes be unchecked. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassComplexity.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassComplexity.html index 00ebafea7f8e..5545631e12d8 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassComplexity.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassComplexity.html @@ -1,6 +1,6 @@ -This inspection reports class with too high of a total complexity. The +Reports class with too high of a total complexity. The total complexity of a class is the sum of the cyclomatic complexities of all the methods and initializers the class declares. Inherited methods and initializers are not counted toward the total complexity. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassCoupling.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassCoupling.html index aad0a34223e3..9a4dea6c0f21 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassCoupling.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassCoupling.html @@ -1,6 +1,6 @@ -This inspection reports classes which are highly coupled, i.e. that reference too many other classes. +Reports classes which are highly coupled, i.e. that reference too many other classes. Classes with too high a coupling can be very fragile, and should probably be broken up. References to system classes (those in the java.or javax. packages), are not counted for purposes of this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassEscapesItsScope.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassEscapesItsScope.html index ea1dba9fb032..278e0d589b59 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassEscapesItsScope.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassEscapesItsScope.html @@ -1,6 +1,6 @@ -This inspection reports any references to classes which allow the class name to +Reports any references to classes which allow the class name to be used outside the class's stated scope. For instance, this inspection would report a public method which returns a private inner class, or a protected field whose type is a package-visible class. While legal Java, such references can be very diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassInTopLevelPackage.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassInTopLevelPackage.html index 578d9a6ed77f..7007266c99a1 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassInTopLevelPackage.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassInTopLevelPackage.html @@ -1,6 +1,6 @@ -This inspection reports any classes which do not contain package declarations. +Reports any classes which do not contain package declarations.

Powered by InspectionGadgets diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassIndependentOfModule.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassIndependentOfModule.html index fad2612e78cb..7f936709e27d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassIndependentOfModule.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassIndependentOfModule.html @@ -1,6 +1,6 @@ -This inspection reports any classes which are neither dependent on nor depended on by other classes +Reports any classes which are neither dependent on nor depended on by other classes in their module. Such classes are an indication of ad-hoc or incoherent modularisation strategies, and may often profitably be moved. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassInheritanceDepth.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassInheritanceDepth.html index e8cac019fb33..01b74552b231 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassInheritanceDepth.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassInheritanceDepth.html @@ -1,6 +1,6 @@ -This inspection reports class too deep in the inheritance hierarchy. Classes too deeply inherited +Reports class too deep in the inheritance hierarchy. Classes too deeply inherited may be confusing, and are a good sign that refactoring may be necessary. This inspection counts all superclasses from a library as a single superclass (libraries are considered unmodifyable). diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassInitializer.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassInitializer.html index c025f4363921..42c5d07ae809 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassInitializer.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassInitializer.html @@ -1,6 +1,6 @@ -This inspection reports any of non-static initializers +Reports any of non-static initializers in classes. Some coding standards prohibit such initializers, preferring initialization to be done in constructors or field initializers. Non-static initializers may also be inadvertently created by deleting the static keyword, diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassInitializerMayBeStatic.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassInitializerMayBeStatic.html index 6cb2f1a5e170..742edb4c9b5a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassInitializerMayBeStatic.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassInitializerMayBeStatic.html @@ -1,6 +1,6 @@ -This inspection reports any class initializers which may safely be made static. +Reports any class initializers which may safely be made static. A class initializer may be static if it does not reference any of its class' non static methods and non static fields. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassLoaderInstantiation.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassLoaderInstantiation.html index fb5c27f1562b..cd4f10765ebf 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassLoaderInstantiation.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassLoaderInstantiation.html @@ -1,6 +1,6 @@ -This inspection reports any instantiations of java.lang.ClassLoader objects. +Reports any instantiations of java.lang.ClassLoader objects. While often benign, any instantiations to ClassLoader should be closely examined in any security audit.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassMayBeInterface.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassMayBeInterface.html index ad6a8bf70637..ae5f234c2c50 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassMayBeInterface.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassMayBeInterface.html @@ -1,6 +1,6 @@ -This inspection reports any concrete or abstract classes +Reports any concrete or abstract classes which may be simplified to be interfaces. This occurs if the class has no superclass (other than Object), has no fields declared that are not static, final, and public, and has no methods declared that are not public and abstract, and no inner classes diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNameDiffersFromFileName.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNameDiffersFromFileName.html index 84535104efe2..7b5ab454c98a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNameDiffersFromFileName.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNameDiffersFromFileName.html @@ -1,6 +1,6 @@ -This inspection reports top-level class names which do not match the name of +Reports top-level class names which do not match the name of their containing file. While the Java specification allows such naming for non-public classes, such misnamed files can be confusing, and may degrade the usefulness of various software tools. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNamePrefixedWithPackageName.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNamePrefixedWithPackageName.html index 7526c9c23a86..4ac92fef1bf3 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNamePrefixedWithPackageName.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNamePrefixedWithPackageName.html @@ -1,6 +1,6 @@ -This inspection reports classes whose names are prefixed with their package names, irrespective of +Reports classes whose names are prefixed with their package names, irrespective of capitalization. While occasionally reasonable, this is often due to a poor naming scheme, and may be redundant and annoying. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNameSameAsAncestorName.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNameSameAsAncestorName.html index f9534e094437..9b53c8bbdef0 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNameSameAsAncestorName.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNameSameAsAncestorName.html @@ -1,6 +1,6 @@ -This inspection reports class being named identically to one of their +Reports class being named identically to one of their super classes (but in different packages). Such class name may be very confusing.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNamingConvention.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNamingConvention.html index 3d546fcca311..106143e562bb 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNamingConvention.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNamingConvention.html @@ -1,6 +1,6 @@ -This inspection reports classes whose names are either too short, too long, or do not follow +Reports classes whose names are either too short, too long, or do not follow the specified regular expression pattern.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNestingDepth.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNestingDepth.html index 63601806d7c3..5d19449ca9f3 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNestingDepth.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNestingDepth.html @@ -1,6 +1,6 @@ -This inspection reports inner classes too deeply nested. Nesting inner classes inside +Reports inner classes too deeply nested. Nesting inner classes inside inner classes is almost certain to be confusing, and is a good sign that refactoring may be necessary.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNewInstance.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNewInstance.html index e5a5afcff1a5..811ae157f49f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNewInstance.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassNewInstance.html @@ -1,6 +1,6 @@ -This inspection reports any calls to +Reports any calls to java.lang.Class.newInstance(). The newInstance method propagates any exception thrown by the no-arg constructor, including checked exceptions. Use diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassOnlyUsedInOneModule.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassOnlyUsedInOneModule.html index 8be138e1b330..00098bcadc47 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassOnlyUsedInOneModule.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassOnlyUsedInOneModule.html @@ -1,6 +1,6 @@ -This inspection reports any classes which is only depended on and only depends on one module which +Reports any classes which is only depended on and only depends on one module which is different from the module containing the class. Such class could be moved into that module. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassOnlyUsedInOnePackage.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassOnlyUsedInOnePackage.html index 8be138e1b330..00098bcadc47 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassOnlyUsedInOnePackage.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassOnlyUsedInOnePackage.html @@ -1,6 +1,6 @@ -This inspection reports any classes which is only depended on and only depends on one module which +Reports any classes which is only depended on and only depends on one module which is different from the module containing the class. Such class could be moved into that module. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassReferencesSubclass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassReferencesSubclass.html index dc8ed7f6ee5d..b432384a7eec 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassReferencesSubclass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassReferencesSubclass.html @@ -1,6 +1,6 @@ -This inspection reports classes which contain references to one of their subclasses. +Reports classes which contain references to one of their subclasses. Such references may be confusing, and violate several rules of object-oriented design.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassUnconnectedToPackage.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassUnconnectedToPackage.html index 1abda8015376..c2a15afcbd3b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassUnconnectedToPackage.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassUnconnectedToPackage.html @@ -1,6 +1,6 @@ -This inspection reports any classes which are neither dependent on nor depended on by other classes +Reports any classes which are neither dependent on nor depended on by other classes in their package. Such classes are an indication of ad-hoc or incoherent packaging strategies, and may often profitably be moved. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassWithMultipleLoggers.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassWithMultipleLoggers.html index dc773383e1d3..f9673d425df1 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassWithMultipleLoggers.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassWithMultipleLoggers.html @@ -1,6 +1,6 @@ -This inspection reports classes which have multiple loggers declared. +Reports classes which have multiple loggers declared. Ensuring that every class has a single dedicated logger is an important step in providing a unified logging implementation for an application. Interfaces, enumerations, annotations, inner classes, and abstract classes are not reported by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassWithoutConstructor.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassWithoutConstructor.html index 0373ecd8210d..3a15855966dc 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassWithoutConstructor.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassWithoutConstructor.html @@ -1,6 +1,6 @@ -This inspection reports a classes without constructors. Some coding standards prohibit such classes. +Reports a classes without constructors. Some coding standards prohibit such classes.

Powered by InspectionGadgets diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassWithoutLogger.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassWithoutLogger.html index a8f1f7bc6087..8237a18c67e1 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassWithoutLogger.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassWithoutLogger.html @@ -1,6 +1,6 @@ -This inspection reports classes which do not have a logger declared. +Reports classes which do not have a logger declared. Ensuring that every class has a dedicated logger is an important step in providing a unified logging implementation for an application. Interfaces, enumerations, annotations, inner classes, and abstract classes are not reported by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassWithoutNoArgConstructor.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassWithoutNoArgConstructor.html index 58b5fecd7587..a6c1e99852a7 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ClassWithoutNoArgConstructor.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ClassWithoutNoArgConstructor.html @@ -1,6 +1,6 @@ -This inspection reports a classes without a no-argument constructor. +Reports a classes without a no-argument constructor. Such constructors are necessary in some contexts if a class is to be created reflexively.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CloneCallsConstructors.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CloneCallsConstructors.html index 5485e24002b7..44833247aa76 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CloneCallsConstructors.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CloneCallsConstructors.html @@ -1,6 +1,6 @@ -This inspection reports calls to object constructors inside clone() methods. +Reports calls to object constructors inside clone() methods. Instantiation of objects inside of clone() should be done by calling clone(), instead of creating the object directly, to support later subclassing. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CloneCallsSuperClone.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CloneCallsSuperClone.html index 6081126dc5bf..18bea23b7b27 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CloneCallsSuperClone.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CloneCallsSuperClone.html @@ -1,6 +1,6 @@ -This inspection reports clone() methods which do not call super.clone(). +Reports clone() methods which do not call super.clone(). Cloning an object without calling super.clone() may result in objects being improperly initialized.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CloneDeclaresCloneNotSupported.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CloneDeclaresCloneNotSupported.html index aeb3274a2954..3886dedf66aa 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CloneDeclaresCloneNotSupported.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CloneDeclaresCloneNotSupported.html @@ -1,6 +1,6 @@ -This inspection reports clone() methods which are not declared as throwing +Reports clone() methods which are not declared as throwing CloneNotSupportedException. If clone() is not declared to possibly throw CloneNotSupportedException, then subclasses which need to prohibit cloning will not be able to do so in the standard way. This inspection will not report diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CloneInNonCloneableClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CloneInNonCloneableClass.html index ac652526a039..5bc29013c60d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CloneInNonCloneableClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CloneInNonCloneableClass.html @@ -1,6 +1,6 @@ -This inspection reports classes which override the +Reports classes which override the clone() method, but which do not implement the Cloneable interface. This usually represents a programming error. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CloneableClassInSecureContext.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CloneableClassInSecureContext.html index e8ff5ef81ba9..d34d5587010e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CloneableClassInSecureContext.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CloneableClassInSecureContext.html @@ -1,6 +1,6 @@ -This inspection reports classes which may be cloned. A class +Reports classes which may be cloned. A class may be cloned if it supports the Cloneable interface, and its clone() method is not defined to immediately throw an error. Cloneable classes may be dangerous in code intended for secure use. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CloneableImplementsClone.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CloneableImplementsClone.html index d2482cb4e407..3ced557c9f57 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CloneableImplementsClone.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CloneableImplementsClone.html @@ -1,6 +1,6 @@ -This inspection reports classes which implement the Cloneable interface, but which do not override the +Reports classes which implement the Cloneable interface, but which do not override the clone() method. Such classes use the default implementation of clone(), which is often not the desired behavior. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CollectionAddedToSelf.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CollectionAddedToSelf.html index d2c3c81675dc..9532a7a8c1b3 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CollectionAddedToSelf.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CollectionAddedToSelf.html @@ -1,6 +1,6 @@ -This inspection reports any cases where a java.util.Collection +Reports any cases where a java.util.Collection or java.util.Map is added as an element of itself. While Bertrand Russell might approve of such a construct, the JVM will likely not, throwing a java.lang.StackOverflowError if hashCode() is ever called on the self-containing collection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CollectionContainsUrl.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CollectionContainsUrl.html index c0ccecc4c50d..1bd48ad8c918 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CollectionContainsUrl.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CollectionContainsUrl.html @@ -1,6 +1,6 @@ -This inspection reports objects which are a subtype of +Reports objects which are a subtype of java.util.Set or java.util.Map and which may contain java.net.URL objects. Adding java.net.URL objects to such collections can cause performance problems because of calls to the diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CollectionsFieldAccessReplaceableByMethodCall.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CollectionsFieldAccessReplaceableByMethodCall.html index 53293ea5f018..2ed524c2ae86 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CollectionsFieldAccessReplaceableByMethodCall.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CollectionsFieldAccessReplaceableByMethodCall.html @@ -1,6 +1,6 @@ -This inspection reports any access to the java.util.Collections +Reports any access to the java.util.Collections fields EMPTY_LIST, EMPTY_MAP or EMPTY_SET. Those expressions can be replaced by method calls to emptyList(), diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CollectionsMustHaveInitialCapacity.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CollectionsMustHaveInitialCapacity.html index 4c6f5b551b2f..472bca6200c5 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CollectionsMustHaveInitialCapacity.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CollectionsMustHaveInitialCapacity.html @@ -1,6 +1,6 @@ -This inspection reports any attempt to instantiate a new Collection object without specifying +Reports any attempt to instantiate a new Collection object without specifying an initial capacity. If no initial capacity is specified, a default capacity is used, which will rarely be optimal. Failing to specify initial capacities for collections may result in performance issues, if space needs to be reallocated and memory copied when capacity is exceeded. This inspection checks allocations of the following classes: diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ComparableImplementedButEqualsNotOverridden.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ComparableImplementedButEqualsNotOverridden.html index 073928ff38e1..e1e423a3351f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ComparableImplementedButEqualsNotOverridden.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ComparableImplementedButEqualsNotOverridden.html @@ -1,6 +1,6 @@ -This inspection reports classes which implement java.lang.Comparable +Reports classes which implement java.lang.Comparable which do not override equals(). If equals() is not overridden, the equals() implementation is not consistent with the compareTo() implementation. If an object of such a class is added diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ComparatorMethodParameterNotUsed.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ComparatorMethodParameterNotUsed.html index 87141e5c1bb6..1d73fc190d57 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ComparatorMethodParameterNotUsed.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ComparatorMethodParameterNotUsed.html @@ -1,6 +1,6 @@ -This inspection reports any parameters of java.util.Comparator.compare() +Reports any parameters of java.util.Comparator.compare() which are not used. Most likely this is the result of a typing mistake and one parameter is compared with itself or the method is not implemented correctly. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ComparatorNotSerializable.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ComparatorNotSerializable.html index bb2843609c5a..fec4f9879699 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ComparatorNotSerializable.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ComparatorNotSerializable.html @@ -1,6 +1,6 @@ -This inspection reports on subclasses of java.lang.Comparator which are not +Reports on subclasses of java.lang.Comparator which are not also Serializable. Objects of java.util.TreeMap or java.util.TreeSet will become non-Serializable if instantiated with such Comparators. This can result in unexpected and difficult-to-diagnose diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CompareToUsesNonFinalVariable.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CompareToUsesNonFinalVariable.html index d5c4543afdaf..e36dbcbdd52f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CompareToUsesNonFinalVariable.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CompareToUsesNonFinalVariable.html @@ -1,6 +1,6 @@ -This inspection reports any implementations of compareTo() which access +Reports any implementations of compareTo() which access non-final variables. Such access may result in compareTo() returning different results at different points in an object's lifecycle, which may in turn cause problems when using the standard Collections classes. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ComparisonOfShortAndChar.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ComparisonOfShortAndChar.html index caada42fc583..5741985cec9a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ComparisonOfShortAndChar.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ComparisonOfShortAndChar.html @@ -1,6 +1,6 @@ -This inspection reports equality comparisons between +Reports equality comparisons between short and char values. Such comparisons may cause subtle bugs, as short values are signed and char values unsigned. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ComparisonToNaN.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ComparisonToNaN.html index 623ad1aabbe1..64ed56ff02f4 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ComparisonToNaN.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ComparisonToNaN.html @@ -1,6 +1,6 @@ -This inspection reports any equality or inequality comparisons to +Reports any equality or inequality comparisons to Double.NaN or Float.NaN. Equality comparison to these values is always false. Instead, use the Double.isNaN() of Float.isNaN() diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ConditionSignal.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ConditionSignal.html index 11d994bdc4dc..238b1041d260 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ConditionSignal.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ConditionSignal.html @@ -1,6 +1,6 @@ -This inspection reports any calls to java.util.concurrent.locks.signal(). While occasionally useful, in almost all cases +Reports any calls to java.util.concurrent.locks.signal(). While occasionally useful, in almost all cases signalAll() is a better and safer choice.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ConditionalExpression.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ConditionalExpression.html index 89847d2877a8..75b467999d40 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ConditionalExpression.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ConditionalExpression.html @@ -1,6 +1,6 @@ -This inspection reports the ternary condition operator. Some coding standards prohibit the use of +Reports the ternary condition operator. Some coding standards prohibit the use of the condition operator, in favor of if-else statements.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ConditionalExpressionWithIdenticalBranches.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ConditionalExpressionWithIdenticalBranches.html index ca06ea9fee60..6ce6bc4a4d8d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ConditionalExpressionWithIdenticalBranches.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ConditionalExpressionWithIdenticalBranches.html @@ -1,6 +1,6 @@ -This inspection reports conditional expressions +Reports conditional expressions with identical "then" and "else" branches. Such expressions are almost certainly programmer error. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ConfusingElse.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ConfusingElse.html index 6a72d085e97d..53555994b525 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ConfusingElse.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ConfusingElse.html @@ -1,6 +1,6 @@ -This inspection reports confusing else branches. else branches are confusing +Reports confusing else branches. else branches are confusing when the if statement is followed by other statements and the if branch cannot complete normally, for example because it ends with a return statement. In these cases the statements in the else can be moved after the if statement and diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ConfusingFloatingPointLiteral.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ConfusingFloatingPointLiteral.html index 715bec8ccacc..ada7e78876ea 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ConfusingFloatingPointLiteral.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ConfusingFloatingPointLiteral.html @@ -1,6 +1,6 @@ -This inspection reports any floating point numbers which do not have a decimal point, numbers before the decimal point, +Reports any floating point numbers which do not have a decimal point, numbers before the decimal point, and numbers after the decimal point. Such literals may be confusing, and violate several coding standards.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ConfusingMainMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ConfusingMainMethod.html index 87f7ffbd6a4b..7679462f5466 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ConfusingMainMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ConfusingMainMethod.html @@ -1,6 +1,6 @@ -This inspection reports methods named "main" which do not have signature +Reports methods named "main" which do not have signature public static void main(String[]). Such methods may be confusing, as methods named "main" are expected to be application entry points. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ConfusingOctalEscape.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ConfusingOctalEscape.html index 22e58a7e77ae..32cf94d4bf39 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ConfusingOctalEscape.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ConfusingOctalEscape.html @@ -1,6 +1,6 @@ -This inspection reports any string literals which contain an octal escape sequence immediately followed by +Reports any string literals which contain an octal escape sequence immediately followed by a digit. Such strings may be confusing, and are often the result of errors in escape code creation.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ConnectionResource.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ConnectionResource.html index 55ec147eaaac..9072a327b4c8 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ConnectionResource.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ConnectionResource.html @@ -3,7 +3,7 @@ This inspection is intended for J2ME and other highly resource constrained environments. Applying the results of this inspection without consideration might have negative effects on code clarity and design.

-This inspection reports any J2ME Connection resource which is not opened in front of a try +Reports any J2ME Connection resource which is not opened in front of a try block and closed in the corresponding finally block. Such resources may be inadvertently leaked if an exception is thrown before the resource is closed. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantAssertCondition.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantAssertCondition.html index b547c66ec572..87bff68d5dfa 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantAssertCondition.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantAssertCondition.html @@ -1,6 +1,6 @@ -This inspection reports assert statement conditions which are constants. Assert +Reports assert statement conditions which are constants. Assert statements with constant conditions will either always fail or always succeed. Such statements can easily be left over after refactoring and are probably a bug. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantConditionalExpression.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantConditionalExpression.html index 2ea6a0190468..cfc41fa53d19 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantConditionalExpression.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantConditionalExpression.html @@ -1,6 +1,6 @@ -This inspection reports conditional expressions of the form +Reports conditional expressions of the form true?result1:result2 or false?result1:result2. These expressions sometimes occur as the result of automatic refactorings, and may obviously be simplified. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantDeclaredInAbstractClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantDeclaredInAbstractClass.html index a55deb6498b6..bc200687c77d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantDeclaredInAbstractClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantDeclaredInAbstractClass.html @@ -1,6 +1,6 @@ -This inspection reports on any constants (i.e. public static final fields) declared in abstract +Reports on any constants (i.e. public static final fields) declared in abstract classes. Some coding standards require that constants be declared in interfaces instead.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantDeclaredInInterface.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantDeclaredInInterface.html index 2603d2a7da17..5b495173e5f4 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantDeclaredInInterface.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantDeclaredInInterface.html @@ -1,6 +1,6 @@ -This inspection reports on any constants (i.e. public static final fields) declared in interfaces. +Reports on any constants (i.e. public static final fields) declared in interfaces. Some coding standards require that constants be declared in abstract classes instead.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantIfStatement.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantIfStatement.html index dcbcd492df2c..e2223a6cd9e5 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantIfStatement.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantIfStatement.html @@ -1,6 +1,6 @@ -This inspection reports if statements of the form +Reports if statements of the form if(true)... or if(false).... These statements sometimes occur due to automatic refactorings, and may obviously be simplified. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantJUnitAssertArgument.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantJUnitAssertArgument.html index bfe74026d3c5..aaa4c1679fda 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantJUnitAssertArgument.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantJUnitAssertArgument.html @@ -1,6 +1,6 @@ -This inspection reports constant arguments to JUnits assertTrue, assertFalse, +Reports constant arguments to JUnits assertTrue, assertFalse, assertNull and assertNotNull method calls. Calls to these methods with such constant arguments will either always fail or always succeed. Such statements can easily be left over after refactoring and are probably not intended. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantMathCall.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantMathCall.html index 462ecd0e79e9..8fb51ebf900d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantMathCall.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantMathCall.html @@ -1,6 +1,6 @@ -This inspection reports any calls to java.lang.Math or +Reports any calls to java.lang.Math or java.lang.StrictMath methods which can be determined to be simple compile-time constants. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantNamingConvention.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantNamingConvention.html index b66b6bcf9819..99c3c6b6201a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantNamingConvention.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantNamingConvention.html @@ -1,6 +1,6 @@ -This inspection reports any constants whose names are either too short, too long, or do not follow +Reports any constants whose names are either too short, too long, or do not follow the specified regular expression pattern. Constants are fields declared static final.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantOnLHSOfComparison.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantOnLHSOfComparison.html index 8478695b3177..33207002d6d3 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantOnLHSOfComparison.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantOnLHSOfComparison.html @@ -1,6 +1,6 @@ -This inspection reports on comparison operations with constant values on their left-hand side. Some coding conventions +Reports on comparison operations with constant values on their left-hand side. Some coding conventions specify that constants should be on the right-hand side of comparisons.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantOnRHSOfComparison.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantOnRHSOfComparison.html index f08b010e8e9f..027aee34740e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantOnRHSOfComparison.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantOnRHSOfComparison.html @@ -1,6 +1,6 @@ -This inspection reports on comparison operations with constant values on their right-hand side. Some coding conventions +Reports on comparison operations with constant values on their right-hand side. Some coding conventions specify that constants should be on the left-hand side of comparisons.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantStringIntern.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantStringIntern.html index b66373d5521f..08074eca0999 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantStringIntern.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantStringIntern.html @@ -1,6 +1,6 @@ -This inspection reports on any call to String.intern() on a compile-time constant +Reports on any call to String.intern() on a compile-time constant string. Per the Java Language Specification, compile-time constant strings are automatically interned, making the call to String.intern() redundant. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantValueVariableUse.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantValueVariableUse.html index 9ef722d22c40..b1c98a489603 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantValueVariableUse.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstantValueVariableUse.html @@ -1,6 +1,6 @@ -This inspection reports any uses of variables which are known to be constant. This +Reports any uses of variables which are known to be constant. This is the case if the (read) use of the variable is surrounded by an if or while statement with an == condition which compares the variable with a constant. In such diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstructorCount.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstructorCount.html index f3281d8715de..f6e8bb81050e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ConstructorCount.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ConstructorCount.html @@ -1,6 +1,6 @@ -This inspection reports class with too many constructors. Classes with +Reports class with too many constructors. Classes with too many constructors are prone to initialization errors, and may often be better modeled as multiple subclasses. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ContinueOrBreakFromFinallyBlock.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ContinueOrBreakFromFinallyBlock.html index 0a8cc625caf9..f2a954dfc21f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ContinueOrBreakFromFinallyBlock.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ContinueOrBreakFromFinallyBlock.html @@ -1,6 +1,6 @@ -This inspection reports break or continue statements +Reports break or continue statements inside of finally blocks. While occasionally intended, such statements are very confusing, may mask exceptions thrown, and tremendously complicate debugging. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ContinueStatement.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ContinueStatement.html index 70aeb61b3b43..ce5fc5ae6f76 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ContinueStatement.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ContinueStatement.html @@ -1,6 +1,6 @@ -This inspection reports continue statements. +Reports continue statements. continue statements complicate refactoring, and can be confusing.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ContinueStatementWithLabel.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ContinueStatementWithLabel.html index 44176177e4bb..9694df1365af 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ContinueStatementWithLabel.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ContinueStatementWithLabel.html @@ -1,6 +1,6 @@ -This inspection reports continue statements with labels. +Reports continue statements with labels. Labeled continue statements complicate refactoring, and can be confusing.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ControlFlowStatementWithoutBraces.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ControlFlowStatementWithoutBraces.html index 74cc8f8551de..accef0b08d60 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ControlFlowStatementWithoutBraces.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ControlFlowStatementWithoutBraces.html @@ -1,6 +1,6 @@ -This inspection reports any if, +Reports any if, while or for statements without braces. Braces make the code easier to read and help prevent errors when modifying the code. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CovariantCompareTo.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CovariantCompareTo.html index 08dedc38a056..670f0b691ad1 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CovariantCompareTo.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CovariantCompareTo.html @@ -1,6 +1,6 @@ -This inspection reports a class having a compareTo() +Reports a class having a compareTo() method taking an argument other than java.lang.Object, if the class does not have a compareTo() method which does take java.lang.Object as its argument. Normally, this is a mistake. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CovariantEquals.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CovariantEquals.html index 7312e120a52c..41d2ab349d85 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CovariantEquals.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CovariantEquals.html @@ -1,6 +1,6 @@ -This inspection reports a class having a equals() +Reports a class having a equals() method taking an argument other than java.lang.Object, if the class does not have a equals() method which does take java.lang.Object as its argument. Normally, this is a mistake. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CustomClassloader.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CustomClassloader.html index 455da50af1b1..6eda85566387 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CustomClassloader.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CustomClassloader.html @@ -1,6 +1,6 @@ -This inspection reports any user-defined subclasses of java.lang.ClassLoader. +Reports any user-defined subclasses of java.lang.ClassLoader. While not necessarily representing a security hole, such classes should be thoroughly and professionally inspected for possible security issues. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CustomSecurityManager.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CustomSecurityManager.html index d64c0b9bf30f..41bb5e687297 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CustomSecurityManager.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CustomSecurityManager.html @@ -1,6 +1,6 @@ -This inspection reports any user-defined subclasses of java.lang.SecurityManager. +Reports any user-defined subclasses of java.lang.SecurityManager. While not necessarily representing a security hole, such classes should be thoroughly and professionally inspected for possible security issues. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CyclomaticComplexity.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CyclomaticComplexity.html index 3714b0d4b19e..96acc30811f5 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CyclomaticComplexity.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CyclomaticComplexity.html @@ -1,6 +1,6 @@ -This inspection reports methods that have too high a cyclomatic complexity. Cyclomatic +Reports methods that have too high a cyclomatic complexity. Cyclomatic complexity is basically a measurement of the number of branching points in a method. Methods with too high a cyclomatic complexity may be confusing and difficult to test. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/DateToString.html b/plugins/InspectionGadgets/src/inspectionDescriptions/DateToString.html index 9d97af092f49..28db58d5ad51 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/DateToString.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/DateToString.html @@ -1,6 +1,6 @@ -This inspection reports any call of toString() on java.util.Date objects. Such calls are usually +Reports any call of toString() on java.util.Date objects. Such calls are usually incorrect in an internationalized environment.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/DeclareCollectionAsInterface.html b/plugins/InspectionGadgets/src/inspectionDescriptions/DeclareCollectionAsInterface.html index 2b5bd90b766e..cf4814ebc5c5 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/DeclareCollectionAsInterface.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/DeclareCollectionAsInterface.html @@ -1,6 +1,6 @@ -This inspection reports on declarations of Collection variables made by using the collection class as the type, +Reports on declarations of Collection variables made by using the collection class as the type, rather than an appropriate interface.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/DefaultNotLastCaseInSwitch.html b/plugins/InspectionGadgets/src/inspectionDescriptions/DefaultNotLastCaseInSwitch.html index 9fe1cda2543d..d4cf4b142cfc 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/DefaultNotLastCaseInSwitch.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/DefaultNotLastCaseInSwitch.html @@ -1,6 +1,6 @@ -This inspection reports switch statements where the default case +Reports switch statements where the default case comes before some other case. This construct is unnecessarily confusing.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/DeserializableClassInSecureContext.html b/plugins/InspectionGadgets/src/inspectionDescriptions/DeserializableClassInSecureContext.html index 9e470b458539..0641f121409e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/DeserializableClassInSecureContext.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/DeserializableClassInSecureContext.html @@ -1,6 +1,6 @@ -This inspection reports classes which may be deserialized. A class +Reports classes which may be deserialized. A class may be deserialized if it supports the Serializable interface, and its readObject() method is not defined to immediately throw an error. Deserializable classes may be dangerous in code intended for secure use. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/DesignForExtension.html b/plugins/InspectionGadgets/src/inspectionDescriptions/DesignForExtension.html index 26d77163c4bd..6ec3ff0da286 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/DesignForExtension.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/DesignForExtension.html @@ -1,6 +1,6 @@ -This inspection reports any methods which are not static, +Reports any methods which are not static, private, final or abstract, and whose bodies are not empty. Coding in a style that avoids such methods protects the contracts of classes from being broken by their subclasses. The benefit of this style is that diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/DisjointPackage.html b/plugins/InspectionGadgets/src/inspectionDescriptions/DisjointPackage.html index 30695494abf8..3354388c0c69 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/DisjointPackage.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/DisjointPackage.html @@ -1,6 +1,6 @@ -This inspection reports any packages whose classes can be separated into disjoint, mutually independent +Reports any packages whose classes can be separated into disjoint, mutually independent subsets. Such disjoint packages are a symptom of ad-hoc packaging, and may indicate a lack of conceptual cohesion. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/DivideByZero.html b/plugins/InspectionGadgets/src/inspectionDescriptions/DivideByZero.html index c174eb82932a..aab108c31998 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/DivideByZero.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/DivideByZero.html @@ -1,6 +1,6 @@ -This inspection reports division by zero or remainder by zero. +Reports division by zero or remainder by zero.

Powered by InspectionGadgets diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/DollarSignInName.html b/plugins/InspectionGadgets/src/inspectionDescriptions/DollarSignInName.html index 47f393c4c7ae..a3870acde995 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/DollarSignInName.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/DollarSignInName.html @@ -1,6 +1,6 @@ -This inspection reports identifers containing dollar signs ('$'). While +Reports identifers containing dollar signs ('$'). While such identifiers are legal Java, their use outside of generated java code is strongly discouraged.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/DoubleCheckedLocking.html b/plugins/InspectionGadgets/src/inspectionDescriptions/DoubleCheckedLocking.html index 5659ee383d39..5c3ddf429979 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/DoubleCheckedLocking.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/DoubleCheckedLocking.html @@ -1,6 +1,6 @@ -This inspection reports the double-checked locking construct. For a +Reports the double-checked locking construct. For a discussion of double-checked locking and why it is unsafe, see http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/DoubleLiteralMayBeFloatLiteral.html b/plugins/InspectionGadgets/src/inspectionDescriptions/DoubleLiteralMayBeFloatLiteral.html index 59a4362a69eb..d1f434e29175 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/DoubleLiteralMayBeFloatLiteral.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/DoubleLiteralMayBeFloatLiteral.html @@ -1,6 +1,6 @@ -This inspection reports double literal expressions +Reports double literal expressions which are immediately cast to float. Such literal expressions can be replaced with the equivalent float literal. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/DoubleNegation.html b/plugins/InspectionGadgets/src/inspectionDescriptions/DoubleNegation.html index c1213bb6b190..8784ea204be3 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/DoubleNegation.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/DoubleNegation.html @@ -1,6 +1,6 @@ -This inspection reports double negation. +Reports double negation.

For example:

if (!!functionCall())
diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/DriverManagerGetConnection.html b/plugins/InspectionGadgets/src/inspectionDescriptions/DriverManagerGetConnection.html index 878988304c00..31d6f40c1350 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/DriverManagerGetConnection.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/DriverManagerGetConnection.html @@ -1,6 +1,6 @@ -This inspection reports any uses to javax.sql.DriverManager +Reports any uses to javax.sql.DriverManager to acquire a JDBC connection. The javax.sql.DriverManager has been superseded by javax.sql.Datasource, which allows for connection pooling and other optimizations. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/DuplicateBooleanBranch.html b/plugins/InspectionGadgets/src/inspectionDescriptions/DuplicateBooleanBranch.html index 6f9f607a02a3..38c1a581ec9c 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/DuplicateBooleanBranch.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/DuplicateBooleanBranch.html @@ -1,6 +1,6 @@ -This inspection reports duplicated branches in +Reports duplicated branches in && or || expressions. Such constructs almost always represents a typo or cut-and-paste error. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/DuplicateCondition.html b/plugins/InspectionGadgets/src/inspectionDescriptions/DuplicateCondition.html index 0eddc9d51162..242fdae23897 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/DuplicateCondition.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/DuplicateCondition.html @@ -1,6 +1,6 @@ -This inspection reports on any duplicate conditions among different branches of an +Reports on any duplicate conditions among different branches of an if statement. While it may rarely be the desired semantics, duplicate conditions usually represent programmer oversight. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/DynamicRegexReplaceableByCompiledPattern.html b/plugins/InspectionGadgets/src/inspectionDescriptions/DynamicRegexReplaceableByCompiledPattern.html index 0d35c30d60fb..f2cfbf59067f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/DynamicRegexReplaceableByCompiledPattern.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/DynamicRegexReplaceableByCompiledPattern.html @@ -1,6 +1,6 @@ -This inspection reports calls to the regular expression methods of +Reports calls to the regular expression methods of java.lang.String using constants arguments. Such calls may be profitably replaced with a private static final Pattern field so diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyCatchBlock.html b/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyCatchBlock.html index f81294a3d54d..bb3120b1bcea 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyCatchBlock.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyCatchBlock.html @@ -1,6 +1,6 @@ -This inspection reports empty catch blocks. While occasionally intended, this +Reports empty catch blocks. While occasionally intended, this empty catch blocks can make debugging extremely difficult.

At present, this inspection is disabled in JSP files. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyClass.html index a127f913ffd8..da694886fbf4 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyClass.html @@ -1,6 +1,6 @@ -This inspection reports empty classes and Java files without any defined classes. A class is empty if it +Reports empty classes and Java files without any defined classes. A class is empty if it doesn't have any fields, methods, constructors or initializers. Empty classes are often left over after large changes or refactorings. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyDirectory.html b/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyDirectory.html index 04fb7dec0f63..6d7e46ca8a5e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyDirectory.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyDirectory.html @@ -1,6 +1,6 @@ -This inspection reports empty directories. +Reports empty directories.

Use the checkbox below to have this inspection only report directories under source roots. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyFinallyBlock.html b/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyFinallyBlock.html index 9899406f5efd..4bacad9fe462 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyFinallyBlock.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyFinallyBlock.html @@ -1,6 +1,6 @@ -This inspection reports empty finally blocks. Empty finally blocks +Reports empty finally blocks. Empty finally blocks usually indicate coding errors.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyInitializer.html b/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyInitializer.html index a290c2c01a96..4ba3d3c06a30 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyInitializer.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyInitializer.html @@ -1,6 +1,6 @@ -This inspection reports empty class initializer blocks. +Reports empty class initializer blocks.

Powered by InspectionGadgets diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyStatementBody.html b/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyStatementBody.html index a9c245b9cf1c..1850e1f0f543 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyStatementBody.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyStatementBody.html @@ -1,6 +1,6 @@ -This inspection reports if, +Reports if, while, do or for statements having empty bodies. While occasionally intended, this construction is confusing, and often the result of a typo. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/EmptySynchronizedStatement.html b/plugins/InspectionGadgets/src/inspectionDescriptions/EmptySynchronizedStatement.html index d62859695715..9f36607c61f3 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/EmptySynchronizedStatement.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/EmptySynchronizedStatement.html @@ -1,6 +1,6 @@ -This inspection reports synchronized statements +Reports synchronized statements having empty bodies. While theoretically this may be the semantics intended, this construction is confusing, and often the result of a typo. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyTryBlock.html b/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyTryBlock.html index 6e6c628df7d4..2adf3b5e887f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyTryBlock.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/EmptyTryBlock.html @@ -1,6 +1,6 @@ -This inspection reports empty try blocks. +Reports empty try blocks.

At present, this inspection is disabled in JSP files. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/EnumAsName.html b/plugins/InspectionGadgets/src/inspectionDescriptions/EnumAsName.html index b991c879c0dd..9d525021ea2b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/EnumAsName.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/EnumAsName.html @@ -1,6 +1,6 @@ -This inspection reports variables, methods, or classes named +Reports variables, methods, or classes named enum. Such names are legal under Java 1.4 or earlier JVMs, but will cause problems under Java 5.0 or later. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/EnumClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/EnumClass.html index c1de52c30467..7e16af00e63a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/EnumClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/EnumClass.html @@ -1,6 +1,6 @@ -This inspection reports enum classes. +Reports enum classes. Such statements are not supported under Java 1.4 or earlier JVMs.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/EnumSwitchStatementWhichMissesCases.html b/plugins/InspectionGadgets/src/inspectionDescriptions/EnumSwitchStatementWhichMissesCases.html index 24aed00e8ea2..827ef4f29c54 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/EnumSwitchStatementWhichMissesCases.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/EnumSwitchStatementWhichMissesCases.html @@ -1,6 +1,6 @@ -This inspection reports switch statements +Reports switch statements over enumerated types which do not include all of the enumerated type's elements as cases.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/EnumeratedClassNamingConvention.html b/plugins/InspectionGadgets/src/inspectionDescriptions/EnumeratedClassNamingConvention.html index 42cbc8329b49..cd55dc8db061 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/EnumeratedClassNamingConvention.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/EnumeratedClassNamingConvention.html @@ -1,6 +1,6 @@ -This inspection reports enumerated classes whose names are either too short, too long, or do not follow +Reports enumerated classes whose names are either too short, too long, or do not follow the specified regular expression pattern.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/EnumeratedConstantNamingConvention.html b/plugins/InspectionGadgets/src/inspectionDescriptions/EnumeratedConstantNamingConvention.html index 139df04ce1c0..de47a9ed2ec9 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/EnumeratedConstantNamingConvention.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/EnumeratedConstantNamingConvention.html @@ -1,6 +1,6 @@ -This inspection reports enumerated constants whose names are either too short, too long, or do not follow +Reports enumerated constants whose names are either too short, too long, or do not follow the specified regular expression pattern.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/EnumerationCanBeIteration.html b/plugins/InspectionGadgets/src/inspectionDescriptions/EnumerationCanBeIteration.html index 8f31645fc67d..ab19a8d29df9 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/EnumerationCanBeIteration.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/EnumerationCanBeIteration.html @@ -1,6 +1,6 @@ -This inspection reports Enumeration methods +Reports Enumeration methods used, which can be replaced equivalent Iterator constructs. Iterators are part of the Java Collection Framework, which has been available since Java 1.2. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsBetweenInconvertibleTypes.html b/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsBetweenInconvertibleTypes.html index 0c4432f18fa3..1262025b4783 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsBetweenInconvertibleTypes.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsBetweenInconvertibleTypes.html @@ -1,6 +1,6 @@ -This inspection reports calls to .equals() where the target and argument are +Reports calls to .equals() where the target and argument are of incompatible types. While such a call might theoretically be useful, most likely it represents a bug. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsCalledOnEnumConstant.html b/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsCalledOnEnumConstant.html index 95690553f20f..25108708b412 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsCalledOnEnumConstant.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsCalledOnEnumConstant.html @@ -1,6 +1,6 @@ -This inspection reports calls to equals() on +Reports calls to equals() on Enum constants. Such calls can be replaced by an identity comparison (==) because two Enum constants are equal only when they diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsHashCodeCalledOnUrl.html b/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsHashCodeCalledOnUrl.html index faeba5bdcca3..f790dff6f34d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsHashCodeCalledOnUrl.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsHashCodeCalledOnUrl.html @@ -1,6 +1,6 @@ -This inspection reports .equals() or +Reports .equals() or .hashCode() being called on java.net.URL objects. This can cause performance problems because those methods uses a DNS lookup diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsUsesNonFinalVariable.html b/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsUsesNonFinalVariable.html index 08cb0838bfda..eeec9ee5f7cf 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsUsesNonFinalVariable.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsUsesNonFinalVariable.html @@ -1,6 +1,6 @@ -This inspection reports any implementations of equals() which access +Reports any implementations of equals() which access non-final variables. Such access may result in equals() returning different results at different points in an object's lifecycle, which may in turn cause problems when using the standard Collections classes. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsWhichDoesntCheckParameterClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsWhichDoesntCheckParameterClass.html index ce7608c0585a..391c10b24ddc 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsWhichDoesntCheckParameterClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsWhichDoesntCheckParameterClass.html @@ -1,6 +1,6 @@ -This inspection reports equals() +Reports equals() methods which do not check the type of their parameter. Failure to check the type of the parameter in the equals() method may result in latent errors if the object is later used in an untyped collection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ErrorRethrown.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ErrorRethrown.html index 44885df040e4..32fcddf49f50 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ErrorRethrown.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ErrorRethrown.html @@ -1,6 +1,6 @@ -This inspection reports try statements which catch +Reports try statements which catch java.lang.Error or any subclass and which do not rethrow the error. Statements which catch java.lang.ThreadDeath are not reported by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ExceptionFromCatchWhichDoesntWrap.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ExceptionFromCatchWhichDoesntWrap.html index 46d386754538..637c72000028 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ExceptionFromCatchWhichDoesntWrap.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ExceptionFromCatchWhichDoesntWrap.html @@ -1,6 +1,6 @@ -This inspection reports exceptions constructed and thrown +Reports exceptions constructed and thrown from inside catch blocks, which do not "wrap" the caught exception. It is considered good practice when throwing an exception in response to an exception to wrap the initial exception, so that valuable context information diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ExceptionNameDoesntEndWithException.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ExceptionNameDoesntEndWithException.html index 506b77fc78c2..97324917db58 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ExceptionNameDoesntEndWithException.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ExceptionNameDoesntEndWithException.html @@ -1,6 +1,6 @@ -This inspection reports exception classes whose names don't end with 'Exception'. +Reports exception classes whose names don't end with 'Exception'.

Powered by InspectionGadgets diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ExpectedExceptionNeverThrown.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ExpectedExceptionNeverThrown.html index 47aefcfa28af..4e6a76e12232 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ExpectedExceptionNeverThrown.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ExpectedExceptionNeverThrown.html @@ -1,6 +1,6 @@ -This inspection reports checked exceptions expected by a JUnit 4 test method, +Reports checked exceptions expected by a JUnit 4 test method, which are never thrown inside the method body.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ExtendsAnnotation.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ExtendsAnnotation.html index 90cf5aef0abd..dd0b6cfe9b3a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ExtendsAnnotation.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ExtendsAnnotation.html @@ -1,6 +1,6 @@ -This inspection reports any classes declared as implementing or extending an annotation +Reports any classes declared as implementing or extending an annotation interface. While it is legal to extend an annotation interface, it is nearly meaningless, and discouraged. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ExtendsConcreteCollection.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ExtendsConcreteCollection.html index f1a5ca3ba917..09fcbaf63a1d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ExtendsConcreteCollection.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ExtendsConcreteCollection.html @@ -1,6 +1,6 @@ -This inspection reports any clases which extend concrete classes of type +Reports any clases which extend concrete classes of type java.util.Collection or java.util.Map. Subclassing collection types is a common practice of novice object-oriented developers, but is considerably diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ExtendsObject.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ExtendsObject.html index 5231ff2cd268..73a0de13ae59 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ExtendsObject.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ExtendsObject.html @@ -1,6 +1,6 @@ -This inspection reports any classes explicitly declared to extend java.lang.Object. +Reports any classes explicitly declared to extend java.lang.Object.

Powered by InspectionGadgets diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ExtendsThread.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ExtendsThread.html index bb8a703d553d..c051dc4f9be1 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ExtendsThread.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ExtendsThread.html @@ -1,6 +1,6 @@ -This inspection reports any clases which extend java.lang.Thread. +Reports any clases which extend java.lang.Thread. It is usually thought better practice to delegate to rather than extend java.lang.Thread, so that a thread creator may exert better control over the thread's behavior, and to better localize all concurrency related operations. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ExtendsUtilityClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ExtendsUtilityClass.html index 756bcbbd9b2b..6e7f68e82dd6 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ExtendsUtilityClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ExtendsUtilityClass.html @@ -1,6 +1,6 @@ -This inspection reports any classes explicitly declared to extend a utility class. Utility classes +Reports any classes explicitly declared to extend a utility class. Utility classes have all fields and methods declared static. Extending a utility class also allows inadvertent object instantiation of the utility class, because to allow extension the constructor can not be made private. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ExternalizableWithSerializationMethods.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ExternalizableWithSerializationMethods.html index b097f6ab8fcb..ad36e23f7e7b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ExternalizableWithSerializationMethods.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ExternalizableWithSerializationMethods.html @@ -1,6 +1,6 @@ -This inspection reports Externalizable classes which define readObject() +Reports Externalizable classes which define readObject() or writeObject() methods. These methods are not called for serialization of Externalizable objects. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ExternalizableWithoutPublicNoArgConstructor.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ExternalizableWithoutPublicNoArgConstructor.html index 615f610b91cc..59e1723ed3fd 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ExternalizableWithoutPublicNoArgConstructor.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ExternalizableWithoutPublicNoArgConstructor.html @@ -1,6 +1,6 @@ -This inspection reports a Externalizable classes without a public no-argument constructor. +Reports a Externalizable classes without a public no-argument constructor. When an Externalizable object is reconstructed, an instance is created using the public no-arg constructor before the readExternal method called. If a public no-arg constructor is not present a java.io.InvalidClassException will be thrown at runtime. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/FallthruInSwitchStatement.html b/plugins/InspectionGadgets/src/inspectionDescriptions/FallthruInSwitchStatement.html index 2ddf8a99d871..947e3bbbb157 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/FallthruInSwitchStatement.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/FallthruInSwitchStatement.html @@ -1,6 +1,6 @@ -This inspection reports 'fallthrough' in a switch statement. +Reports 'fallthrough' in a switch statement. 'Fallthrough' is defined to occur when a series of executable statements after a switch label is not guaranteed to transfer control before the next switch label. In that case, control 'falls through' to the statements after that switch label, even though the switch expression does not equal diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/FeatureEnvy.html b/plugins/InspectionGadgets/src/inspectionDescriptions/FeatureEnvy.html index 1db0476a0940..54dfc60943f7 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/FeatureEnvy.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/FeatureEnvy.html @@ -1,6 +1,6 @@ -This inspection reports the "Feature Envy" code smell. Feature +Reports the "Feature Envy" code smell. Feature envy is defined as occurring when a method calls methods on another class three or more times. Calls to library classes, parent classes, contained or containing classes are not counted for purposes of this inspection. Feature diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/FieldAccessedSynchronizedAndUnsynchronized.html b/plugins/InspectionGadgets/src/inspectionDescriptions/FieldAccessedSynchronizedAndUnsynchronized.html index 806bd3ffc939..640b175df97d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/FieldAccessedSynchronizedAndUnsynchronized.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/FieldAccessedSynchronizedAndUnsynchronized.html @@ -1,6 +1,6 @@ -This inspection reports non-final fields which are accessed in both synchronized and +Reports non-final fields which are accessed in both synchronized and unsynchronized contexts. Volatile fields and accesses in constructors and initializers are ignored by this inspection. Such "partially synchronized" access is often the result of a coding oversight, and may result in unexpectedly inconsistent data structures. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/FieldCount.html b/plugins/InspectionGadgets/src/inspectionDescriptions/FieldCount.html index 55ac08810201..1053fda73f13 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/FieldCount.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/FieldCount.html @@ -1,6 +1,6 @@ -This inspection reports class with too many fields. Classes with +Reports class with too many fields. Classes with a large number of fields are often trying to 'do too much', and may need to be refactored into multiple smaller classes. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/FieldHasSetterButNoGetter.html b/plugins/InspectionGadgets/src/inspectionDescriptions/FieldHasSetterButNoGetter.html index af8c68453265..432b0d344374 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/FieldHasSetterButNoGetter.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/FieldHasSetterButNoGetter.html @@ -1,6 +1,6 @@ -This inspection reports any fields which have a "setter" method but no "getter" method. +Reports any fields which have a "setter" method but no "getter" method. While within the Java beans spec, such fields may be unnecessarily difficult to work with in certain bean containers. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/FieldHidesSuperclassField.html b/plugins/InspectionGadgets/src/inspectionDescriptions/FieldHidesSuperclassField.html index 5045a149d8fb..6f0bb1169c20 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/FieldHidesSuperclassField.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/FieldHidesSuperclassField.html @@ -1,6 +1,6 @@ -This inspection reports fields with the same name as a field in an ancestor class. Such field +Reports fields with the same name as a field in an ancestor class. Such field names may be confusing, and can be bug-prone.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/FieldMayBeFinal.html b/plugins/InspectionGadgets/src/inspectionDescriptions/FieldMayBeFinal.html index 475039e88c30..3b3dab297596 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/FieldMayBeFinal.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/FieldMayBeFinal.html @@ -1,6 +1,6 @@ -This inspection reports any fields which may safely be made final. +Reports any fields which may safely be made final. A static field may be final if it is initialized in its declaration or in one static class initializer, but not both. A non-static field may be final if it is initialized in its declaration or in one non-static class initializer or in all constructors. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/FieldMayBeStatic.html b/plugins/InspectionGadgets/src/inspectionDescriptions/FieldMayBeStatic.html index 033bfbec8b93..94a522efce6f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/FieldMayBeStatic.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/FieldMayBeStatic.html @@ -1,6 +1,6 @@ -This inspection reports any instance variables which may safely be made static. A field +Reports any instance variables which may safely be made static. A field may be static if it is declared final, and is initialized with a constant.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/FieldRepeatedlyAccessed.html b/plugins/InspectionGadgets/src/inspectionDescriptions/FieldRepeatedlyAccessed.html index 5b479471108e..b27dc2ec0f89 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/FieldRepeatedlyAccessed.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/FieldRepeatedlyAccessed.html @@ -3,7 +3,7 @@ This inspection is intended for J2ME and other highly resource constrained environments. Applying the results of this inspection without consideration might have negative effects on code clarity and design.

-This inspection reports fields which are accessed three or more times by a given method, +Reports fields which are accessed three or more times by a given method, or which are accessed in a loop. While such field access may be logically correct, it is often more performant to replace such accesses with local variables, copying the fields to a temporary local and copying back if necessary. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/FinalClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/FinalClass.html index 54059dea46c9..7f29a362be1c 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/FinalClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/FinalClass.html @@ -1,6 +1,6 @@ -This inspection reports classes being declared final. Some coding +Reports classes being declared final. Some coding standards discourage final classes.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/FinalMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/FinalMethod.html index e2b776382131..41ea0102cf98 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/FinalMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/FinalMethod.html @@ -1,6 +1,6 @@ -This inspection reports methods being declared final. Some coding +Reports methods being declared final. Some coding standards discourage final methods.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/FinalMethodInFinalClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/FinalMethodInFinalClass.html index f014731268a4..e3e203126f00 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/FinalMethodInFinalClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/FinalMethodInFinalClass.html @@ -1,6 +1,6 @@ -This inspection reports methods being declared final in +Reports methods being declared final in classes that are declared final. This is unnecessary, and may be confusing.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/FinalPrivateMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/FinalPrivateMethod.html index 08a69e5ab5b2..17293abb5233 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/FinalPrivateMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/FinalPrivateMethod.html @@ -1,6 +1,6 @@ -This inspection reports methods +Reports methods declared final and private. As private methods cannot be meaningfully overridden, declaring them final is redundant. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/FinalStaticMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/FinalStaticMethod.html index 51d3f6e5f74f..4e5cc9a4572a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/FinalStaticMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/FinalStaticMethod.html @@ -1,6 +1,6 @@ -This inspection reports methods declared final and static. +Reports methods declared final and static. When a static method is overridden in a subclass it can still be accessed via the super class, making a final declaration not very necessary. Declaring a static method final diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/Finalize.html b/plugins/InspectionGadgets/src/inspectionDescriptions/Finalize.html index fd037620112c..a9180e87bf8d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/Finalize.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/Finalize.html @@ -1,6 +1,6 @@ -This inspection reports any implementations of +Reports any implementations of a finalize() method. For performance reasons or due to inability to guarantee that finalize() will ever be called, some coding standards prohibit its use. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/FinalizeCallsSuperFinalize.html b/plugins/InspectionGadgets/src/inspectionDescriptions/FinalizeCallsSuperFinalize.html index 90899bea2aa1..9a60f33752c7 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/FinalizeCallsSuperFinalize.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/FinalizeCallsSuperFinalize.html @@ -1,6 +1,6 @@ -This inspection reports any implementations of the Object.finalize() method +Reports any implementations of the Object.finalize() method which do not call super.finalize(). Failing to call super.finalize() may result in objects failing to properly free any resources held or do other cleanup activities. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/FinalizeNotProtected.html b/plugins/InspectionGadgets/src/inspectionDescriptions/FinalizeNotProtected.html index bd5d83809f54..3369d9b22023 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/FinalizeNotProtected.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/FinalizeNotProtected.html @@ -1,6 +1,6 @@ -This inspection reports any implementations of the Object.finalize() method +Reports any implementations of the Object.finalize() method which are not declared protected. finalize() should be declare protected, to prevent it from being explicitly invoked by other classes. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/FinallyBlockCannotCompleteNormally.html b/plugins/InspectionGadgets/src/inspectionDescriptions/FinallyBlockCannotCompleteNormally.html index 9ca990f848cb..2688b89d524a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/FinallyBlockCannotCompleteNormally.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/FinallyBlockCannotCompleteNormally.html @@ -1,6 +1,6 @@ -This inspection reports finally blocks which +Reports finally blocks which can not complete normally.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/FloatingPointEquality.html b/plugins/InspectionGadgets/src/inspectionDescriptions/FloatingPointEquality.html index 43ea70eb4275..89de5e445ef5 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/FloatingPointEquality.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/FloatingPointEquality.html @@ -1,6 +1,6 @@ -This inspection reports floating-point values +Reports floating-point values being compared with == or !=. Floating point values are inherently inaccurate, and comparing them for exact equality is almost never the desired semantics. This inspection ignores comparisons diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ForCanBeForeach.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ForCanBeForeach.html index 4563b819f470..2e6283893e0b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ForCanBeForeach.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ForCanBeForeach.html @@ -1,6 +1,6 @@ -This inspection reports for loops which iterate +Reports for loops which iterate over collections or arrays, and can be replaced with the "for each" iteration syntax, available in Java 5 and newer. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ForLoopReplaceableByWhile.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ForLoopReplaceableByWhile.html index 4650c95513fe..cb31dfb5b59f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ForLoopReplaceableByWhile.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ForLoopReplaceableByWhile.html @@ -1,6 +1,6 @@ -This inspection reports for loops +Reports for loops which contain neither initialization or update components, and can thus be replaced by simpler while statements. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ForLoopThatDoesntUseLoopVariable.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ForLoopThatDoesntUseLoopVariable.html index 84ba3e9169f1..4994169bddb5 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ForLoopThatDoesntUseLoopVariable.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ForLoopThatDoesntUseLoopVariable.html @@ -1,6 +1,6 @@ -This inspection reports for loops where the condition or +Reports for loops where the condition or update does not use the for loop variable.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ForLoopWithMissingComponent.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ForLoopWithMissingComponent.html index a69d51e4ba66..c89633135812 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ForLoopWithMissingComponent.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ForLoopWithMissingComponent.html @@ -1,6 +1,6 @@ -This inspection reports for loops +Reports for loops that lack initialization, condition, or update clauses. Some coding styles prohibit such loops. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ForeachStatement.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ForeachStatement.html index 040d6a73f734..fb2ca2221c01 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ForeachStatement.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ForeachStatement.html @@ -1,6 +1,6 @@ -This inspection reports the Java 5 for statement syntax. +Reports the Java 5 for statement syntax. Such for statements are not supported under Java 1.4 and older.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/HardcodedFileSeparators.html b/plugins/InspectionGadgets/src/inspectionDescriptions/HardcodedFileSeparators.html index c1f86cc7d6c3..3fc87417c8fc 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/HardcodedFileSeparators.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/HardcodedFileSeparators.html @@ -1,6 +1,6 @@ -This inspection reports the forward (/) or backward (\) slash in a string or +Reports the forward (/) or backward (\) slash in a string or character literal. These characters are commonly used as file separators, and portability may suffer if their use is hardcoded. This will not report a forward slash immediately following a '<' character, or immediately preceding a '>' character, as those often indicate XML or HTML tags rather than file names, diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/HardcodedLineSeparators.html b/plugins/InspectionGadgets/src/inspectionDescriptions/HardcodedLineSeparators.html index 39ed41aad409..2f69ff5ab801 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/HardcodedLineSeparators.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/HardcodedLineSeparators.html @@ -1,6 +1,6 @@ -This inspection reports the newline (\n) or return (\r) characters in a string or +Reports the newline (\n) or return (\r) characters in a string or character literal. These characters are commonly used as line separators, and portability may suffer they are hardcoded.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/HashCodeUsesNonFinalVariable.html b/plugins/InspectionGadgets/src/inspectionDescriptions/HashCodeUsesNonFinalVariable.html index 93cd3d1dddd4..207a60a033ce 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/HashCodeUsesNonFinalVariable.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/HashCodeUsesNonFinalVariable.html @@ -1,6 +1,6 @@ -This inspection reports any implementations of hashcode() which access +Reports any implementations of hashcode() which access non-final variables. Such access may result in hashcode() returning different values at different points in an object's lifecycle, which may in turn cause problems when using the standard Collections classes. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/HibernateResource.html b/plugins/InspectionGadgets/src/inspectionDescriptions/HibernateResource.html index 18d36b408d7d..4f3791850f7e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/HibernateResource.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/HibernateResource.html @@ -1,7 +1,7 @@ -This inspection reports any Hibernate resource which is not opened in a try +Reports any Hibernate resource which is not opened in a try block and closed in the corresponding finally block. Such resources may be inadvertently leaked if an exception is thrown before the resource is closed. Hibernate resources reported by this inspection include org.hibernate.Session. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/HtmlTagCanBeJavadocTag.html b/plugins/InspectionGadgets/src/inspectionDescriptions/HtmlTagCanBeJavadocTag.html index d8983bf0ac24..48698aaef19e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/HtmlTagCanBeJavadocTag.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/HtmlTagCanBeJavadocTag.html @@ -1,6 +1,6 @@ -This inspection reports use of <code> tags in Javadoc comments. Since JDK1.5 +Reports use of <code> tags in Javadoc comments. Since JDK1.5 these constructs may be replaced with {@code ...} constructs. This allows the use of angle brackets (<>) inside the comment, instead of HTML character entities. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/IOResource.html b/plugins/InspectionGadgets/src/inspectionDescriptions/IOResource.html index 4c0c383c9a15..a0894221d9d6 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/IOResource.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/IOResource.html @@ -1,6 +1,6 @@ -This inspection reports any I/O resource which is not opened in front of a try +Reports any I/O resource which is not opened in front of a try block and closed in the corresponding finally block. Such resources may be inadvertently leaked if an exception is thrown before the resource is closed. I/O resources checked by this inspection include java.io.InputStream, diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/IfCanBeSwitch.html b/plugins/InspectionGadgets/src/inspectionDescriptions/IfCanBeSwitch.html index 61f6cb6c3bdd..f94bc8ab5f85 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/IfCanBeSwitch.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/IfCanBeSwitch.html @@ -1,6 +1,6 @@ -This inspection reports any if statements with which can be replaced +Reports any if statements with which can be replaced by a switch statement. This inspection will automatically suggest string switches when the project language level is jdk 1.7 or higher. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/IfMayBeConditional.html b/plugins/InspectionGadgets/src/inspectionDescriptions/IfMayBeConditional.html index 245111adac62..a3278d62b1ff 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/IfMayBeConditional.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/IfMayBeConditional.html @@ -1,6 +1,6 @@ -This inspection reports any if +Reports any if statements with then and else branches which are both assignment expressions or both return statements. The same semantics can be expressed more compactly, and arguably diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/IfStatementWithIdenticalBranches.html b/plugins/InspectionGadgets/src/inspectionDescriptions/IfStatementWithIdenticalBranches.html index e1c1ca5f40b1..7a8df92d9e6b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/IfStatementWithIdenticalBranches.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/IfStatementWithIdenticalBranches.html @@ -1,6 +1,6 @@ -This inspection reports if +Reports if statements with identical "then" and else branches. Such statements are almost certainly programmer error. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/IfStatementWithTooManyBranches.html b/plugins/InspectionGadgets/src/inspectionDescriptions/IfStatementWithTooManyBranches.html index 425f18c85870..ba3b4cd5bf61 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/IfStatementWithTooManyBranches.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/IfStatementWithTooManyBranches.html @@ -1,6 +1,6 @@ -This inspection reports if statements with too many branches. +Reports if statements with too many branches. Such statements may be confusing, and are often the sign of inadequate levels of design abstraction. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/IgnoreResultOfCall.html b/plugins/InspectionGadgets/src/inspectionDescriptions/IgnoreResultOfCall.html index 643f05700930..a6c56b1ebe81 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/IgnoreResultOfCall.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/IgnoreResultOfCall.html @@ -1,6 +1,6 @@ -This inspection reports any calls to a specified list of +Reports any calls to a specified list of methods where the result of that call is ignored. For many methods, ignoring the result is perfectly legitimate, but for some methods it is almost certainly an error. Examples of methods where ignoring the result of a call is likely to be an error include java.io.inputStream.read(), diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/IgnoredJUnitTest.html b/plugins/InspectionGadgets/src/inspectionDescriptions/IgnoredJUnitTest.html index 33cc38bcb97f..763e7533c9b7 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/IgnoredJUnitTest.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/IgnoredJUnitTest.html @@ -1,6 +1,6 @@ -This inspection reports JUnit tests which are annotated with @Ignore. +Reports JUnit tests which are annotated with @Ignore.

New in 11, Powered by InspectionGadgets diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ImplicitArrayToString.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ImplicitArrayToString.html index 7040876f85b5..e85e333da598 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ImplicitArrayToString.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ImplicitArrayToString.html @@ -1,6 +1,6 @@ -This inspection reports any arrays used in String +Reports any arrays used in String concatenations or as parameters to java.io.PrintStream methods (such as System.out.println()). Usually in such a case, the contents of the array were meant to be used and the not array object itself. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ImplicitCallToSuper.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ImplicitCallToSuper.html index c0d36e2a52a2..fc27fa786cdf 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ImplicitCallToSuper.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ImplicitCallToSuper.html @@ -1,6 +1,6 @@ -This inspection reports constructors which do not begin with calls to "super" constructor, or +Reports constructors which do not begin with calls to "super" constructor, or other constructors of the same class. Such constructors can be thought of as implicitly beginning with a call to super(). Some coding standards prefer that such calls to super() be made explicitly. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ImplicitNumericConversion.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ImplicitNumericConversion.html index a1f747e9800c..a86611df3f97 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ImplicitNumericConversion.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ImplicitNumericConversion.html @@ -1,6 +1,6 @@ -This inspection reports implicit conversion between numeric types. +Reports implicit conversion between numeric types. Implicit numeric conversion is not a problem in itself, but if unexpected may be a source of difficult to trace bugs. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/IncompatibleMask.html b/plugins/InspectionGadgets/src/inspectionDescriptions/IncompatibleMask.html index fc96945f2791..2bbde64547ca 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/IncompatibleMask.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/IncompatibleMask.html @@ -1,6 +1,6 @@ -This inspection reports bitwise mask expressions which are guaranteed to +Reports bitwise mask expressions which are guaranteed to evaluate to true or false. Expressions checked are of the form (var & constant1) == constant2 or (var | constant1) == constant2, where constant1 diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/IncrementDecrementUsedAsExpression.html b/plugins/InspectionGadgets/src/inspectionDescriptions/IncrementDecrementUsedAsExpression.html index d1179ea334b5..3bb7ddfe1a2a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/IncrementDecrementUsedAsExpression.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/IncrementDecrementUsedAsExpression.html @@ -1,6 +1,6 @@ -This inspection reports increment or decrement expressions nested inside other expressions. +Reports increment or decrement expressions nested inside other expressions. While admirably terse, such expressions may be confusing, and violate the general design principle that a given construct should do precisely one thing. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/IndexOfReplaceableByContains.html b/plugins/InspectionGadgets/src/inspectionDescriptions/IndexOfReplaceableByContains.html index 4639220fe105..a5b98b373b7e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/IndexOfReplaceableByContains.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/IndexOfReplaceableByContains.html @@ -1,6 +1,6 @@ -This inspection reports any String.indexOf() +Reports any String.indexOf() expressions which can be replaced with a call to the String.contains() method available in Java 5 and newer.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/InfiniteLoopStatement.html b/plugins/InspectionGadgets/src/inspectionDescriptions/InfiniteLoopStatement.html index fe10bc41c1d8..30e9a1ad26de 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/InfiniteLoopStatement.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/InfiniteLoopStatement.html @@ -1,6 +1,6 @@ -This inspection reports for, while, +Reports for, while, or do statements which can only exit by throwing an exception. While such statements may be correct, they are often a symptom of coding errors. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/InfiniteRecursion.html b/plugins/InspectionGadgets/src/inspectionDescriptions/InfiniteRecursion.html index 064cd56f2747..1dc1c104f007 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/InfiniteRecursion.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/InfiniteRecursion.html @@ -1,6 +1,6 @@ -This inspection reports methods which must either recurse +Reports methods which must either recurse infinitely or throw an exception. Methods reported by this inspection can not return normally. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/InnerClassMayBeStatic.html b/plugins/InspectionGadgets/src/inspectionDescriptions/InnerClassMayBeStatic.html index abfb36500975..e9ce25f63b22 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/InnerClassMayBeStatic.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/InnerClassMayBeStatic.html @@ -1,6 +1,6 @@ -This inspection reports any inner classes which may safely be made +Reports any inner classes which may safely be made static. An inner class may be static if it doesn't reference its enclosing class instance. A static inner class uses slightly less memory. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/InnerClassOnInterface.html b/plugins/InspectionGadgets/src/inspectionDescriptions/InnerClassOnInterface.html index 95629ffc78a7..fae719e11e7d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/InnerClassOnInterface.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/InnerClassOnInterface.html @@ -1,6 +1,6 @@ -This inspection reports inner classes +Reports inner classes of interface classes. Some coding standards discourage such classes. Enumeration classes and annotation classes are not reported by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/InnerClassVariableHidesOuterClassVariable.html b/plugins/InspectionGadgets/src/inspectionDescriptions/InnerClassVariableHidesOuterClassVariable.html index d1a1911f60af..77ed6e22dc65 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/InnerClassVariableHidesOuterClassVariable.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/InnerClassVariableHidesOuterClassVariable.html @@ -1,6 +1,6 @@ -This inspection reports inner class variables being named identically to member variables of a containing class. +Reports inner class variables being named identically to member variables of a containing class. Such a variable name may be confusing.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceMethodNamingConvention.html b/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceMethodNamingConvention.html index a933b2648864..6b5506a05232 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceMethodNamingConvention.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceMethodNamingConvention.html @@ -1,6 +1,6 @@ -This inspection reports instance methods whose names are either too short, too long, or do not follow +Reports instance methods whose names are either too short, too long, or do not follow the specified regular expression pattern. Instance methods that override library methods are ignored by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceVariableInitialization.html b/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceVariableInitialization.html index 23ce77241843..12779b82336b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceVariableInitialization.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceVariableInitialization.html @@ -1,6 +1,6 @@ -This inspection reports instance variables which are not guaranteed to be initialized upon object initialization. +Reports instance variables which are not guaranteed to be initialized upon object initialization.

Note: This inspection uses a very conservative dataflow algorithm, and may report instance variables as uninitialized incorrectly. Variables reported as initialized will always be initialized. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceVariableNamingConvention.html b/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceVariableNamingConvention.html index e5ec6483d18f..4f0efb6c957f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceVariableNamingConvention.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceVariableNamingConvention.html @@ -1,6 +1,6 @@ -This inspection reports instance variables whose names are either too short, too long, or do not follow +Reports instance variables whose names are either too short, too long, or do not follow the specified regular expression pattern.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceVariableOfConcreteClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceVariableOfConcreteClass.html index b742d317e6f5..c5e302f55da6 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceVariableOfConcreteClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceVariableOfConcreteClass.html @@ -1,6 +1,6 @@ -This inspection reports any instance fields whose type is declared to be a concrete class, rather than an interface. +Reports any instance fields whose type is declared to be a concrete class, rather than an interface. Such declarations may represent a failure of abstraction, and may make testing more difficult. Declarations whose classes come from system or third-party libraries will not be reported by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceVariableUninitializedUse.html b/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceVariableUninitializedUse.html index 4b0e5a48b4c1..73c71edbba1e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceVariableUninitializedUse.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceVariableUninitializedUse.html @@ -1,6 +1,6 @@ -This inspection reports reads of instance variables which are not yet initialized. +Reports reads of instance variables which are not yet initialized.

Note: This inspection uses a very conservative dataflow algorithm, and may report instance variables as uninitialized incorrectly. Variables reported as initialized will always be initialized. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceofCatchParameter.html b/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceofCatchParameter.html index fb2a3c180a35..10e10c9c8e0e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceofCatchParameter.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceofCatchParameter.html @@ -1,6 +1,6 @@ -This inspection reports any instanceof expressions on catch block parameters. +Reports any instanceof expressions on catch block parameters. Testing the type of catch parameters is usually better done by having separate catch blocks, rather than instanceof. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceofChain.html b/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceofChain.html index b3f7605c5562..8963e1562c2a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceofChain.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceofChain.html @@ -1,6 +1,6 @@ -This inspection reports any chains of if-else statements all of whose conditions are instanceof expressions +Reports any chains of if-else statements all of whose conditions are instanceof expressions (or combinations of such expressions). Such constructions usually indicate a failure of object-oriented design, which dictates that such type-based dispatch should be done via polymorphic method calls rather than explicit chains of type tests. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceofIncompatibleInterface.html b/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceofIncompatibleInterface.html index 131ca3a28a43..d27bf68e63e6 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceofIncompatibleInterface.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceofIncompatibleInterface.html @@ -1,6 +1,6 @@ -This inspection reports instanceof expressions where +Reports instanceof expressions where the compared type is an interface, and the compared expression has a class type which neither implements the compared interface, nor has any visible subclasses which implement or extend the compared interface. While it is possible that this was intended, such a construct is most likely an error, where diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceofInterfaces.html b/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceofInterfaces.html index 8d523346bee6..781e1cfafbd1 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceofInterfaces.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceofInterfaces.html @@ -1,6 +1,6 @@ -This inspection reports on uses of instanceof where the type checked for is a concrete class, +Reports on uses of instanceof where the type checked for is a concrete class, rather than an interface. Such uses often indicate excessive coupling to concrete implementations, rather than abstractions. instanceof expressions whose classes come from system or third-party libraries will not be reported by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceofThis.html b/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceofThis.html index 0a96a2ca4df2..c36fe5c200e5 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceofThis.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/InstanceofThis.html @@ -1,6 +1,6 @@ -This inspection reports on uses of instanceof where the +Reports on uses of instanceof where the expression checked is this. Such expressions are indicative of a failure of object-oriented design, and should be replaced by polymorphic constructions. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/InstantiatingObjectToGetClassObject.html b/plugins/InspectionGadgets/src/inspectionDescriptions/InstantiatingObjectToGetClassObject.html index e100ba383a4a..0c8af2c07f9c 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/InstantiatingObjectToGetClassObject.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/InstantiatingObjectToGetClassObject.html @@ -1,6 +1,6 @@ -This inspection reports any cases where new objects are instantiated for the purpose +Reports any cases where new objects are instantiated for the purpose of accessing its class object. It is more performant to access the class object directly by name. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/InstantiationOfUtilityClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/InstantiationOfUtilityClass.html index 9a21072aade7..0e4d0de4d0aa 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/InstantiationOfUtilityClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/InstantiationOfUtilityClass.html @@ -1,6 +1,6 @@ -This inspection reports any new expressions which instantiate utility classes. +Reports any new expressions which instantiate utility classes. Utility classes have all fields and methods declared static, and their presence may indicate a lack of object-oriented design. Instantiation of such classes most likely indicates programmer error. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/IntLiteralMayBeLongLiteral.html b/plugins/InspectionGadgets/src/inspectionDescriptions/IntLiteralMayBeLongLiteral.html index 16c42076d529..12d5d1bb3cf9 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/IntLiteralMayBeLongLiteral.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/IntLiteralMayBeLongLiteral.html @@ -1,6 +1,6 @@ -This inspection reports int literal expressions +Reports int literal expressions which are immediately cast to long. Such literal expressions can be replaced with the equivalent long literal. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/IntegerDivisionInFloatingPointContext.html b/plugins/InspectionGadgets/src/inspectionDescriptions/IntegerDivisionInFloatingPointContext.html index 4ffbecf5cc3c..6196379b1188 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/IntegerDivisionInFloatingPointContext.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/IntegerDivisionInFloatingPointContext.html @@ -1,6 +1,6 @@ -This inspection reports integer division where the +Reports integer division where the result is either directly or indirectly used as a floating point number. Such division is often an error, and may result in unexpected results due to truncation in integer division. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/IntegerMultiplicationImplicitCastToLong.html b/plugins/InspectionGadgets/src/inspectionDescriptions/IntegerMultiplicationImplicitCastToLong.html index bf7e536a7b84..d3b0deadb42d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/IntegerMultiplicationImplicitCastToLong.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/IntegerMultiplicationImplicitCastToLong.html @@ -1,6 +1,6 @@ -This inspection reports integer multiplication or left shift +Reports integer multiplication or left shift which are implicitly cast to long. Such multiplication is often an error, as overflow truncation may occur unexpectedly. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/InterfaceNamingConvention.html b/plugins/InspectionGadgets/src/inspectionDescriptions/InterfaceNamingConvention.html index 157101edbdce..bd8d7e5ba8b5 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/InterfaceNamingConvention.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/InterfaceNamingConvention.html @@ -1,6 +1,6 @@ -This inspection reports interfaces whose names are either too short, too long, or do not follow +Reports interfaces whose names are either too short, too long, or do not follow the specified regular expression pattern.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/InterfaceNeverImplemented.html b/plugins/InspectionGadgets/src/inspectionDescriptions/InterfaceNeverImplemented.html index b8b0959bb579..4a4b142d86fe 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/InterfaceNeverImplemented.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/InterfaceNeverImplemented.html @@ -1,6 +1,6 @@ -This inspection reports interfaces which have no concrete subclasses. +Reports interfaces which have no concrete subclasses.

Powered by InspectionGadgets diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/InterfaceWithOnlyOneDirectInheritor.html b/plugins/InspectionGadgets/src/inspectionDescriptions/InterfaceWithOnlyOneDirectInheritor.html index fd553dda9e75..d61b573a4bd9 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/InterfaceWithOnlyOneDirectInheritor.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/InterfaceWithOnlyOneDirectInheritor.html @@ -3,7 +3,7 @@ This inspection is intended for J2ME and other highly resource constrained environments. Applying the results of this inspection without consideration might have negative effects on code clarity and design.

-This inspection reports interfaces which have precisely one +Reports interfaces which have precisely one direct inheritor. While such interfaces may offer admirable clarity of design, in memory-constrained or bandwidth-limited environments, they needlessly increase the total footprint of the application. Consider diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/IteratorHasNextCallsIteratorNext.html b/plugins/InspectionGadgets/src/inspectionDescriptions/IteratorHasNextCallsIteratorNext.html index f0110fae491b..1495cb2858de 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/IteratorHasNextCallsIteratorNext.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/IteratorHasNextCallsIteratorNext.html @@ -1,6 +1,6 @@ -This inspection reports any implementations of Iterator.hasNext() +Reports any implementations of Iterator.hasNext() which call next() on themselves. While this is a common mistake, such calls are almost certainly in error, as hasNext() should not modify the iterators state, while next() should. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/IteratorNextDoesNotThrowNoSuchElementException.html b/plugins/InspectionGadgets/src/inspectionDescriptions/IteratorNextDoesNotThrowNoSuchElementException.html index ef2d13309318..c42a2bf5449a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/IteratorNextDoesNotThrowNoSuchElementException.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/IteratorNextDoesNotThrowNoSuchElementException.html @@ -1,6 +1,6 @@ -This inspection reports any implementations of Iterator.next() +Reports any implementations of Iterator.next() which can not throw java.util.NoSuchElementException. Such implementations violate the contract of java.util.Iterator, and may result in subtle bugs if the iterator is ever used in a non-standard fashion. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/JDBCExecuteWithNonConstantString.html b/plugins/InspectionGadgets/src/inspectionDescriptions/JDBCExecuteWithNonConstantString.html index 748c205df5e3..aaf88ddd8c37 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/JDBCExecuteWithNonConstantString.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/JDBCExecuteWithNonConstantString.html @@ -1,6 +1,6 @@ -This inspection reports the calls to java.sql.Statement.execute() or any +Reports the calls to java.sql.Statement.execute() or any of its variants which take a dynamically-constructed string as the query to execute. Constructed SQL statements are a common source of security breaches. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/JDBCPrepareStatementWithNonConstantString.html b/plugins/InspectionGadgets/src/inspectionDescriptions/JDBCPrepareStatementWithNonConstantString.html index 764b67a6027c..7fdd805c7a08 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/JDBCPrepareStatementWithNonConstantString.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/JDBCPrepareStatementWithNonConstantString.html @@ -1,6 +1,6 @@ -This inspection reports the calls to java.sql.Connection.prepareStatement(), +Reports the calls to java.sql.Connection.prepareStatement(), java.sql.Connection.prepareCall()or any of their variants which take a dynamically-constructed string as the statement to prepare. Constructed SQL statements are a common source of security breaches. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/JDBCResource.html b/plugins/InspectionGadgets/src/inspectionDescriptions/JDBCResource.html index 2093303db7f8..39852c09f870 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/JDBCResource.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/JDBCResource.html @@ -1,6 +1,6 @@ -This inspection reports any JDBC resource which is not opened in front of a try +Reports any JDBC resource which is not opened in front of a try block and closed in the corresponding finally block. Such resources may be inadvertently leaked if an exception is thrown before the resource is closed. JDBC resources reported by this inspection include java.sql.Connection, diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/JNDIResource.html b/plugins/InspectionGadgets/src/inspectionDescriptions/JNDIResource.html index ec3a3c36f6c6..3aad1f95b07b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/JNDIResource.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/JNDIResource.html @@ -1,7 +1,7 @@ -This inspection reports any JNDI resource which is not opened in front of a try +Reports any JNDI resource which is not opened in front of a try block and closed in the corresponding finally block. Such resources may be inadvertently leaked if an exception is thrown before the resource is closed. JNDI resources reported by this inspection include javax.naming.InitialContext, diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/JUnit3StyleTestMethodInJUnit4Class.html b/plugins/InspectionGadgets/src/inspectionDescriptions/JUnit3StyleTestMethodInJUnit4Class.html index 6ccb84e18ee1..06ad552ed046 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/JUnit3StyleTestMethodInJUnit4Class.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/JUnit3StyleTestMethodInJUnit4Class.html @@ -1,6 +1,6 @@ -This inspection reports JUnit 3 style test methods which are located inside a class +Reports JUnit 3 style test methods which are located inside a class which does not extend the abstract JUnit 3 class TestCase and contains JUnit 4 @Test annotated methods. In addition to being confusing such test methods will not be run. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/JUnit4AnnotatedMethodInJUnit3TestCase.html b/plugins/InspectionGadgets/src/inspectionDescriptions/JUnit4AnnotatedMethodInJUnit3TestCase.html index 736370eb6bfa..bb0a5e59bcfe 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/JUnit4AnnotatedMethodInJUnit3TestCase.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/JUnit4AnnotatedMethodInJUnit3TestCase.html @@ -1,6 +1,6 @@ -This inspection reports JUnit 4 @Test annotated methods which are located inside a class +Reports JUnit 4 @Test annotated methods which are located inside a class extending the abstract JUnit 3 class TestCase. Mixing JUnit API's like this is confusing and can lead to problems running the tests, for example a method annotated with @Ignore won't be actually ignored if its name starts with test. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/JUnitAbstractTestClassNamingConvention.html b/plugins/InspectionGadgets/src/inspectionDescriptions/JUnitAbstractTestClassNamingConvention.html index 7e39447d9464..6e9ed206f39e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/JUnitAbstractTestClassNamingConvention.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/JUnitAbstractTestClassNamingConvention.html @@ -1,6 +1,6 @@ -This inspection reports abstract JUnit test classes whose names are either too short, too long, or do not follow +Reports abstract JUnit test classes whose names are either too short, too long, or do not follow the specified regular expression pattern. For clarity and ease of tooling, it is a common coding standard that abstract JUnit test classes follow a specific pattern, usually requiring that the class name end with "TestCase". diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/JUnitTestClassNamingConvention.html b/plugins/InspectionGadgets/src/inspectionDescriptions/JUnitTestClassNamingConvention.html index ee08146fd1f9..797ef090f0a5 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/JUnitTestClassNamingConvention.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/JUnitTestClassNamingConvention.html @@ -1,6 +1,6 @@ -This inspection reports JUnit test classes whose names are either too short, too long, or do not follow +Reports JUnit test classes whose names are either too short, too long, or do not follow the specified regular expression pattern. For clarity and ease of tooling, it is a common coding standard that concrete JUnit test classes follow a specific pattern, usually requiring that the class name end with "Test". diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/JavaLangImport.html b/plugins/InspectionGadgets/src/inspectionDescriptions/JavaLangImport.html index dc513bf94872..c7bc92740148 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/JavaLangImport.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/JavaLangImport.html @@ -1,6 +1,6 @@ -This inspection reports any import statements which refer to the java.lang package. +Reports any import statements which refer to the java.lang package. Such import statements are unnecessary. Since IDEA can automatically detect and fix such statements with its "Optimize Imports" command, this inspection is mostly useful for off-line reporting on code bases that you don't intend to change. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/JavaLangReflect.html b/plugins/InspectionGadgets/src/inspectionDescriptions/JavaLangReflect.html index 924d436ed937..31914d127360 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/JavaLangReflect.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/JavaLangReflect.html @@ -1,6 +1,6 @@ -This inspection reports any uses of classes in the java.lang.reflect package. While powerful, +Reports any uses of classes in the java.lang.reflect package. While powerful, reflection in Java is often slow, and may possibly be unsafe is it prevents compile-time type and exception checking. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/KeySetIterationMayUseEntrySet.html b/plugins/InspectionGadgets/src/inspectionDescriptions/KeySetIterationMayUseEntrySet.html index 3bdb51c07ae8..957b4f5c0d5a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/KeySetIterationMayUseEntrySet.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/KeySetIterationMayUseEntrySet.html @@ -1,6 +1,6 @@ -This inspection reports iteration over the keySet() +Reports iteration over the keySet() of a java.util.Map instance, where the iterated keys are used to retrieve the values from the map. Such iteration may be more efficiently replaced by iteration over the diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/LabeledStatement.html b/plugins/InspectionGadgets/src/inspectionDescriptions/LabeledStatement.html index 34345f1ea535..46f49e2dacf7 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/LabeledStatement.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/LabeledStatement.html @@ -1,6 +1,6 @@ -This inspection reports labeled statements. +Reports labeled statements.

Powered by InspectionGadgets diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/LawOfDemeter.html b/plugins/InspectionGadgets/src/inspectionDescriptions/LawOfDemeter.html index 9c1fa11fcbd2..8f372da4ef9b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/LawOfDemeter.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/LawOfDemeter.html @@ -1,6 +1,6 @@ -This inspection reports any Law of Demeter violations. +Reports any Law of Demeter violations. See here http://en.wikipedia.org/wiki/Law_of_Demeter for an explanation what the Law of Demeter is. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/LengthOneStringInIndexOf.html b/plugins/InspectionGadgets/src/inspectionDescriptions/LengthOneStringInIndexOf.html index 18d3db1d9cb3..94f73e52a7b9 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/LengthOneStringInIndexOf.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/LengthOneStringInIndexOf.html @@ -1,6 +1,6 @@ -This inspection reports String literals of length one being used +Reports String literals of length one being used as a parameter in String.indexOf() or String.lastIndexOf() calls. These String literals may be replaced by equivalent character literals, gaining some performance enhancement. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/LengthOneStringsInConcatenation.html b/plugins/InspectionGadgets/src/inspectionDescriptions/LengthOneStringsInConcatenation.html index fdc1362ee289..409e4f9a818f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/LengthOneStringsInConcatenation.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/LengthOneStringsInConcatenation.html @@ -1,6 +1,6 @@ -This inspection reports String literals of length one being used in concatenation. +Reports String literals of length one being used in concatenation. These literals may be replaced by equivalent character literals, gaining some performance enhancement.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/LimitedScopeInnerClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/LimitedScopeInnerClass.html index 8fbd9b3fcd47..9319295bf724 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/LimitedScopeInnerClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/LimitedScopeInnerClass.html @@ -1,6 +1,6 @@ -This inspection reports any limited-scope inner classes. Some code standards discourage +Reports any limited-scope inner classes. Some code standards discourage the use of limited-scope inner classes, and they are unusual enough as to possibly be confusing. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ListIndexOfReplaceableByContains.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ListIndexOfReplaceableByContains.html index bd0bcac85d82..7b9ade97162d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ListIndexOfReplaceableByContains.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ListIndexOfReplaceableByContains.html @@ -1,6 +1,6 @@ -This inspection reports any List.indexOf() +Reports any List.indexOf() expressions which can be replaced with the method List.contains(). diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ListenerMayUseAdapter.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ListenerMayUseAdapter.html index b5aeff8ce4cc..5d3e3784d0aa 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ListenerMayUseAdapter.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ListenerMayUseAdapter.html @@ -1,6 +1,6 @@ -This inspection reports any classes which implement a listener, but may extend +Reports any classes which implement a listener, but may extend the corresponding adapter instead. The quickfix for this inspection will also remove any redundant empty methods left over after replacing the implementation of the listener with an extension of the corresponding adapter. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/LiteralAsArgToStringEquals.html b/plugins/InspectionGadgets/src/inspectionDescriptions/LiteralAsArgToStringEquals.html index 2463fe79eb27..110d4b829e75 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/LiteralAsArgToStringEquals.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/LiteralAsArgToStringEquals.html @@ -1,6 +1,6 @@ -This inspection reports calls to .equals() whose arguments are String literals. Some coding +Reports calls to .equals() whose arguments are String literals. Some coding standards specify that String literals should be the target of .equals(), rather than argument, thus minimizing NullPointerExceptions. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/LoadLibraryWithNonConstantString.html b/plugins/InspectionGadgets/src/inspectionDescriptions/LoadLibraryWithNonConstantString.html index f8c925626d8f..f2c36bbfdd4f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/LoadLibraryWithNonConstantString.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/LoadLibraryWithNonConstantString.html @@ -1,6 +1,6 @@ -This inspection reports the calls to java.lang.System.loadLibrary() +Reports the calls to java.lang.System.loadLibrary() which take a dynamically-constructed string as the execution strings. Constructed library location strings are a common source of security breaches. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/LocalVariableHidingMemberVariable.html b/plugins/InspectionGadgets/src/inspectionDescriptions/LocalVariableHidingMemberVariable.html index d224afc21cd5..adb840c83e8d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/LocalVariableHidingMemberVariable.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/LocalVariableHidingMemberVariable.html @@ -1,6 +1,6 @@ -This inspection reports local variables being named identically to visible member variables of their +Reports local variables being named identically to visible member variables of their class. Such a variable name may be confusing.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/LocalVariableNamingConvention.html b/plugins/InspectionGadgets/src/inspectionDescriptions/LocalVariableNamingConvention.html index 89fe04822395..449e387b2645 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/LocalVariableNamingConvention.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/LocalVariableNamingConvention.html @@ -1,6 +1,6 @@ -This inspection reports local variables whose names are either too short, too long, or do not follow +Reports local variables whose names are either too short, too long, or do not follow the specified regular expression pattern.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/LocalVariableOfConcreteClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/LocalVariableOfConcreteClass.html index 2cf8f686d2b2..ec575bbfbd43 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/LocalVariableOfConcreteClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/LocalVariableOfConcreteClass.html @@ -1,6 +1,6 @@ -This inspection reports any local variables whose type is declared to be a concrete class. +Reports any local variables whose type is declared to be a concrete class. Such declarations may represent a failure of abstraction, and may make testing more difficult. Declarations whose classes come from system or third-party libraries will not be reported by this inspection. catch block parameters of concrete exception type will also not be reported by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/LogStatementGuardedByLogCondition.html b/plugins/InspectionGadgets/src/inspectionDescriptions/LogStatementGuardedByLogCondition.html index b84fa12c884e..bc16a72efc06 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/LogStatementGuardedByLogCondition.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/LogStatementGuardedByLogCondition.html @@ -1,6 +1,6 @@ -This inspection reports log statements with non-constant arguments which are not +Reports log statements with non-constant arguments which are not surrounded by a guard condition. The evaluation of the arguments of a log statement can be expensive. Surrounding a log statement with a guard clause prevents that cost when the logging diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/LoggerInitializedWithForeignClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/LoggerInitializedWithForeignClass.html index 86cacf6d8abc..e17ca6a18724 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/LoggerInitializedWithForeignClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/LoggerInitializedWithForeignClass.html @@ -1,6 +1,6 @@ -This inspection reports any Loggers which are initialized with a class literal from a different class than the Logger +Reports any Loggers which are initialized with a class literal from a different class than the Logger is contained in.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/LoggingConditionDisagreesWithLogStatement.html b/plugins/InspectionGadgets/src/inspectionDescriptions/LoggingConditionDisagreesWithLogStatement.html index b3cbb4989899..fa394dc4f1a3 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/LoggingConditionDisagreesWithLogStatement.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/LoggingConditionDisagreesWithLogStatement.html @@ -1,6 +1,6 @@ -This inspection reports is log enabled for conditions of if statements which +Reports is log enabled for conditions of if statements which do not match the log level of the contained log statement.

For example: diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/LongLiteralsEndingWithLowercaseL.html b/plugins/InspectionGadgets/src/inspectionDescriptions/LongLiteralsEndingWithLowercaseL.html index 03f5a50b36da..79fc67067ac7 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/LongLiteralsEndingWithLowercaseL.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/LongLiteralsEndingWithLowercaseL.html @@ -1,6 +1,6 @@ -This inspection reports long literals ending with lowercase 'l'. These +Reports long literals ending with lowercase 'l'. These literals may be confusing, as lowercase 'l' looks very similar to '1'.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/LoopConditionNotUpdatedInsideLoop.html b/plugins/InspectionGadgets/src/inspectionDescriptions/LoopConditionNotUpdatedInsideLoop.html index d248b6442e6e..556f88aed825 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/LoopConditionNotUpdatedInsideLoop.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/LoopConditionNotUpdatedInsideLoop.html @@ -1,6 +1,6 @@ -This inspection reports any variables and parameters which are used in a loop condition +Reports any variables and parameters which are used in a loop condition and are not updated inside the loop. These may cause an infinite loop if executed and are probably not what was intended. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/LoopStatementsThatDontLoop.html b/plugins/InspectionGadgets/src/inspectionDescriptions/LoopStatementsThatDontLoop.html index 9178d380a4f4..cce848a798ce 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/LoopStatementsThatDontLoop.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/LoopStatementsThatDontLoop.html @@ -1,6 +1,6 @@ -This inspection reports any instance of for, +Reports any instance of for, while and do statements whose bodies are guaranteed to execute at most once. Normally, this is an indication of a bug. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/LoopWithImplicitTerminationCondition.html b/plugins/InspectionGadgets/src/inspectionDescriptions/LoopWithImplicitTerminationCondition.html index bb44c4041fa5..6ace72ab76f8 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/LoopWithImplicitTerminationCondition.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/LoopWithImplicitTerminationCondition.html @@ -1,6 +1,6 @@ -This inspection reports any while, +Reports any while, do-while and for loops which have the constant true as their only condition, but which still can be terminated by a containing diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MagicCharacter.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MagicCharacter.html index 11efc4a39ebb..ea63920cf7ec 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MagicCharacter.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MagicCharacter.html @@ -1,6 +1,6 @@ -This inspection reports "magic characters", character constants used without declaration. +Reports "magic characters", character constants used without declaration. "Magic character" can result in code whose intention is extremely unclear, and may result in errors if a "magic character" is changed in one code location but not another. Such use can complicate internationalization efforts. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MagicNumber.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MagicNumber.html index d61e8f502f99..568bc4313fed 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MagicNumber.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MagicNumber.html @@ -1,6 +1,6 @@ -This inspection reports "magic numbers", literal numeric constants used without declaration. +Reports "magic numbers", literal numeric constants used without declaration. "Magic numbers" can result in code whose intention is extremely unclear, and may result in errors if a "magic number" is changed in one code location but not another. The numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, 1000, 0L, 1L, 2L, 0.0, 1.0, 0.0F and 1.0F are not reported by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MalformedFormatString.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MalformedFormatString.html index 7e405dd4b0b8..264c8519a2ea 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MalformedFormatString.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MalformedFormatString.html @@ -1,6 +1,6 @@ -This inspection reports malformed format strings. Format strings +Reports malformed format strings. Format strings are reported if they are compile-time constants used as arguments to appropriate methods on java.util.Formatter, java.lang.String, diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MalformedRegex.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MalformedRegex.html index 53d749afbd1b..214879d39d99 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MalformedRegex.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MalformedRegex.html @@ -1,6 +1,6 @@ -This inspection reports malformed regular expressions. Regular expressions +Reports malformed regular expressions. Regular expressions are reported if they are compile-time constants used as arguments to appropriate methods on java.util.regex.Pattern or java.lang.String and do not fit the standard Java regular expression syntax. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MalformedXPath.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MalformedXPath.html index 90679a411456..c8f5a5d48825 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MalformedXPath.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MalformedXPath.html @@ -1,6 +1,6 @@ -This inspection reports malformed XPath expressions. XPath expressions +Reports malformed XPath expressions. XPath expressions are reported if they are compile-time constants used as arguments to appropriate methods on javax.xml.xpath.XPath and do not fit the standard XPath syntax. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ManualArrayCopy.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ManualArrayCopy.html index bf5f36766d59..34daba17d4fa 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ManualArrayCopy.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ManualArrayCopy.html @@ -1,6 +1,6 @@ -This inspection reports the manual copying of array contents which may be replaced by +Reports the manual copying of array contents which may be replaced by calls to System.arraycopy().

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ManualArrayToCollectionCopy.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ManualArrayToCollectionCopy.html index a50cf510befe..1bf2ad484401 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ManualArrayToCollectionCopy.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ManualArrayToCollectionCopy.html @@ -1,5 +1,5 @@ -This inspection reports the copying of array contents to a collection where each element +Reports the copying of array contents to a collection where each element is added individually using a for loop. Such constructs may be replaced by a call to Collection.addAll(Arrays.asList()) or Collections.addAll(). diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MapReplaceableByEnumMap.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MapReplaceableByEnumMap.html index fa1bf7feb649..99f0aeae0460 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MapReplaceableByEnumMap.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MapReplaceableByEnumMap.html @@ -1,6 +1,6 @@ -This inspection reports any instantiations of java.util.Map objects +Reports any instantiations of java.util.Map objects whose key types are enumerated classes. Such java.util.Map objects can be replaced by java.util.EnumMap objects. java.util.EnumMap implementations can be much more efficient diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MarkerInterface.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MarkerInterface.html index 37abc13b9278..759fccd5f96b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MarkerInterface.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MarkerInterface.html @@ -1,6 +1,6 @@ -This inspection reports "marker" interfaces which have no methods or fields. +Reports "marker" interfaces which have no methods or fields. Such interfaces may be confusing, and normally indicate a design failure. Interfaces which extend two or more other interfaces or or interfaces which specialize the generic type of their superinterface will not be reported by diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MathRandomCastToInt.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MathRandomCastToInt.html index 8bbde8ebf4d0..52b576e172cb 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MathRandomCastToInt.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MathRandomCastToInt.html @@ -1,6 +1,6 @@ -This inspection reports any calls to Math.random() which are immediately +Reports any calls to Math.random() which are immediately cast to int. Casting a double between 0.0 (inclusive) and 1.0 (exclusive) will always round down to zero. A Math.random() value should first be multiplied with some factor before casting it to an int to diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodCallInLoopCondition.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodCallInLoopCondition.html index 507ee816f773..b283f81aebeb 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodCallInLoopCondition.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodCallInLoopCondition.html @@ -3,7 +3,7 @@ This inspection is intended for J2ME and other highly resource constrained environments. Applying the results of this inspection without consideration might have negative effects on code clarity and design.

-This inspection reports method calls in the condition part of a +Reports method calls in the condition part of a loop statement. In highly resource constrained environments, such calls may have adverse performance implications diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodCanBeVariableArityMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodCanBeVariableArityMethod.html index 7d5121276359..62d61cd226cd 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodCanBeVariableArityMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodCanBeVariableArityMethod.html @@ -1,6 +1,6 @@ -This inspection reports methods with which can be converted to be a variable +Reports methods with which can be converted to be a variable arity/varargs method, available in Java 5 and newer.

This inspection only reports if the project or module is configured to use a diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodCount.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodCount.html index c52881208c79..471915e3dc85 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodCount.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodCount.html @@ -1,6 +1,6 @@ -This inspection reports any classes with too many methods. Classes with +Reports any classes with too many methods. Classes with a large number of methods are often trying to 'do too much', and may need to be refactored into multiple smaller classes. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodCoupling.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodCoupling.html index 9439750e7e23..121e7f960f29 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodCoupling.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodCoupling.html @@ -1,6 +1,6 @@ -This inspection reports methods which are highly coupled, i.e. that reference too many other classes. +Reports methods which are highly coupled, i.e. that reference too many other classes. Methods with too high a coupling can be very fragile, and should probably be broken up. References to system classes (those in the java.or javax. packages), are not counted for purposes of this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodMayBeStatic.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodMayBeStatic.html index 4b3a229ce8f6..f403b3c07bee 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodMayBeStatic.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodMayBeStatic.html @@ -1,6 +1,6 @@ -This inspection reports any methods which may safely be made static. +Reports any methods which may safely be made static. A method may be static if it is not synchronized, it does not reference any of its class' non static methods and non static fields and is not overridden in a sub class. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodMayBeSynchronized.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodMayBeSynchronized.html index 2f3f55619508..3313d24dfccf 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodMayBeSynchronized.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodMayBeSynchronized.html @@ -1,6 +1,6 @@ -This inspection reports methods of which the body is contained in a single +Reports methods of which the body is contained in a single synchronized statement. The lock expression for this synchronized statement must be equal to this for instance methods diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodNameSameAsClassName.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodNameSameAsClassName.html index 8119a68fb912..350dfceec9aa 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodNameSameAsClassName.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodNameSameAsClassName.html @@ -1,6 +1,6 @@ -This inspection reports methods being named identically to their class. +Reports methods being named identically to their class. A method with such a name may be easily mistaken for a constructor.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodNameSameAsParentName.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodNameSameAsParentName.html index 144dd6cf6d17..5df192eff554 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodNameSameAsParentName.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodNameSameAsParentName.html @@ -1,6 +1,6 @@ -This inspection reports methods being named identically to the superclass of the method's class. +Reports methods being named identically to the superclass of the method's class. Such a method name may be confusing.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodNamesDifferOnlyByCase.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodNamesDifferOnlyByCase.html index 11f96f81881d..7fce6c0b8723 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodNamesDifferOnlyByCase.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodNamesDifferOnlyByCase.html @@ -1,6 +1,6 @@ -This inspection reports on cases where multiple methods of a class have names which differ only by +Reports on cases where multiple methods of a class have names which differ only by case. Such method names may be very confusing.

Use the checkbox below to have this inspection ignore methods which are overrides or implementations of diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodOnlyUsedFromInnerClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodOnlyUsedFromInnerClass.html index 822b4df2a0ca..1c2744f480af 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodOnlyUsedFromInnerClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodOnlyUsedFromInnerClass.html @@ -1,6 +1,6 @@ -This inspection reports private methods, which +Reports private methods, which are only called from an inner class of the class containing the method. Such methods could be safely moved into that inner class. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodOverloadsParentMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodOverloadsParentMethod.html index 63ac82c86c7a..13e1f075bf21 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodOverloadsParentMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodOverloadsParentMethod.html @@ -1,6 +1,6 @@ -This inspection reports instance methods having the same name and the same number of parameters with the same or compatible types as +Reports instance methods having the same name and the same number of parameters with the same or compatible types as a method in a superclass. In this case, the child method overloads the parent method, instead of overriding it. While that may be intended, if unintended it may result in latent bugs. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodOverridesPackageLocalMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodOverridesPackageLocalMethod.html index edbbac90129b..9e95584bd3c9 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodOverridesPackageLocalMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodOverridesPackageLocalMethod.html @@ -1,6 +1,6 @@ -This inspection reports methods having the same name as a package +Reports methods having the same name as a package local method of a superclass in other package. Such methods may result in confusing semantics, particularly if the package local method is ever made publicly visible. A package local method can only properly be overridden if diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodOverridesPrivateMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodOverridesPrivateMethod.html index 02662dd63573..ec2af2768586 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodOverridesPrivateMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodOverridesPrivateMethod.html @@ -1,6 +1,6 @@ -This inspection reports instance methods having the same name as a +Reports instance methods having the same name as a private method of a superclass. Such methods may result in confusing semantics, particularly if the private method is ever made publicly visible. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodOverridesStaticMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodOverridesStaticMethod.html index 0472bd14c108..4e1b35afe766 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodOverridesStaticMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodOverridesStaticMethod.html @@ -1,6 +1,6 @@ -This inspection reports methods having the same name as a static method of a superclass. Such +Reports methods having the same name as a static method of a superclass. Such methods may result in confusing semantics.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodReturnOfConcreteClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodReturnOfConcreteClass.html index 000b6713b12d..8c0bd45a0681 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodReturnOfConcreteClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodReturnOfConcreteClass.html @@ -1,6 +1,6 @@ -This inspection reports any methods whose return type is declared to be a concrete class, rather than an interface. +Reports any methods whose return type is declared to be a concrete class, rather than an interface. Such declarations may represent a failure of abstraction, and may make testing more difficult. Declarations whose classes come from system or third-party libraries will not be reported by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodWithMultipleLoops.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodWithMultipleLoops.html index c1430cc2ba00..2c0e5825f9c6 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodWithMultipleLoops.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodWithMultipleLoops.html @@ -1,6 +1,6 @@ -This inspection reports methods containing multiple loop statements. +Reports methods containing multiple loop statements.

Powered by InspectionGadgets diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MismatchedArrayReadWrite.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MismatchedArrayReadWrite.html index 0ef4e1afd447..2835221ecca6 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MismatchedArrayReadWrite.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MismatchedArrayReadWrite.html @@ -1,6 +1,6 @@ -This inspection reports any array fields or variables whose contents are read but not written, +Reports any array fields or variables whose contents are read but not written, or written but not read. Such mismatched reads and writes are pointless, and probably indicate dead, incomplete or erroneous code. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MismatchedCollectionQueryUpdate.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MismatchedCollectionQueryUpdate.html index 67e050c1633f..025e85403708 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MismatchedCollectionQueryUpdate.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MismatchedCollectionQueryUpdate.html @@ -1,6 +1,6 @@ -This inspection reports collection fields or variables whose contents are either queried and +Reports collection fields or variables whose contents are either queried and not updated, or updated and not queried. Such mismatched queries and updates are pointless, and may indicate either dead code or a typographical error. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MismatchedStringBuilderQueryUpdate.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MismatchedStringBuilderQueryUpdate.html index c98107de05a4..0872191f542a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MismatchedStringBuilderQueryUpdate.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MismatchedStringBuilderQueryUpdate.html @@ -1,6 +1,6 @@ -This inspection reports any StringBuilder or StringBuffer fields or variables whose contents are read but not written, +Reports any StringBuilder or StringBuffer fields or variables whose contents are read but not written, or written but not read. Such mismatched reads and writes are pointless, and probably indicate dead, incomplete or erroneous code. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MisorderedAssertEqualsParameters.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MisorderedAssertEqualsParameters.html index f767e244f638..eaaae62cfea2 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MisorderedAssertEqualsParameters.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MisorderedAssertEqualsParameters.html @@ -1,6 +1,6 @@ -This inspection reports any calls to JUnit assertEquals() which have +Reports any calls to JUnit assertEquals() which have a non-literal as the expected result argument and a literal as the actual result argument. Such calls will behave fine for assertions which pass, but may give confusing error reports if their expected and actual arguments differ. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MissingDeprecatedAnnotation.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MissingDeprecatedAnnotation.html index 5730c13fb0ce..4bd566139f6e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MissingDeprecatedAnnotation.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MissingDeprecatedAnnotation.html @@ -1,6 +1,6 @@ -This inspection reports any classes, fields, or methods which have the @deprecated +Reports any classes, fields, or methods which have the @deprecated javadoc tag but do not have the @java.lang.Deprecated annotation.

This inspection only reports if the project or module is configured to use a diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MissingOverrideAnnotation.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MissingOverrideAnnotation.html index 1891aa2645e2..c7dc789eb9a4 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MissingOverrideAnnotation.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MissingOverrideAnnotation.html @@ -1,6 +1,6 @@ -This inspection reports any methods which override methods in a superclass but +Reports any methods which override methods in a superclass but do not have the @java.lang.Override annotation.

This inspection only reports if the project or module is configured to use a diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MissortedModifiers.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MissortedModifiers.html index 0ea060905fea..03583ce0c3d3 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MissortedModifiers.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MissortedModifiers.html @@ -1,6 +1,6 @@ -This inspection reports on declarations whose modifiers are not in the canonical +Reports on declarations whose modifiers are not in the canonical preferred order (as stated in the Java Language Specification).

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledCompareTo.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledCompareTo.html index c5a235792dc1..1c70675471a0 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledCompareTo.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledCompareTo.html @@ -1,6 +1,6 @@ -This inspection reports any declaration of a compareto() method, taking one argument. +Reports any declaration of a compareto() method, taking one argument. Normally, this is a typo of compareTo().

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledEquals.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledEquals.html index bbaa9160615f..b093a06b567b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledEquals.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledEquals.html @@ -1,6 +1,6 @@ -This inspection reports any declaration of a equal() method, taking one argument. +Reports any declaration of a equal() method, taking one argument. Normally, this is a typo of equals().

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledHashcode.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledHashcode.html index 4bdcbd1f7ea1..85c4d0630b9a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledHashcode.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledHashcode.html @@ -1,6 +1,6 @@ -This inspection reports any declaration of a hashcode() method, taking no arguments. +Reports any declaration of a hashcode() method, taking no arguments. Normally, this is a typo of hashCode().

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledSetUp.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledSetUp.html index 37c416323fdb..2c182d347abc 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledSetUp.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledSetUp.html @@ -1,6 +1,6 @@ -This inspection reports a setup() method on a JUnit test case. This is +Reports a setup() method on a JUnit test case. This is normally a misspelling of setUp(), and is entirely too easy to make.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledTearDown.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledTearDown.html index 161722056d7f..5ee68d904771 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledTearDown.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledTearDown.html @@ -1,6 +1,6 @@ -This inspection reports a teardown() method on a JUnit test case. This is +Reports a teardown() method on a JUnit test case. This is normally a misspelling of tearDown(), and is entirely too easy to make.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledToString.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledToString.html index 2c46b7f7b895..c222ad1a7c54 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledToString.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MisspelledToString.html @@ -1,6 +1,6 @@ -This inspection reports any declaration of a tostring() method, taking one argument. +Reports any declaration of a tostring() method, taking one argument. Normally, this is a typo of toString().

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MultipleDeclaration.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MultipleDeclaration.html index cc22f75aab14..1e3e82708c88 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MultipleDeclaration.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MultipleDeclaration.html @@ -1,6 +1,6 @@ -This inspection reports multiple variables being declared in a single declaration. +Reports multiple variables being declared in a single declaration. Some coding standards prohibit such declarations.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MultipleExceptionsDeclaredOnTestMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MultipleExceptionsDeclaredOnTestMethod.html index 29ca3c323c40..530f6049ca83 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MultipleExceptionsDeclaredOnTestMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MultipleExceptionsDeclaredOnTestMethod.html @@ -1,6 +1,6 @@ -This inspection reports JUnit test methods with more than one exception declared in the +Reports JUnit test methods with more than one exception declared in the throws clause. Such a throws clause can be more concisely declared as:

throws Exception
diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MultipleReturnPointsPerMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MultipleReturnPointsPerMethod.html index e5d737a8cfc3..ab45f6242ca0 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MultipleReturnPointsPerMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MultipleReturnPointsPerMethod.html @@ -1,6 +1,6 @@ -This inspection reports methods with too many return points. Methods +Reports methods with too many return points. Methods with too many return points may be confusing, and hard to refactor.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MultipleTopLevelClassesInFile.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MultipleTopLevelClassesInFile.html index 880679780650..e7f0f5d0f221 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MultipleTopLevelClassesInFile.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MultipleTopLevelClassesInFile.html @@ -1,6 +1,6 @@ -This inspection reports multiple top-level classes in a single java file. Putting multiple +Reports multiple top-level classes in a single java file. Putting multiple top-level classes in a file can be confusing, and may degrade the usefulness of various software tools. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MultipleTypedDeclaration.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MultipleTypedDeclaration.html index 3355b41b9ca5..47061ac54b51 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MultipleTypedDeclaration.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MultipleTypedDeclaration.html @@ -1,6 +1,6 @@ -This inspection reports multiple different types of variables being declared in a single declaration. In such a declaration the types +Reports multiple different types of variables being declared in a single declaration. In such a declaration the types used can only differ in array dimension. Such declarations may be confusing.

For example the following will be reported by this inspection:

String s = "", array[];
diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MultiplyOrDivideByPowerOfTwo.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MultiplyOrDivideByPowerOfTwo.html index 42309d6ca58e..89179a4fb58c 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MultiplyOrDivideByPowerOfTwo.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MultiplyOrDivideByPowerOfTwo.html @@ -1,6 +1,6 @@ -This inspection reports multiplication of an integer value by a constant power of 2. These +Reports multiplication of an integer value by a constant power of 2. These expressions may be replaced by right or left shift operations, to some possible performance improvement.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NakedNotify.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NakedNotify.html index 6412ddbcaa62..78af040c785a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NakedNotify.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NakedNotify.html @@ -1,6 +1,6 @@ -This inspection reports .notify() or +Reports .notify() or .notifyAll() being called without any detectable state change occurring. Normally, .notify() and .notifyAll() are used to inform other threads that a state change has occurred. That state change should occur in a synchronized diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NativeMethods.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NativeMethods.html index 7d173f513c28..fcdba9cbb944 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NativeMethods.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NativeMethods.html @@ -1,6 +1,6 @@ -This inspection reports the methods declared native. Native methods are inherently unportable. +Reports the methods declared native. Native methods are inherently unportable.

Powered by InspectionGadgets diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NegatedConditional.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NegatedConditional.html index c00a47126c92..30cb00ed1326 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NegatedConditional.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NegatedConditional.html @@ -1,6 +1,6 @@ -This inspection reports conditional expressions whose conditions are negated. +Reports conditional expressions whose conditions are negated. Flipping the order of the conditional expression branches will usually increase the clarity of such statements.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NegatedEqualityExpression.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NegatedEqualityExpression.html index 2507bddd00dc..17bb421694b5 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NegatedEqualityExpression.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NegatedEqualityExpression.html @@ -1,6 +1,6 @@ -This inspection reports equality expressions which are negated by a prefix expression. For example: +Reports equality expressions which are negated by a prefix expression. For example:

!(i == 1)

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NegatedIfElse.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NegatedIfElse.html index 8364eb9bda57..5029f07dcc69 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NegatedIfElse.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NegatedIfElse.html @@ -1,6 +1,6 @@ -This inspection reports if statements +Reports if statements which contain else branches and whose conditions are negated. Flipping the order of the if and else branches will usually increase the clarity of such statements. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NestedAssignment.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NestedAssignment.html index 6ff8df95f60d..3f0ab8fcb90d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NestedAssignment.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NestedAssignment.html @@ -1,6 +1,6 @@ -This inspection reports assignment expressions nested inside other expressions. While admirably terse, +Reports assignment expressions nested inside other expressions. While admirably terse, such expressions may be confusing, and violate the general design principle that a given construct should do precisely one thing.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NestedConditionalExpression.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NestedConditionalExpression.html index 49dbe6aa0799..b966c98b8ab8 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NestedConditionalExpression.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NestedConditionalExpression.html @@ -1,6 +1,6 @@ -This inspection reports nested conditional expressions. Nested conditional expressions +Reports nested conditional expressions. Nested conditional expressions may result in extremely confusing code.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NestedMethodCall.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NestedMethodCall.html index 81842f0dbb26..245f133fb46b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NestedMethodCall.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NestedMethodCall.html @@ -1,6 +1,6 @@ -This inspection reports method calls used as parameters of another +Reports method calls used as parameters of another method call.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NestedSwitchStatement.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NestedSwitchStatement.html index e7583b097a5a..728513a8c1c2 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NestedSwitchStatement.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NestedSwitchStatement.html @@ -1,6 +1,6 @@ -This inspection reports nested switch statements. Nested switch statements +Reports nested switch statements. Nested switch statements may result in extremely confusing code.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NestedSynchronizedStatement.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NestedSynchronizedStatement.html index 0955cf8f1508..55c9ff4d6068 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NestedSynchronizedStatement.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NestedSynchronizedStatement.html @@ -1,6 +1,6 @@ -This inspection reports nested synchronized statements. Nested synchronized statements +Reports nested synchronized statements. Nested synchronized statements are either useless (if the lock objects are identical) or prone to deadlock.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NestedTryStatement.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NestedTryStatement.html index b204916f4ae6..4a0777fbeaab 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NestedTryStatement.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NestedTryStatement.html @@ -1,6 +1,6 @@ -This inspection reports nested try statements. Nested try statements +Reports nested try statements. Nested try statements may result in confusing code, and should probably have their catch and finally sections merged. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NestingDepth.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NestingDepth.html index 46d649dd82e2..fa5fd1b7e41c 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NestingDepth.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NestingDepth.html @@ -1,6 +1,6 @@ -This inspection reports methods whose bodies are too deeply nested. Methods with too much statement +Reports methods whose bodies are too deeply nested. Methods with too much statement nesting may be confusing, and are a good sign that refactoring may be necessary.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NewExceptionWithoutArguments.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NewExceptionWithoutArguments.html index 6f6c9063aeb6..52aef6324fd4 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NewExceptionWithoutArguments.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NewExceptionWithoutArguments.html @@ -1,6 +1,6 @@ -This inspection reports exception instance creation without any arguments specified. When an exception is constructed +Reports exception instance creation without any arguments specified. When an exception is constructed without arguments it contains no information about the fault that happened, which makes debugging needlessly hard.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NewStringBufferWithCharArgument.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NewStringBufferWithCharArgument.html index e364986736f5..f6e58c175a72 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NewStringBufferWithCharArgument.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NewStringBufferWithCharArgument.html @@ -1,6 +1,6 @@ -This inspection reports any new StringBuffer() +Reports any new StringBuffer() and new StringBuilder() calls with an argument with type char. Such an argument is silently casted to an integer used to specify the length of the buffer. Usually this is diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NoExplicitFinalizeCalls.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NoExplicitFinalizeCalls.html index 18b2fa748ec1..7738172a0dff 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NoExplicitFinalizeCalls.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NoExplicitFinalizeCalls.html @@ -1,6 +1,6 @@ -This inspection reports any call of Object.finalize(). Calling +Reports any call of Object.finalize(). Calling Object.finalize() explicitly is a very bad idea, as it can result in objects being placed in an inconsistent state. Calls to super.finalize() from within implementations of finalize() are benign, and are not reported by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NonAtomicOperationOnVolatileField.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NonAtomicOperationOnVolatileField.html index 198a2d974e7b..aca8ae4fc0da 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NonAtomicOperationOnVolatileField.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NonAtomicOperationOnVolatileField.html @@ -1,6 +1,6 @@ -This inspection reports any non-atomic operations on volatile fields. Non-atomic +Reports any non-atomic operations on volatile fields. Non-atomic operations on volatile fields are operations where the volatile field is read and the value is used to update the volatile field. It is possible for the value of the field to change between the read and write, making the operation possibly invalid. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NonBooleanMethodNameMayNotStartWithQuestion.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NonBooleanMethodNameMayNotStartWithQuestion.html index 42712d025d64..49868ec93911 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NonBooleanMethodNameMayNotStartWithQuestion.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NonBooleanMethodNameMayNotStartWithQuestion.html @@ -1,6 +1,6 @@ -This inspection reports non-boolean methods whose names start with a question +Reports non-boolean methods whose names start with a question word. Non-boolean methods that override library methods are ignored by this inspection.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NonCommentSourceStatements.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NonCommentSourceStatements.html index 47ed454dddfd..5599d4592282 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NonCommentSourceStatements.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NonCommentSourceStatements.html @@ -1,6 +1,6 @@ -This inspection reports methods that are too long. Methods that are too long +Reports methods that are too long. Methods that are too long may be confusing, and are a good sign that refactoring is necessary.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NonExceptionNameEndsWithException.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NonExceptionNameEndsWithException.html index 794818f9048b..36c6021746ab 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NonExceptionNameEndsWithException.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NonExceptionNameEndsWithException.html @@ -1,6 +1,6 @@ -This inspection reports non-exception classes whose names end with 'Exception'. +Reports non-exception classes whose names end with 'Exception'.

Powered by InspectionGadgets diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NonFinalClone.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NonFinalClone.html index d13200d274a3..fca59769ce49 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NonFinalClone.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NonFinalClone.html @@ -1,6 +1,6 @@ -This inspection reports clone() methods which +Reports clone() methods which are not declared final. Since clone() may be used to instantiate objects without using a constructor, allowing the clone() method to be overridden may result in corrupted objects, and possible security diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NonFinalFieldInEnum.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NonFinalFieldInEnum.html index 2109963341b4..bba984a1753d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NonFinalFieldInEnum.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NonFinalFieldInEnum.html @@ -1,6 +1,6 @@ -This inspection reports non-final fields in enumeration types. A non-final field in an enum is rarely needed. +Reports non-final fields in enumeration types. A non-final field in an enum is rarely needed.

New in 12, Powered by InspectionGadgets diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NonFinalFieldOfException.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NonFinalFieldOfException.html index e630033ad2d6..8f16c7870c6f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NonFinalFieldOfException.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NonFinalFieldOfException.html @@ -1,6 +1,6 @@ -This inspection reports any fields on subclasses of +Reports any fields on subclasses of java.lang.Exception which are not declared as final. Data on exception objects should not be modified, as it may result in loss of error context for later debugging and diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NonFinalStaticVariableUsedInClassInitialization.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NonFinalStaticVariableUsedInClassInitialization.html index 1b2ea0295c27..e63874bead51 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NonFinalStaticVariableUsedInClassInitialization.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NonFinalStaticVariableUsedInClassInitialization.html @@ -1,6 +1,6 @@ -This inspection reports any uses of non-final static variables during initialization +Reports any uses of non-final static variables during initialization of a class. Such uses may make the semantics of the code dependent on order of class creation, may cause variables to be used before initialized, and generally cause extremely difficult and confusing bugs. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NonFinalUtilityClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NonFinalUtilityClass.html index de9ba5b222cd..de2612df8363 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NonFinalUtilityClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NonFinalUtilityClass.html @@ -1,6 +1,6 @@ -This inspection reports utility classes which are not final. +Reports utility classes which are not final. Utility classes have all fields and methods declared static. Giving such classes making them final prevents them from being inadvertently subclassed. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NonProtectedConstructorInAbstractClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NonProtectedConstructorInAbstractClass.html index e501499d1be0..287205b4b63f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NonProtectedConstructorInAbstractClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NonProtectedConstructorInAbstractClass.html @@ -1,6 +1,6 @@ -This inspection reports constructors in abstract classes that are not +Reports constructors in abstract classes that are not declared protected, package-protected or private. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NonReproducibleMathCall.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NonReproducibleMathCall.html index 7ee60dbd844e..bafb5b0fd6ad 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NonReproducibleMathCall.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NonReproducibleMathCall.html @@ -1,6 +1,6 @@ -This inspection reports any calls to java.lang.Math methods +Reports any calls to java.lang.Math methods whose results are not guaranteed to be precisely reproducible. In environments where reproducibility of results are needed, java.lang.StrictMath should be used instead. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableFieldInSerializableClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableFieldInSerializableClass.html index 993ffb6ce652..46adcb220f11 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableFieldInSerializableClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableFieldInSerializableClass.html @@ -1,6 +1,6 @@ -This inspection reports non-Serializable +Reports non-Serializable fields in Serializable classes. Such fields will result in runtime exceptions if the object is serialized. Fields declared transient or static diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableObjectBoundToHttpSession.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableObjectBoundToHttpSession.html index 34e5cbfa2d8c..d064d5d390d4 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableObjectBoundToHttpSession.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableObjectBoundToHttpSession.html @@ -1,6 +1,6 @@ -This inspection reports non-Serializable objects used as arguments to +Reports non-Serializable objects used as arguments to javax.servlet.http.HttpSession.setAttribute() or javax.servlet.http.HttpSession.putValue(). Such objects will not be serialized if the HttpSession is passivated or migrated, and may result in difficult-to-diagnose diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableObjectPassedToObjectStream.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableObjectPassedToObjectStream.html index e95295bdb446..5893e7d5f815 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableObjectPassedToObjectStream.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableObjectPassedToObjectStream.html @@ -1,6 +1,6 @@ -This inspection reports non-Serializable objects used as arguments to +Reports non-Serializable objects used as arguments to java.io.ObjectOutputStream.write(). Such calls will result in runtime exceptions. For purposes of this inspection, objects with java.util.Collection or java.util.Map types are assumed to be Serializable, unless the types diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableWithSerialVersionUIDField.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableWithSerialVersionUIDField.html index 91a7b98befab..57834b530940 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableWithSerialVersionUIDField.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableWithSerialVersionUIDField.html @@ -1,6 +1,6 @@ -This inspection reports non-Serializable classes which define a serialVersionUID +Reports non-Serializable classes which define a serialVersionUID field. This is usually an indication of a programmer error.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableWithSerializationMethods.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableWithSerializationMethods.html index 169e52e90e02..6b3fc16e179b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableWithSerializationMethods.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableWithSerializationMethods.html @@ -1,6 +1,6 @@ -This inspection reports non-Serializable classes which define readObject() +Reports non-Serializable classes which define readObject() or writeObject() methods. Such methods normally indicate programmer error.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NonShortCircuitBoolean.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NonShortCircuitBoolean.html index f1ef6ab78679..05808312f4a0 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NonShortCircuitBoolean.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NonShortCircuitBoolean.html @@ -1,6 +1,6 @@ -This inspection reports on any uses of the non-short-circuit forms of boolean 'and' and 'or' ( & +Reports on any uses of the non-short-circuit forms of boolean 'and' and 'or' ( & and | ). The non-short-circuit versions are occasionally useful, but their presence is often due to typos of the short-circuit forms ( && and || ), and may lead to subtle bugs. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NonStaticFinalLogger.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NonStaticFinalLogger.html index d6d1b98db0b6..8e027994f793 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NonStaticFinalLogger.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NonStaticFinalLogger.html @@ -1,6 +1,6 @@ -This inspection reports logger fields on classes which are not declared static and final. +Reports logger fields on classes which are not declared static and final. Ensuring that every classes logger is effectively constant and bound to that class simplifies the task of providing a unified logging implementation for an application. Interfaces, enumerations, annotations and inner classes are not reported by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NonStaticInnerClassInSecureContext.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NonStaticInnerClassInSecureContext.html index 1c202078343c..c0a944054a16 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NonStaticInnerClassInSecureContext.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NonStaticInnerClassInSecureContext.html @@ -1,6 +1,6 @@ -This inspection reports non-static inner classes. +Reports non-static inner classes. Compilation of such classes causes the creation of hidden, package-visible methods on the parent class, which may compromise security. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NonSynchronizedMethodOverridesSynchronizedMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NonSynchronizedMethodOverridesSynchronizedMethod.html index cf6fe2447dea..e92e2251e2ba 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NonSynchronizedMethodOverridesSynchronizedMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NonSynchronizedMethodOverridesSynchronizedMethod.html @@ -1,6 +1,6 @@ -This inspection reports non-synchronized +Reports non-synchronized methods overriding synchronized methods.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NonThreadSafeLazyInitialization.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NonThreadSafeLazyInitialization.html index 9ff1045d920b..3cbe769e1bf9 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NonThreadSafeLazyInitialization.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NonThreadSafeLazyInitialization.html @@ -1,6 +1,6 @@ -This inspection reports static variables being lazily initialized +Reports static variables being lazily initialized in an non-thread-safe manner. Lazy initialization of static variables should be done in an appropriate synchronization construct, to prevent different threads from performing conflicting initialization. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NoopMethodInAbstractClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NoopMethodInAbstractClass.html index a4c3718a0be7..5c8ffb84bb59 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NoopMethodInAbstractClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NoopMethodInAbstractClass.html @@ -1,6 +1,6 @@ -This inspection reports "no-op" methods in abstract classes. It is usually a better +Reports "no-op" methods in abstract classes. It is usually a better design to make such methods abstract themselves, so that classes which inherit the methods will not forget to provide their own implementations. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NotifyCalledOnCondition.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NotifyCalledOnCondition.html index 41d79745f59e..4bc97176fd39 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NotifyCalledOnCondition.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NotifyCalledOnCondition.html @@ -1,6 +1,6 @@ -This inspection reports any calls to notify() +Reports any calls to notify() or notifyAll() on an object of class java.util.concurrent.locks.Condition(). It is almost certain that signal() or diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NotifyNotInSynchronizedContext.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NotifyNotInSynchronizedContext.html index 9b2e6babddd0..c1765eb5a740 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NotifyNotInSynchronizedContext.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NotifyNotInSynchronizedContext.html @@ -1,6 +1,6 @@ -This inspection reports on any call to notify() not made inside a corresponding synchronized +Reports on any call to notify() not made inside a corresponding synchronized statement or synchronized method. Calling notify() on an object without holding a lock on that object will result in an IllegalMonitorStateException being thrown. Such a construct is not necessarily an error, as the necessary lock may be acquired before diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NotifyWithoutCorrespondingWait.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NotifyWithoutCorrespondingWait.html index 526344b46649..d388b0b792cd 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NotifyWithoutCorrespondingWait.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NotifyWithoutCorrespondingWait.html @@ -1,6 +1,6 @@ -This inspection reports on any call to Object.notify() +Reports on any call to Object.notify() or Object.notifyAll() for which no call to a corresponding Object.wait() can be found. Only calls which target fields of the current class are reported by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NullArgumentToVariableArgMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NullArgumentToVariableArgMethod.html index 97815383abba..331af3467275 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NullArgumentToVariableArgMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NullArgumentToVariableArgMethod.html @@ -1,6 +1,6 @@ -This inspection reports any calls to a variable-argument method which has a null +Reports any calls to a variable-argument method which has a null in the variable-argument position (e.g System.out.printf("%s", null) ). Such a null argument may be confusing, as it is not wrapped as a single-element array, as may be expected. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NullThrown.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NullThrown.html index e57019e627e5..4361c8d8f499 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NullThrown.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NullThrown.html @@ -1,6 +1,6 @@ -This inspection reports any null literals which are used as the argument for a throw statement. +Reports any null literals which are used as the argument for a throw statement.

New in 11, Powered by InspectionGadgets diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NumberEquality.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NumberEquality.html index 7029b1ebe814..5c3882e0d77f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NumberEquality.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NumberEquality.html @@ -1,6 +1,6 @@ -This inspection reports any use of == to test for Number equality, +Reports any use of == to test for Number equality, rather than the ".equals()" method. With auto-boxing it is easy to make the mistake of comparing two Integer (or other subclass of java.lang.Number) objects instead of two ints. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NumericToString.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NumericToString.html index 0733e2ef39a1..1a891c71b877 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NumericToString.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NumericToString.html @@ -1,6 +1,6 @@ -This inspection reports any call of toString() on numeric objects. Such calls are usually +Reports any call of toString() on numeric objects. Such calls are usually incorrect in an internationalized environment.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ObjectAllocationInLoop.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ObjectAllocationInLoop.html index 863013a939a5..ef4d99cd8b41 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ObjectAllocationInLoop.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ObjectAllocationInLoop.html @@ -1,6 +1,6 @@ -This inspection reports object or array allocation inside loops. While not +Reports object or array allocation inside loops. While not necessarily a problem, object allocation inside loop is a great place to look for memory leaks and performance issues. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ObjectEquality.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ObjectEquality.html index 21f9c35cb28a..c3635d1ce790 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ObjectEquality.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ObjectEquality.html @@ -1,6 +1,6 @@ -This inspection reports any use of == +Reports any use of == to test for Object equality, rather than the ".equals()" method. Note that comparison of Strings or Numbers using == is not reported by this inspection, nor is the comparison of an object to null using diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ObjectEqualsNull.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ObjectEqualsNull.html index bb919514e003..950567652a5d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ObjectEqualsNull.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ObjectEqualsNull.html @@ -1,6 +1,6 @@ -This inspection reports on calls to .equals() which have null +Reports on calls to .equals() which have null as an argument. The semantics of such calls are almost certainly not what was intended.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ObjectNotify.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ObjectNotify.html index 544e85d4ebf9..a57222dc9d09 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ObjectNotify.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ObjectNotify.html @@ -1,6 +1,6 @@ -This inspection reports any calls to notify(). While occasionally useful, in almost all cases +Reports any calls to notify(). While occasionally useful, in almost all cases notifyAll() is a better choice. See Doug Lea's Concurrent Programming in Java for a discussion.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ObjectToString.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ObjectToString.html index c10c3078af40..849511add75f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ObjectToString.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ObjectToString.html @@ -1,6 +1,6 @@ -This inspection reports any calls to .toString() +Reports any calls to .toString() which use the default implementation from java.lang.Object. The default implementation is rarely desired, but easy to use by accident. Calls to .toString() on objects of type diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ObsoleteCollection.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ObsoleteCollection.html index 00eac3f50191..570a5dccd476 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ObsoleteCollection.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ObsoleteCollection.html @@ -1,6 +1,6 @@ -This inspection reports any uses of java.util.Vector +Reports any uses of java.util.Vector or java.util.Hashtable. While still supported, these classes were made obsolete by the JDK1.2 collection classes, and should probably not be used in new development. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/OctalAndDecimalIntegersMixed.html b/plugins/InspectionGadgets/src/inspectionDescriptions/OctalAndDecimalIntegersMixed.html index f0684b11303f..9abbbebb6350 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/OctalAndDecimalIntegersMixed.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/OctalAndDecimalIntegersMixed.html @@ -1,6 +1,6 @@ -This inspection reports any use of both octal and decimal integers in an array +Reports any use of both octal and decimal integers in an array initialization. This is often due to creating an array by copying a list of numbers into an array without noticing that some of them are zero-padded, and will thus be interpreted by the Java compiler as octal. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/OctalLiteral.html b/plugins/InspectionGadgets/src/inspectionDescriptions/OctalLiteral.html index cea33e60be79..1c2febc07622 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/OctalLiteral.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/OctalLiteral.html @@ -1,6 +1,6 @@ -This inspection reports octal integer literals. Some coding standards prohibit the +Reports octal integer literals. Some coding standards prohibit the use of octal literals, as they may be easily confused with decimal literals.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/OnDemandImport.html b/plugins/InspectionGadgets/src/inspectionDescriptions/OnDemandImport.html index 074dbda8c4d2..94892c8188d4 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/OnDemandImport.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/OnDemandImport.html @@ -1,6 +1,6 @@ -This inspection reports any import statements which cover entire packages ('* imports'). +Reports any import statements which cover entire packages ('* imports'). Some coding standards prohibit such import statements. Since IDEA can automatically detect and fix such statements with its "Optimize Imports" command, this inspection is mostly useful for off-line reporting on code bases that you don't intend to change. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/OverloadedMethodsWithSameNumberOfParameters.html b/plugins/InspectionGadgets/src/inspectionDescriptions/OverloadedMethodsWithSameNumberOfParameters.html index d34885cc834b..b39b639edec2 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/OverloadedMethodsWithSameNumberOfParameters.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/OverloadedMethodsWithSameNumberOfParameters.html @@ -1,6 +1,6 @@ -This inspection reports on cases where multiple methods in the same class are declared +Reports on cases where multiple methods in the same class are declared with an identical name and the same number of parameters.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/OverloadedVarargsMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/OverloadedVarargsMethod.html index 5acc0cd3d663..52e274e42ad5 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/OverloadedVarargsMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/OverloadedVarargsMethod.html @@ -1,6 +1,6 @@ -This inspection reports vararg methods, when there are one or more other methods with the +Reports vararg methods, when there are one or more other methods with the same name present in a class. Overloaded varargs methods can be very confusing, as it is often not clear which overloading gets called. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/OverlyComplexArithmeticExpression.html b/plugins/InspectionGadgets/src/inspectionDescriptions/OverlyComplexArithmeticExpression.html index fff84f793dd2..b6d845c2f6a4 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/OverlyComplexArithmeticExpression.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/OverlyComplexArithmeticExpression.html @@ -1,6 +1,6 @@ -This inspection reports arithmetic expressions with too many terms. Such +Reports arithmetic expressions with too many terms. Such expressions may be confusing and bug-prone.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/OverlyComplexBooleanExpression.html b/plugins/InspectionGadgets/src/inspectionDescriptions/OverlyComplexBooleanExpression.html index da938e182400..d92ae7b6e1ee 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/OverlyComplexBooleanExpression.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/OverlyComplexBooleanExpression.html @@ -1,6 +1,6 @@ -This inspection reports boolean expressions with too many terms. Such +Reports boolean expressions with too many terms. Such expressions may be confusing and bug-prone.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/OverlyLargePrimitiveArrayInitializer.html b/plugins/InspectionGadgets/src/inspectionDescriptions/OverlyLargePrimitiveArrayInitializer.html index 1a40375b569c..c74b61da8251 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/OverlyLargePrimitiveArrayInitializer.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/OverlyLargePrimitiveArrayInitializer.html @@ -3,7 +3,7 @@ This inspection is intended for J2ME and other highly resource constrained environments. Applying the results of this inspection without consideration might have negative effects on code clarity and design.

-This inspection reports array initializer expressions for primitive +Reports array initializer expressions for primitive arrays which contain too many elements. Such initializers may result in overly large class files, as code must be generated to initialize each array element. In memory or bandwidth constrained environments, it may be more efficient to load large arrays diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/OverlyStrongTypeCast.html b/plugins/InspectionGadgets/src/inspectionDescriptions/OverlyStrongTypeCast.html index aae1069dc4cc..413618166455 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/OverlyStrongTypeCast.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/OverlyStrongTypeCast.html @@ -1,6 +1,6 @@ -This inspection reports type casts which are overly strong. For instance, +Reports type casts which are overly strong. For instance, casting an object to ArrayList when casting it to List would do just as well. Note: much like the Redundant type cast inspection, applying the fix for this inspection may change the semantics of your program, if you are diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/OverridableMethodCallDuringObjectConstruction.html b/plugins/InspectionGadgets/src/inspectionDescriptions/OverridableMethodCallDuringObjectConstruction.html index aa7a4d30db6b..1642f60cd9a2 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/OverridableMethodCallDuringObjectConstruction.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/OverridableMethodCallDuringObjectConstruction.html @@ -1,6 +1,6 @@ -This inspection reports any calls of overridable methods of the current class during object construction. +Reports any calls of overridable methods of the current class during object construction. An object is constructed inside a constructor, an instance initializer or inside a clone(), readObject() or readObjectNoData() method. Methods are overridable if they are not declared final, diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/OverriddenMethodCallDuringObjectConstruction.html b/plugins/InspectionGadgets/src/inspectionDescriptions/OverriddenMethodCallDuringObjectConstruction.html index 26636e4c6f19..911418c87dfb 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/OverriddenMethodCallDuringObjectConstruction.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/OverriddenMethodCallDuringObjectConstruction.html @@ -1,6 +1,6 @@ -This inspection reports any calls of overridden methods of the current class during object construction. +Reports any calls of overridden methods of the current class during object construction. An object is constructed inside a constructor, an instance initializer or inside a clone(), readObject() or readObjectNoData() method. Such calls may result in subtle bugs, as the object is not guaranteed to be initialized diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/PackageDotHtmlMayBePackageInfo.html b/plugins/InspectionGadgets/src/inspectionDescriptions/PackageDotHtmlMayBePackageInfo.html index a9cd6a95d22e..41821826aa68 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/PackageDotHtmlMayBePackageInfo.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/PackageDotHtmlMayBePackageInfo.html @@ -1,6 +1,6 @@ -This inspection reports any package.html files. These files are used for documenting +Reports any package.html files. These files are used for documenting packages. Since J2SE 5 it is recommended to use package-info.java files instead, since such files can also contain package annotations. In this way, package-info.java becomes the sole repository for package level annotations and documentation. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/PackageVisibleField.html b/plugins/InspectionGadgets/src/inspectionDescriptions/PackageVisibleField.html index 9a42703d1ddb..abae2e4fae86 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/PackageVisibleField.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/PackageVisibleField.html @@ -1,6 +1,6 @@ -This inspection reports package-visible instance variables. +Reports package-visible instance variables. Constants (i.e. variables marked static and final) are not reported.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/PackageVisibleInnerClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/PackageVisibleInnerClass.html index 86657eaf82cb..94796c5d4df4 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/PackageVisibleInnerClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/PackageVisibleInnerClass.html @@ -1,6 +1,6 @@ -This inspection reports package-local inner classes. +Reports package-local inner classes.

Use the first checkbox below to ignore package-local inner enums. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ParameterHidingMemberVariable.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ParameterHidingMemberVariable.html index 426ea49d5527..aed894a0568a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ParameterHidingMemberVariable.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ParameterHidingMemberVariable.html @@ -1,6 +1,6 @@ -This inspection reports method parameters being named identically to visible member variables of their +Reports method parameters being named identically to visible member variables of their class. Such a parameter name may be confusing.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ParameterNameDiffersFromOverriddenParameter.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ParameterNameDiffersFromOverriddenParameter.html index 67c2ecbdcef1..120087f53e1f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ParameterNameDiffersFromOverriddenParameter.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ParameterNameDiffersFromOverriddenParameter.html @@ -1,6 +1,6 @@ -This inspection reports parameters that have different names from the corresponding +Reports parameters that have different names from the corresponding parameters in the methods they override. While legal in Java, such inconsistent names may be confusing, and lessen the documentation benefits of good naming practices. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ParameterNamingConvention.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ParameterNamingConvention.html index 71c6bfb47aa5..ddd783ced5c6 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ParameterNamingConvention.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ParameterNamingConvention.html @@ -1,6 +1,6 @@ -This inspection reports method parameters whose names are either too short, too long, or do not follow +Reports method parameters whose names are either too short, too long, or do not follow the specified regular expression pattern.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ParameterOfConcreteClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ParameterOfConcreteClass.html index 009dfbb1e660..7c815a9cd8fb 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ParameterOfConcreteClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ParameterOfConcreteClass.html @@ -1,6 +1,6 @@ -This inspection reports any method parameters whose type is declared to be a concrete class, rather than an interface. +Reports any method parameters whose type is declared to be a concrete class, rather than an interface. Such declarations may represent a failure of abstraction, and may make testing more difficult. Declarations whose classes come from system or third-party libraries will not be reported by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ParameterizedParametersStaticCollection.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ParameterizedParametersStaticCollection.html index 046607b20048..80ce3d9f392a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ParameterizedParametersStaticCollection.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ParameterizedParametersStaticCollection.html @@ -1,6 +1,6 @@ -This inspection reports classes annotated with @RunWith(Parameterized.class) without +Reports classes annotated with @RunWith(Parameterized.class) without data provider method annotated with @Parameterized.Parameters

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ParametersPerConstructor.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ParametersPerConstructor.html index f9d0928af51f..226c8ea0b002 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ParametersPerConstructor.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ParametersPerConstructor.html @@ -1,6 +1,6 @@ -This inspection reports constructors with too many parameters. Constructors +Reports constructors with too many parameters. Constructors with too many parameters can be a good sign that refactoring is necessary.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ParametersPerMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ParametersPerMethod.html index c455163f1e4b..67d3f8d3eb7b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ParametersPerMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ParametersPerMethod.html @@ -1,6 +1,6 @@ -This inspection reports methods with too many parameters. Methods with too many parameters +Reports methods with too many parameters. Methods with too many parameters can be a good sign that refactoring is necessary. Methods whose signatures are inherited from library classes are ignored by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/PointlessArithmeticExpression.html b/plugins/InspectionGadgets/src/inspectionDescriptions/PointlessArithmeticExpression.html index 6dc234213990..b63273a25dc9 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/PointlessArithmeticExpression.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/PointlessArithmeticExpression.html @@ -1,6 +1,6 @@ -This inspection reports pointless arithmetic +Reports pointless arithmetic expressions. Such expressions include adding or subtracting zero, multiplying by zero or one, division by one, and shift by zero. Such expressions may be the result of automated refactorings not completely followed through to completion, and in any case are unlikely to be what the developer diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/PointlessBitwiseExpression.html b/plugins/InspectionGadgets/src/inspectionDescriptions/PointlessBitwiseExpression.html index 6f7c65c3bb2b..e15ae99e9659 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/PointlessBitwiseExpression.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/PointlessBitwiseExpression.html @@ -1,6 +1,6 @@ -This inspection reports pointless bitwise +Reports pointless bitwise expressions. Such expressions include anding with zero, oring by zero, and shift by zero. Such expressions may be the result of automated refactorings not completely followed through to completion, and in any case are unlikely to be what the developer diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/PointlessBooleanExpression.html b/plugins/InspectionGadgets/src/inspectionDescriptions/PointlessBooleanExpression.html index ff6834573950..30ec458e8d6b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/PointlessBooleanExpression.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/PointlessBooleanExpression.html @@ -1,6 +1,6 @@ -This inspection reports pointless or pointlessly +Reports pointless or pointlessly complicated boolean expressions. Such expressions include anding with true, oring with false, equality comparison with a boolean literal, or negation of a boolean literal. Such expressions may be the result of automated refactorings diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/PointlessIndexOfComparison.html b/plugins/InspectionGadgets/src/inspectionDescriptions/PointlessIndexOfComparison.html index 2c50ad9ae516..c25efb93a8ef 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/PointlessIndexOfComparison.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/PointlessIndexOfComparison.html @@ -1,6 +1,6 @@ -This inspection reports pointless comparison with +Reports pointless comparison with .indexOf() expression. An example of such an expression is comparing the result of .indexOf() with numbers less than -1. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/PointlessNullCheck.html b/plugins/InspectionGadgets/src/inspectionDescriptions/PointlessNullCheck.html index 5b77607bbbb0..e69e0d11d5b7 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/PointlessNullCheck.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/PointlessNullCheck.html @@ -1,6 +1,6 @@ -

This inspection reports a null check followed by an instanceof check. +

Reports a null check followed by an instanceof check. Since the instanceof operator always returns false for null, there is no need to also have a null check.

Here is an example of a violation:

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/PrimitiveArrayArgumentToVariableArgMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/PrimitiveArrayArgumentToVariableArgMethod.html index abe2cef1e89a..b9ee1385da95 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/PrimitiveArrayArgumentToVariableArgMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/PrimitiveArrayArgumentToVariableArgMethod.html @@ -1,6 +1,6 @@ -This inspection reports any calls to a variable-argument method which has a primitive array in +Reports any calls to a variable-argument method which has a primitive array in in the variable-argument position (e.g System.out.printf("%s", new int[]{1, 2, 3}) ). Such a primitive-array argument may be confusing, as it will wrapped as a single-element array, rather than each individual element being boxed, as might be expected. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ProtectedField.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ProtectedField.html index cab6de28fde4..e58b23e8935c 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ProtectedField.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ProtectedField.html @@ -1,6 +1,6 @@ -This inspection reports protected instance variables. +Reports protected instance variables. Constants (i.e. variables marked static and final) are not reported.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ProtectedInnerClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ProtectedInnerClass.html index 810618ce8bd3..330a2ee9e1c3 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ProtectedInnerClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ProtectedInnerClass.html @@ -1,6 +1,6 @@ -This inspection reports protected inner classes. +Reports protected inner classes.

Use the first checkbox below to ignore protected inner enums. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ProtectedMemberInFinalClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ProtectedMemberInFinalClass.html index 503a18f64222..81f7909d6898 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ProtectedMemberInFinalClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ProtectedMemberInFinalClass.html @@ -1,6 +1,6 @@ -This inspection reports members being declared protected in +Reports members being declared protected in classes that are declared final. Such members may be declared private or package-visible instead. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/PublicConstructor.html b/plugins/InspectionGadgets/src/inspectionDescriptions/PublicConstructor.html index 29789153f86e..2275db535a3e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/PublicConstructor.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/PublicConstructor.html @@ -1,6 +1,6 @@ -This inspection reports public constructors. Some coding standards discourage public constructors, preferring to use +Reports public constructors. Some coding standards discourage public constructors, preferring to use static factory methods. This way the implementation can be swapped out without affecting the call sites.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/PublicConstructorInNonPublicClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/PublicConstructorInNonPublicClass.html index 5dd636e833ae..852ce2ed75ff 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/PublicConstructorInNonPublicClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/PublicConstructorInNonPublicClass.html @@ -1,6 +1,6 @@ -This inspection reports all constructors in non-public +Reports all constructors in non-public classes that are declared public.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/PublicField.html b/plugins/InspectionGadgets/src/inspectionDescriptions/PublicField.html index 7d0c3238ca8a..db0c523a4843 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/PublicField.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/PublicField.html @@ -1,6 +1,6 @@ -This inspection reports public instance variables. +Reports public instance variables. Constants (i.e. variables marked static and final) are not reported.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/PublicFieldAccessedInSynchronizedContext.html b/plugins/InspectionGadgets/src/inspectionDescriptions/PublicFieldAccessedInSynchronizedContext.html index 2baee0d9cdd4..6df47287c2f5 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/PublicFieldAccessedInSynchronizedContext.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/PublicFieldAccessedInSynchronizedContext.html @@ -1,6 +1,6 @@ -This inspection reports non-final, non-private fields which are accessed in a synchronized context. +Reports non-final, non-private fields which are accessed in a synchronized context. A non-private field cannot be guaranteed to always be accessed in a synchronized manner, and such "partially synchronized" access may result in unexpectedly inconsistent data structures. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/PublicInnerClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/PublicInnerClass.html index 65637ae7be1b..64b5ad244b65 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/PublicInnerClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/PublicInnerClass.html @@ -1,6 +1,6 @@ -This inspection reports public inner classes. +Reports public inner classes.

Use the first checkbox below to ignore public inner enums. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/PublicMethodNotExposedInInterface.html b/plugins/InspectionGadgets/src/inspectionDescriptions/PublicMethodNotExposedInInterface.html index 5d50ce17e6d9..e9562ee972b2 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/PublicMethodNotExposedInInterface.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/PublicMethodNotExposedInInterface.html @@ -1,6 +1,6 @@ -This inspection reports public methods in classes +Reports public methods in classes which are not exposed as in interface. Exposing all public methods via interface is important for maintaining loose coupling, and may be necessary for certain component-based programming styles. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/PublicMethodWithoutLogging.html b/plugins/InspectionGadgets/src/inspectionDescriptions/PublicMethodWithoutLogging.html index 9da75e59d591..6002b368d373 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/PublicMethodWithoutLogging.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/PublicMethodWithoutLogging.html @@ -1,6 +1,6 @@ -This inspection reports any public method which does not contain a logging statement. This inspection does not report +Reports any public method which does not contain a logging statement. This inspection does not report simple getters and setters.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/PublicStaticArrayField.html b/plugins/InspectionGadgets/src/inspectionDescriptions/PublicStaticArrayField.html index 9a3783f908cb..f95b329f50b1 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/PublicStaticArrayField.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/PublicStaticArrayField.html @@ -1,6 +1,6 @@ -This inspection reports public static array fields. Often used +Reports public static array fields. Often used to store arrays of constant values, these fields nonetheless represent a security hazard, as their contents may be modified, even if the field is declared as final. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/PublicStaticCollectionField.html b/plugins/InspectionGadgets/src/inspectionDescriptions/PublicStaticCollectionField.html index b8f610e80bd6..368b609f2d18 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/PublicStaticCollectionField.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/PublicStaticCollectionField.html @@ -1,6 +1,6 @@ -This inspection reports public static Collection fields. Often used +Reports public static Collection fields. Often used to store collections of constant values, these fields nonetheless represent a security hazard, as their contents may be modified, even if the field is declared as final. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/QuestionableName.html b/plugins/InspectionGadgets/src/inspectionDescriptions/QuestionableName.html index a13b58d41930..d9ae47c7576f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/QuestionableName.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/QuestionableName.html @@ -1,6 +1,6 @@ -This inspection reports on any variables, methods, or classes with questionable names. +Reports on any variables, methods, or classes with questionable names. This inspection is best used to report common metasyntactic variables which may be used as names by lazy or confused developers. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/RandomDoubleForRandomInteger.html b/plugins/InspectionGadgets/src/inspectionDescriptions/RandomDoubleForRandomInteger.html index d08457b29f8b..2f1c40e9f7ae 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/RandomDoubleForRandomInteger.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/RandomDoubleForRandomInteger.html @@ -1,6 +1,6 @@ -This inspection reports any calls to +Reports any calls to java.util.Random.getDouble() which are then multiplied by some factor and cast to an integer. For generating a random integer in some range, java.util.Random.getInt() is more efficient. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/RawUseOfParameterizedType.html b/plugins/InspectionGadgets/src/inspectionDescriptions/RawUseOfParameterizedType.html index 04b98e586921..c12c6c346108 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/RawUseOfParameterizedType.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/RawUseOfParameterizedType.html @@ -1,6 +1,6 @@ -This inspection reports any uses of parameterized classes where the type parameters are omitted. +Reports any uses of parameterized classes where the type parameters are omitted. Such "raw" uses of parameterized types are valid in Java, but defeat the purpose of using type parameters, and may mask bugs.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ReadObjectAndWriteObjectPrivate.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ReadObjectAndWriteObjectPrivate.html index 8931c49814a8..7c8caaa3f7b2 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ReadObjectAndWriteObjectPrivate.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ReadObjectAndWriteObjectPrivate.html @@ -1,6 +1,6 @@ -This inspection reports Serializable classes where the readObject +Reports Serializable classes where the readObject and writeObject() methods are not declared private. There is no reason these methods should ever have greater visibility than that. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ReadObjectInitialization.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ReadObjectInitialization.html index 3042cd790032..9fb16da8a1f5 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ReadObjectInitialization.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ReadObjectInitialization.html @@ -1,6 +1,6 @@ -This inspection reports variables which are not guaranteed to be initialized after the object is +Reports variables which are not guaranteed to be initialized after the object is deserialized by the readObject() method.

Note: This inspection uses a very conservative dataflow algorithm, and may report instance variables diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ReadResolveAndWriteReplaceProtected.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ReadResolveAndWriteReplaceProtected.html index d47e9014e48f..96617fa8b8db 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ReadResolveAndWriteReplaceProtected.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ReadResolveAndWriteReplaceProtected.html @@ -1,6 +1,6 @@ -This inspection reports Serializable classes where the readResolve() +Reports Serializable classes where the readResolve() and writeReplace() methods are not declared protected. Note: in the case of classes declared final, these methods may be declared private, instead. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/RecordStoreResource.html b/plugins/InspectionGadgets/src/inspectionDescriptions/RecordStoreResource.html index 94abb12e4c93..ae185d9d18ea 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/RecordStoreResource.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/RecordStoreResource.html @@ -3,7 +3,7 @@ This inspection is intended for J2ME and other highly resource constrained environments. Applying the results of this inspection without consideration might have negative effects on code clarity and design.

-This inspection reports any J2ME RecordStore resource which is not opened in front of a try +Reports any J2ME RecordStore resource which is not opened in front of a try block and closed in the corresponding finally block. Such resources may be inadvertently leaked if an exception is thrown before the resource is closed. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/RedundantFieldInitialization.html b/plugins/InspectionGadgets/src/inspectionDescriptions/RedundantFieldInitialization.html index a76161ac0115..1026a24121f9 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/RedundantFieldInitialization.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/RedundantFieldInitialization.html @@ -1,6 +1,6 @@ -This inspection reports fields explicitly initialized to +Reports fields explicitly initialized to the same values that the JVM would initialize them to by default.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/RedundantImplements.html b/plugins/InspectionGadgets/src/inspectionDescriptions/RedundantImplements.html index 472712c9fb1d..2553166071a5 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/RedundantImplements.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/RedundantImplements.html @@ -1,6 +1,6 @@ -This inspection reports any cases of classes declaring that they implement or extend an interface, when +Reports any cases of classes declaring that they implement or extend an interface, when that interface is already declared as implemented by a superclass or extended by another interface of that class. Such declarations are unnecessary, and may be safely removed. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/RedundantImport.html b/plugins/InspectionGadgets/src/inspectionDescriptions/RedundantImport.html index ad434d6297e6..9b19d2b0baa5 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/RedundantImport.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/RedundantImport.html @@ -1,6 +1,6 @@ -This inspection reports any import +Reports any import statements that are covered by previous import statements in the same file. Since IDEA can automatically detect and fix such statements with its "Optimize Imports" command, this inspection is mostly useful diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/RedundantMethodOverride.html b/plugins/InspectionGadgets/src/inspectionDescriptions/RedundantMethodOverride.html index 412669d55599..cb0767c67f8a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/RedundantMethodOverride.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/RedundantMethodOverride.html @@ -1,6 +1,6 @@ -This inspection reports any method that has a body and signature that are identical +Reports any method that has a body and signature that are identical to its super method. Such a method is redundant and probably a coding error.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/RedundantStringFormatCall.html b/plugins/InspectionGadgets/src/inspectionDescriptions/RedundantStringFormatCall.html index b45db25c9624..a9d0a878a26c 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/RedundantStringFormatCall.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/RedundantStringFormatCall.html @@ -1,6 +1,6 @@ -This inspection reports any calls to String.format() where only a format string is +Reports any calls to String.format() where only a format string is provided, but no arguments. Such a call is unnecessary and can be replaced with just the string. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ReflectionForUnavailableAnnotation.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ReflectionForUnavailableAnnotation.html index 0d693c534579..42ef1cd54683 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ReflectionForUnavailableAnnotation.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ReflectionForUnavailableAnnotation.html @@ -1,6 +1,6 @@ -This inspection reports any attempts to reflectively check for the presence of an +Reports any attempts to reflectively check for the presence of an annotation which is not defined as being retained at runtime. Using Class.isAnnotationPresent() to test for an annotation which has source retention or class-file retention (the default) will always result in a negative result, diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/RefusedBequest.html b/plugins/InspectionGadgets/src/inspectionDescriptions/RefusedBequest.html index a0d6535808ef..aae5e4b0150c 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/RefusedBequest.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/RefusedBequest.html @@ -1,6 +1,6 @@ -This inspection reports any methods which override concrete methods, +Reports any methods which override concrete methods, but which do not call that method as super. Such methods may represent a failure of abstraction, and can lead to hard-to-trace bugs. Methods overridden from java.lang.Object are not reported by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ReplaceAllDot.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ReplaceAllDot.html index fd64a95ba235..55ca58813801 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ReplaceAllDot.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ReplaceAllDot.html @@ -1,6 +1,6 @@ -This inspection reports any calls to +Reports any calls to java.lang.String.replaceAll() with "." as the first argument. Calling replaceAll(".", ...) replaces all of the characters in a string with its second argument, which is rarely the desired functionality. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ReplaceAssignmentWithOperatorAssignment.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ReplaceAssignmentWithOperatorAssignment.html index 825f489c14ee..1e2f9dea8373 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ReplaceAssignmentWithOperatorAssignment.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ReplaceAssignmentWithOperatorAssignment.html @@ -1,6 +1,6 @@ -This inspection reports assignment operations which can be replaced by operator-assignment. Code +Reports assignment operations which can be replaced by operator-assignment. Code using operator assignment may be clearer, and theoretically more performant.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ResultOfObjectAllocationIgnored.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ResultOfObjectAllocationIgnored.html index 06a0fc08ef36..077a8fb17157 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ResultOfObjectAllocationIgnored.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ResultOfObjectAllocationIgnored.html @@ -1,6 +1,6 @@ -This inspection reports object allocation where the object allocated ignored. +Reports object allocation where the object allocated ignored. Such allocation expressions are legal Java, but are usually either inadvertent, or evidence of a very odd object initialization strategy. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ResultSetIndexZero.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ResultSetIndexZero.html index 9be24484fc78..a126da4106fc 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ResultSetIndexZero.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ResultSetIndexZero.html @@ -1,6 +1,6 @@ -This inspection reports any attempts to access column 0 of a java.sql.ResultSet or java.sql.PreparedStatement. For historical +Reports any attempts to access column 0 of a java.sql.ResultSet or java.sql.PreparedStatement. For historical reasons columns of java.sql.ResultSets and java.sql.PreparedStatements are numbered beginning with 1, rather than 0, and accessing column 0 is a common error in JDBC programming. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnFromFinallyBlock.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnFromFinallyBlock.html index 5559c007b739..4c9f0cd389db 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnFromFinallyBlock.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnFromFinallyBlock.html @@ -1,6 +1,6 @@ -This inspection reports return statements inside of finally +Reports return statements inside of finally blocks. While occasionally intended, such return statements may mask exceptions thrown, and tremendously complicate debugging. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnNull.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnNull.html index 05248859bbf1..d6c5f4378cf6 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnNull.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnNull.html @@ -1,6 +1,6 @@ -This inspection reports return statements with null values. +Reports return statements with null values. While occasionally useful, this construct may make the code more prone to failing with a NullPointerException, and often indicates that the developer doesn't really understand the classes intended semantics. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnOfCollectionField.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnOfCollectionField.html index 57bbcf480ba6..38bc67a59fa5 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnOfCollectionField.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnOfCollectionField.html @@ -1,6 +1,6 @@ -This inspection reports any attempt to return an array or Collection field from a method. Since +Reports any attempt to return an array or Collection field from a method. Since the array or Collection may have its contents modified by the calling method, this construct may result in an object having its state modified unexpectedly. While occasionally useful for performance reasons, this construct is inherently bug-prone. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnOfDateField.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnOfDateField.html index 699a29e7772f..dbf8d9c177b9 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnOfDateField.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnOfDateField.html @@ -1,6 +1,6 @@ -This inspection reports any attempt to return a java.lang.Date or +Reports any attempt to return a java.lang.Date or java.lang.Calendar field from a method. Since Date or Calendar are often treated as immutable values but are actually mutable, this construct may diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnThis.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnThis.html index 584740ea0a23..8995be90c978 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnThis.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnThis.html @@ -1,6 +1,6 @@ -This inspection reports methods returning this. +Reports methods returning this. While such a return is valid, it is rarely necessary, and usually indicates that the developer intends the method to be used as part of a chain of similar method calls (e.g. buffer.append("foo").append("bar").append("baz")). Such chains are frowned upon by many coding standards. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ReuseOfLocalVariable.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ReuseOfLocalVariable.html index d8fd9f249af9..1916f1fae04e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ReuseOfLocalVariable.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ReuseOfLocalVariable.html @@ -1,6 +1,6 @@ -This inspection reports local variables that are "reused", overwriting their +Reports local variables that are "reused", overwriting their values with new values unrelated to their original use. Such local variable reuse may be confusing, as the intended semantics of the local variable may vary with each use. It may also be prone to bugs, if code changes result in values that were thought to be overwritten actually diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/RuntimeExec.html b/plugins/InspectionGadgets/src/inspectionDescriptions/RuntimeExec.html index a519e2ded993..ef5e0a7f63fc 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/RuntimeExec.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/RuntimeExec.html @@ -1,6 +1,6 @@ -This inspection reports the calls to Runtime.exec() or any +Reports the calls to Runtime.exec() or any of its variants. Calls to Runtime.exec() are inherently unportable between operating systems. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/RuntimeExecWithNonConstantString.html b/plugins/InspectionGadgets/src/inspectionDescriptions/RuntimeExecWithNonConstantString.html index 5257c6e8acc4..a91fdf2b79c2 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/RuntimeExecWithNonConstantString.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/RuntimeExecWithNonConstantString.html @@ -1,6 +1,6 @@ -This inspection reports the calls to Runtime.exec() or any +Reports the calls to Runtime.exec() or any of its variants which take a dynamically-constructed string as the statement to execute. Constructed execution strings are a common source of security breaches. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SafeLock.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SafeLock.html index b2911623d4bb..053b379a4592 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SafeLock.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SafeLock.html @@ -1,6 +1,6 @@ -This inspection reports any java.util.concurrent.locks.Lock resource which is not acquired in front of a +Reports any java.util.concurrent.locks.Lock resource which is not acquired in front of a try block and unlocked in the corresponding finally block. Such resources may be inadvertently leaked if an exception is thrown before the resource is closed. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SamePackageImport.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SamePackageImport.html index 9a97a36b3c13..9949eefbc531 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SamePackageImport.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SamePackageImport.html @@ -1,6 +1,6 @@ -This inspection reports any import statements which refer to the same package as the +Reports any import statements which refer to the same package as the containing file. Such imports are unnecessary, and probably the result of incomplete refactorings. Since IDEA can automatically detect and fix such statements with its "Optimize Imports" command, this inspection is mostly useful for off-line reporting on diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SerialPersistentFieldsWithWrongSignature.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SerialPersistentFieldsWithWrongSignature.html index 6b579c27426e..6d8e158dbef5 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SerialPersistentFieldsWithWrongSignature.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SerialPersistentFieldsWithWrongSignature.html @@ -1,6 +1,6 @@ -This inspection reports Serializable classes whose serialPersistentFields field. +Reports Serializable classes whose serialPersistentFields field. is not declared private static final ObjectStreamField.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SerialVersionUIDNotStaticFinal.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SerialVersionUIDNotStaticFinal.html index c95a5c89d28d..ed4a47c7079a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SerialVersionUIDNotStaticFinal.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SerialVersionUIDNotStaticFinal.html @@ -1,6 +1,6 @@ -This inspection reports Serializable classes whose serialVersionUID field. +Reports Serializable classes whose serialVersionUID field. is not declared private static final long.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableClassInSecureContext.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableClassInSecureContext.html index 7a8359562710..ca87c7c08d78 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableClassInSecureContext.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableClassInSecureContext.html @@ -1,6 +1,6 @@ -This inspection reports classes which may be serialized. A class +Reports classes which may be serialized. A class may be serialized if it supports the Serializable interface, and its writeObject() method is not defined to immediately throw an error. Serializable classes may be dangerous in code intended for secure use. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableHasSerialVersionUIDField.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableHasSerialVersionUIDField.html index 3ffb16147c48..0d18028103ff 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableHasSerialVersionUIDField.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableHasSerialVersionUIDField.html @@ -1,6 +1,6 @@ -This inspection reports any Serializable classes which do not provide a serialVersionUID field. +Reports any Serializable classes which do not provide a serialVersionUID field. Without a serialVersionUID field, any change to a class will make previously serialized versions unreadable.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableHasSerializationMethods.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableHasSerializationMethods.html index 7d7ab80c96d7..d1bd81440e20 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableHasSerializationMethods.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableHasSerializationMethods.html @@ -1,6 +1,6 @@ -This inspection reports Serializable classes +Reports Serializable classes which do not provide readObject and writeObject methods. If readObject and writeObject methods are not provided, the default serialization diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableInnerClassHasSerialVersionUIDField.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableInnerClassHasSerialVersionUIDField.html index f00a3c9356b2..a5f9f1fcae24 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableInnerClassHasSerialVersionUIDField.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableInnerClassHasSerialVersionUIDField.html @@ -1,6 +1,6 @@ -This inspection reports Serializable non-static +Reports Serializable non-static inner classes which do not provide a serialVersionUID field. Without a serialVersionUID field, any change to a class will make previously serialized versions unreadable. It is strongly recommended that Serializable non-static inner classes have diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableInnerClassWithNonSerializableOuterClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableInnerClassWithNonSerializableOuterClass.html index 7d7e455f17a1..e8597643d26a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableInnerClassWithNonSerializableOuterClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableInnerClassWithNonSerializableOuterClass.html @@ -1,6 +1,6 @@ -This inspection reports Serializable non-static +Reports Serializable non-static inner classes whose outer classes are non-Serializable. Such classes are unlikely to serialize correctly, due to implicit references from the inner to outer class. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableWithUnconstructableAncestor.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableWithUnconstructableAncestor.html index 847af16e497d..bce817e3af5f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableWithUnconstructableAncestor.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SerializableWithUnconstructableAncestor.html @@ -1,6 +1,6 @@ -This inspection reports Serializable classes whose closest non-serializable ancestor lacks +Reports Serializable classes whose closest non-serializable ancestor lacks a no-argument constructor. Such classes can not be deserialized.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SetReplaceableByEnumSet.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SetReplaceableByEnumSet.html index 25ee2c561c5a..215af9252db8 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SetReplaceableByEnumSet.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SetReplaceableByEnumSet.html @@ -1,6 +1,6 @@ -This inspection reports any instantiations of java.util.Set objects +Reports any instantiations of java.util.Set objects whose content types are enumerated classes. Such java.util.Set objects can be replaced by java.util.EnumSet objects. java.util.EnumSet implementations can be much more efficient diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SetupCallsSuperSetup.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SetupCallsSuperSetup.html index 44e229245746..d4b99ca932b1 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SetupCallsSuperSetup.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SetupCallsSuperSetup.html @@ -1,6 +1,6 @@ -This inspection reports JUnit classes whose setUp() method +Reports JUnit classes whose setUp() method does not call super.setUp().

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SetupIsPublicVoidNoArg.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SetupIsPublicVoidNoArg.html index 82b89f78004d..f5368b2dd97c 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SetupIsPublicVoidNoArg.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SetupIsPublicVoidNoArg.html @@ -1,6 +1,6 @@ -This inspection reports JUnit classes whose setUp() method +Reports JUnit classes whose setUp() method is not declared public, does not return void, or takes arguments. Such setUp() methods are easy to create inadvertently, diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ShiftOutOfRange.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ShiftOutOfRange.html index 6bc38d15c2d5..502947e614db 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ShiftOutOfRange.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ShiftOutOfRange.html @@ -1,6 +1,6 @@ -This inspection reports shift operations +Reports shift operations where the value shifted by is constant and outside of the reasonable range. Integer shift operations outside of the range 0..31 and long shift operations outside of the range 0..63 are reported. Shifting by negative or overly large values is almost certainly diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SignalWithoutCorrespondingAwait.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SignalWithoutCorrespondingAwait.html index 484570eb4cf1..330165ea99a9 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SignalWithoutCorrespondingAwait.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SignalWithoutCorrespondingAwait.html @@ -1,6 +1,6 @@ -This inspection reports on any call to Condition.signal() +Reports on any call to Condition.signal() or Condition.signalAll() for which no call to a corresponding Condition.await() can be found. Only calls which target fields of the current class are reported by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SimpleDateFormatWithoutLocale.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SimpleDateFormatWithoutLocale.html index 3a04be138489..c918a6f2febe 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SimpleDateFormatWithoutLocale.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SimpleDateFormatWithoutLocale.html @@ -1,6 +1,6 @@ -This inspection reports any instantiations of java.util.SimpleDateFormat +Reports any instantiations of java.util.SimpleDateFormat which do not specify a java.util.Locale. Such calls are usually incorrect in an internationalized environment. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableAnnotation.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableAnnotation.html index 1905b0839765..b65732fda32c 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableAnnotation.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableAnnotation.html @@ -1,6 +1,6 @@ -This inspection reports annotations which can be simplified to their 'single element' +Reports annotations which can be simplified to their 'single element' or 'marker' shorthand form. Annotations that contain whitespace between the @-sign and the name of the annotation are also reported. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableConditionalExpression.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableConditionalExpression.html index b6ac1d0aa8e4..510ea1e556e8 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableConditionalExpression.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableConditionalExpression.html @@ -1,6 +1,6 @@ -This inspection reports conditional expressions of the form +Reports conditional expressions of the form condition?true:foo or condition?false:foo. These expressions may be safely simplified to diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableEqualsExpression.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableEqualsExpression.html index b876cdd52da6..5554a5dc6720 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableEqualsExpression.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableEqualsExpression.html @@ -1,6 +1,6 @@ -This inspection reports comparisons to null which are followed by an 'equals()' call +Reports comparisons to null which are followed by an 'equals()' call with a constant argument.

For example the following will be reported by this inspection: diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableIfStatement.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableIfStatement.html index ade84e02d39d..8c7e4ac4f181 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableIfStatement.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableIfStatement.html @@ -3,7 +3,7 @@ This inspection is intended for J2ME and other highly resource constrained environments. Applying the results of this inspection without consideration might have negative effects on code clarity and design.

-This inspection reports if statements of the form +Reports if statements of the form if (condition) return true else return foo or if (condition) return false else return foo. These expressions may be safely simplified to diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableJUnitAssertion.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableJUnitAssertion.html index 85aa65d10f40..1da5159a3888 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableJUnitAssertion.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SimplifiableJUnitAssertion.html @@ -1,6 +1,6 @@ -This inspection reports any JUnit assertTrue calls +Reports any JUnit assertTrue calls which can be replaced by equivalent assertEquals calls. assertEquals calls will normally give better error messages in case of test failure than assertTrue can. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SingleCharacterStartsWith.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SingleCharacterStartsWith.html index 978c207d876c..49b39dd2e08b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SingleCharacterStartsWith.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SingleCharacterStartsWith.html @@ -3,7 +3,7 @@ This inspection is intended for J2ME and other highly resource constrained environments. Applying the results of this inspection without consideration might have negative effects on code clarity and design.

-This inspection reports any calls to String.startsWith() or +Reports any calls to String.startsWith() or String.endsWith() which are passed single character string literals as parameter. Such calls may be more efficiently implemented with String.charAt(). Because the performance gain is diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SingleClassImport.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SingleClassImport.html index 06cb04422cfd..037e99c73911 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SingleClassImport.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SingleClassImport.html @@ -1,6 +1,6 @@ -This inspection reports any import statements which cover single classes (as opposed to entire packages). +Reports any import statements which cover single classes (as opposed to entire packages). Some coding standards prohibit such import statements. Since IDEA can automatically detect and fix such statements with its "Optimize Imports" command, this inspection is mostly useful for off-line reporting on code bases that you don't intend to change. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/Singleton.html b/plugins/InspectionGadgets/src/inspectionDescriptions/Singleton.html index 910eefa65f15..16a837bdf34b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/Singleton.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/Singleton.html @@ -1,6 +1,6 @@ -This inspection reports singleton classes. +Reports singleton classes. Singleton classes are declared so that only one instance of the class may ever be instantiated. Singleton classes complicate testing, and their presence may indicate a lack of object-oriented design. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SizeReplaceableByIsEmpty.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SizeReplaceableByIsEmpty.html index 4f86bb745afc..79843f52fd89 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SizeReplaceableByIsEmpty.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SizeReplaceableByIsEmpty.html @@ -1,6 +1,6 @@ -This inspection reports any .size() or .length() +Reports any .size() or .length() comparisons with a 0 literal which can be replaced with a call to .isEmpty().

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SleepWhileHoldingLock.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SleepWhileHoldingLock.html index 6c941ec7e9c0..cd88c351bb97 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SleepWhileHoldingLock.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SleepWhileHoldingLock.html @@ -1,6 +1,6 @@ -This inspection reports calls to java.lang.Thread.sleep() that occur while +Reports calls to java.lang.Thread.sleep() that occur while within a synchronized block or method. Sleeping while synchronized may result in decreased performance, poor scalability, and possibly even deadlocking. Consider using wait instead, diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SocketResource.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SocketResource.html index 6a061f63a3bb..462d31920dbc 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SocketResource.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SocketResource.html @@ -1,7 +1,7 @@ -This inspection reports any Socket resource which is not opened in front of a try +Reports any Socket resource which is not opened in front of a try block and closed in the corresponding finally block. Such resources may be inadvertently leaked if an exception is thrown before the resource is closed. Socket resources reported by this inspection include java.net.Socket, diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StandardVariableNames.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StandardVariableNames.html index c615ae93be69..786b264afa48 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StandardVariableNames.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StandardVariableNames.html @@ -1,6 +1,6 @@ -This inspection reports on any variables with 'standard' names which are of unexpected types. +Reports on any variables with 'standard' names which are of unexpected types. Such names may be confusing. Standard names and types are as follows:

  • i, j, k, m, n - int
  • diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticCallOnSubclass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticCallOnSubclass.html index 5f4e5ff342ed..e30d25a94385 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticCallOnSubclass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticCallOnSubclass.html @@ -1,6 +1,6 @@ -This inspection reports static method calls where the call is qualified +Reports static method calls where the call is qualified by a subclass of the declaring class, rather than the declaring class itself (e.g. MyThreadSubclass.sleep()). Java allows such qualification, but such calls may be confusing, and may indicate a subtle confusion of inheritance and overriding. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticCollection.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticCollection.html index 41921649de4e..e645ae3f52fa 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticCollection.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticCollection.html @@ -1,6 +1,6 @@ -This inspection reports Collection variables declared as static. While +Reports Collection variables declared as static. While not necessarily a problem, static collections are often causes of memory leaks, and are therefore prohibited by some coding standards. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticFieldReferenceOnSubclass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticFieldReferenceOnSubclass.html index 00cee37e2d7a..913b81850657 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticFieldReferenceOnSubclass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticFieldReferenceOnSubclass.html @@ -1,6 +1,6 @@ -This inspection reports static field access where the call is qualified +Reports static field access where the call is qualified by a subclass of the declaring class, rather than the declaring class itself. Java allows such qualification, but such accesses may be confusing, and may indicate a subtle confusion of inheritance and overriding. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticImport.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticImport.html index 570e5de1c36f..1904a0f20472 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticImport.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticImport.html @@ -1,6 +1,6 @@ -This inspection reports static import statements. +Reports static import statements. Such import statements are not supported under Java 1.4 or earlier JVMs.

    diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticInheritance.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticInheritance.html index 584d7bf70cd3..4c623deb0837 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticInheritance.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticInheritance.html @@ -1,6 +1,6 @@ -This inspection reports interfaces which are implemented for no reason other than +Reports interfaces which are implemented for no reason other than access to constants. Such inheritance is often confusing, and may hide important dependency information. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticMethodNamingConvention.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticMethodNamingConvention.html index e9cd6fa73d22..605ed476071b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticMethodNamingConvention.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticMethodNamingConvention.html @@ -1,6 +1,6 @@ -This inspection reports static methods whose names are either too short, too long, or do not follow +Reports static methods whose names are either too short, too long, or do not follow the specified regular expression pattern.

    diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticMethodOnlyUsedInOneClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticMethodOnlyUsedInOneClass.html index 5d9cb0e4de6b..50c0795e1cb1 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticMethodOnlyUsedInOneClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticMethodOnlyUsedInOneClass.html @@ -1,6 +1,6 @@ -This inspection reports static methods which +Reports static methods which are only called from one class which is not the same as the class containing the method. Such methods could be moved into that class.

    diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticNonFinalField.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticNonFinalField.html index 861a000c5955..649cd178d73a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticNonFinalField.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticNonFinalField.html @@ -1,6 +1,6 @@ -This inspection reports non-final static fields. +Reports non-final static fields.

    Powered by InspectionGadgets diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticSuite.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticSuite.html index c6c8a287733e..830ed1963ab2 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticSuite.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticSuite.html @@ -1,6 +1,6 @@ -This inspection reports JUnit test case classes which contain suite() methods which +Reports JUnit test case classes which contain suite() methods which are not declared static.

    diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticVariableInitialization.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticVariableInitialization.html index 1000f1b78a61..38fba0a1c0cb 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticVariableInitialization.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticVariableInitialization.html @@ -1,6 +1,6 @@ -This inspection reports static variables which are not guaranteed to be initialized upon class initialization. +Reports static variables which are not guaranteed to be initialized upon class initialization.

    Note: This inspection uses a very conservative dataflow algorithm, and may report static variables as uninitialized incorrectly. Variables reported as initialized will always be initialized. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticVariableNamingConvention.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticVariableNamingConvention.html index 625244614fe5..27ef62898a9b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticVariableNamingConvention.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticVariableNamingConvention.html @@ -1,6 +1,6 @@ -This inspection reports static variables whose names are either too short, too long, or do not follow +Reports static variables whose names are either too short, too long, or do not follow the specified regular expression pattern. Constants, i.e. variables of immutable type declared static final, are not checked by this inspection diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticVariableOfConcreteClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticVariableOfConcreteClass.html index e8ea4b76c4db..bb269049d8ef 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticVariableOfConcreteClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticVariableOfConcreteClass.html @@ -1,6 +1,6 @@ -This inspection reports any static fields whose type is declared to be a concrete class, rather than an interface. +Reports any static fields whose type is declared to be a concrete class, rather than an interface. Such declarations may represent a failure of abstraction, and may make testing more difficult. Declarations whose classes come from system or third-party libraries will not be reported by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticVariableUninitializedUse.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticVariableUninitializedUse.html index 223d25c1b85e..0fe89050bae4 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StaticVariableUninitializedUse.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StaticVariableUninitializedUse.html @@ -1,6 +1,6 @@ -This inspection reports static variables which are read prior to initialization. +Reports static variables which are read prior to initialization.

    Note: This inspection uses a very conservative dataflow algorithm, and may report static variables used uninitialized incorrectly. Variables reported as initialized will always be initialized. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StringBufferField.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StringBufferField.html index ecdd35ec0a8f..5f0822d78dde 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StringBufferField.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StringBufferField.html @@ -1,6 +1,6 @@ -This inspection reports fields with type +Reports fields with type java.lang.StringBuffer or java.lang.StringBuilder. StringBuffer fields can grow without limit, and are often the cause of memory leaks. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StringBufferMustHaveInitialCapacity.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StringBufferMustHaveInitialCapacity.html index 0c738998be77..9bd65860bc51 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StringBufferMustHaveInitialCapacity.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StringBufferMustHaveInitialCapacity.html @@ -1,6 +1,6 @@ -This inspection reports any attempt to instantiate a new StringBuffer or +Reports any attempt to instantiate a new StringBuffer or StringBuilder object without specifying its initial capacity. If no initial capacity is specified, a default capacity is used, which will rarely be optimal. Failing to specify initial capacities for StringBuffers may result in performance issues, if space needs to be reallocated and diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StringBufferReplaceableByString.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StringBufferReplaceableByString.html index dc144db4b2e6..9a9217f3f147 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StringBufferReplaceableByString.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StringBufferReplaceableByString.html @@ -1,6 +1,6 @@ -This inspection reports any variables declared as or uses of java.lang.StringBuffer and java.lang.StringBuilder +Reports any variables declared as or uses of java.lang.StringBuffer and java.lang.StringBuilder which are effectively constant. These may be replaced with java.lang.String expressions which results in simpler and possibly more efficient code. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StringBufferReplaceableByStringBuilder.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StringBufferReplaceableByStringBuilder.html index 6f5c47c3851b..58fb44e42cea 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StringBufferReplaceableByStringBuilder.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StringBufferReplaceableByStringBuilder.html @@ -1,6 +1,6 @@ -This inspection reports any variables declared as java.lang.StringBuffer which may be +Reports any variables declared as java.lang.StringBuffer which may be more efficiently declared as java.lang.StringBuilder. java.lang.StringBuilder is a non-thread-safe replacement for java.lang.StringBuffer, available in Java 5 and newer. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StringBufferToStringInConcatenation.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StringBufferToStringInConcatenation.html index d488b4ded5ba..57b96ed9c4cd 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StringBufferToStringInConcatenation.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StringBufferToStringInConcatenation.html @@ -1,6 +1,6 @@ -This inspection reports StringBuffer.toString() +Reports StringBuffer.toString() or StringBuilder.toString() in String concatenations. In addition to being confusing, this code performs String allocation and copying, which is unnecessary as of JDK1.4. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StringCompareTo.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StringCompareTo.html index 198717d87fc5..6f340b069e91 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StringCompareTo.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StringCompareTo.html @@ -1,6 +1,6 @@ -This inspection reports any call of compareTo() on String objects. Such calls are usually +Reports any call of compareTo() on String objects. Such calls are usually incorrect in an internationalized environment.

    diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenation.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenation.html index c825f2d5331c..054e58735e67 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenation.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenation.html @@ -1,6 +1,6 @@ -This inspection reports any String concatenation (+). Concatenation is usually +Reports any String concatenation (+). Concatenation is usually incorrect in an internationalized environment, and should be replace by uses of java.text.MessageFormat or similar classes. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationArgumentToLogCall.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationArgumentToLogCall.html index 1d12ca412f2d..45e908c7e3d5 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationArgumentToLogCall.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationArgumentToLogCall.html @@ -1,6 +1,6 @@ -This inspection reports non-constant string concatenations used as an argument to a SLF4J log method. +Reports non-constant string concatenations used as an argument to a SLF4J log method. Concatenation will be evaluated even when the logging message will not be logged; this can negatively impact performance. It is recommended to use parameterization instead which will only be evaluated when the string is actually logged and not when logging is disabled. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationInFormatCall.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationInFormatCall.html index ab7286fb909a..b937ac321f84 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationInFormatCall.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationInFormatCall.html @@ -1,6 +1,6 @@ -This inspection reports non-constant string concatenations used as a format string argument. +Reports non-constant string concatenations used as a format string argument. Often this is the result of mistakenly concatenating a string format argument by typing a '+' when a ',' was meant. This inspection checks calls to appropriate methods on diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationInLoops.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationInLoops.html index 837deab0bf72..2306538d7e46 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationInLoops.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationInLoops.html @@ -1,6 +1,6 @@ -This inspection reports String concatenation in loops. For performance reasons, it +Reports String concatenation in loops. For performance reasons, it is preferable to replace such concatenation with explicit calls to StringBuilder.append() or StringBuffer.append() diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationInMessageFormatCall.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationInMessageFormatCall.html index 7e51011b40a4..cc41692b1e9c 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationInMessageFormatCall.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationInMessageFormatCall.html @@ -1,6 +1,6 @@ -This inspection reports non-constant string concatenations used as an argument to a call to +Reports non-constant string concatenations used as an argument to a call to MessageFormat.format(). Often this is the result of mistakenly concatenating a string format argument by typing a '+' when a ',' was meant. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationInsideStringBufferAppend.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationInsideStringBufferAppend.html index c4e15b8f2bdd..098fd3e4f44f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationInsideStringBufferAppend.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationInsideStringBufferAppend.html @@ -1,6 +1,6 @@ -This inspection reports String concatenation used as +Reports String concatenation used as the argument to StringBuffer.append(), StringBuilder.append() or Appendable.append(). Such calls diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationMissingWhitespace.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationMissingWhitespace.html index b879ca34e3f3..bdc568a2f3c7 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationMissingWhitespace.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StringConcatenationMissingWhitespace.html @@ -1,6 +1,6 @@ -This inspection reports string concatenations where the left literal does not +Reports string concatenations where the left literal does not end with whitespace and the right literal does not start with whitespace. For example:

    
       String sql = "SELECT column" +
    diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StringConstructor.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StringConstructor.html
    index 61b4fe84e9ff..3851033ebf56 100644
    --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StringConstructor.html
    +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StringConstructor.html
    @@ -1,6 +1,6 @@
     
     
    -This inspection reports any attempt to instantiate a new
    +Reports any attempt to instantiate a new
     String object by copying an existing string.
     Constructing new String objects in this way
     is rarely necessary, and may cause performance problems if done often enough.
    diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StringEquality.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StringEquality.html
    index b968cac2eebb..54a5f361a8bd 100644
    --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StringEquality.html
    +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StringEquality.html
    @@ -1,6 +1,6 @@
     
     
    -This inspection reports any use of == to test for String equality,
    +Reports any use of == to test for String equality,
     rather than the ".equals()" method.
     
     

    diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StringEquals.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StringEquals.html index 8552c148d583..be1fa665e2b4 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StringEquals.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StringEquals.html @@ -1,6 +1,6 @@ -This inspection reports any call of equals() on String objects. Such calls are usually +Reports any call of equals() on String objects. Such calls are usually incorrect in an internationalized environment.

    diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StringEqualsEmptyString.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StringEqualsEmptyString.html index 6e6f1bb37d83..f8cbc8f40090 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StringEqualsEmptyString.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StringEqualsEmptyString.html @@ -1,6 +1,6 @@ -This inspection reports .equals() being called +Reports .equals() being called to compare a String with an empty string. It is normally more performant to test a String for emptiness by comparing its .length() to zero instead. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StringEqualsIgnoreCase.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StringEqualsIgnoreCase.html index 54abb65ff336..14563dbe8343 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StringEqualsIgnoreCase.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StringEqualsIgnoreCase.html @@ -1,6 +1,6 @@ -This inspection reports any call of equalsIgnoreCase() on String objects. Such calls are usually +Reports any call of equalsIgnoreCase() on String objects. Such calls are usually incorrect in an internationalized environment.

    diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StringReplaceableByStringBuffer.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StringReplaceableByStringBuffer.html index 2279743d56d0..45e397e37d13 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StringReplaceableByStringBuffer.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StringReplaceableByStringBuffer.html @@ -1,6 +1,6 @@ -This inspection reports any variables declared as java.lang.String which are +Reports any variables declared as java.lang.String which are repeatedly appended to. Such variables may be more efficiently declared as java.lang.StringBuffer or java.lang.StringBuilder. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StringToString.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StringToString.html index b8f78a87b1c6..8d20e8785938 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StringToString.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StringToString.html @@ -1,6 +1,6 @@ -This inspection reports any to call toString() on a String object. +Reports any to call toString() on a String object. This is entirely redundant.

    diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StringToUpperWithoutLocale.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StringToUpperWithoutLocale.html index f6e49b749b56..badf65f03556 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StringToUpperWithoutLocale.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StringToUpperWithoutLocale.html @@ -1,6 +1,6 @@ -This inspection reports any call of toUpperCase() or +Reports any call of toUpperCase() or toLowerCase() on String objects which do not specify a java.util.Locale. Such calls are usually incorrect in an internationalized environment. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StringTokenizer.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StringTokenizer.html index c13f00b065fe..2c96a81ae34b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StringTokenizer.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StringTokenizer.html @@ -1,6 +1,6 @@ -This inspection reports any use of the StringTokenizer class. Many uses of +Reports any use of the StringTokenizer class. Many uses of StringTokenizer are incorrect in an internationalized environment.

    diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SubstringZero.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SubstringZero.html index 8605b71b6225..6c0935a0e3fb 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SubstringZero.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SubstringZero.html @@ -1,6 +1,6 @@ -This inspection reports any call to String.substring() +Reports any call to String.substring() with a constant argument equal to zero. Such calls are completely redundant, and may be removed.

    diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SubtractionInCompareTo.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SubtractionInCompareTo.html index b85697114254..6ef50b219fb6 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SubtractionInCompareTo.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SubtractionInCompareTo.html @@ -1,6 +1,6 @@ -This inspection reports subtraction in +Reports subtraction in compareTo() methods. While it is a common idiom to use the results of integer subtraction as the return of a compareTo() method, this construct may cause subtle and difficult bugs in cases of integer overflow. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SuppressionAnnotation.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SuppressionAnnotation.html index 2dcb4afad0be..433d272f7dbf 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SuppressionAnnotation.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SuppressionAnnotation.html @@ -1,6 +1,6 @@ -This inspection reports any inspection suppression comments or annotations. +Reports any inspection suppression comments or annotations.

    Powered by InspectionGadgets diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SuspiciousArrayCast.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SuspiciousArrayCast.html index 79386eb05bf8..048f9cd75226 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SuspiciousArrayCast.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SuspiciousArrayCast.html @@ -1,6 +1,6 @@ -This inspection reports suspicious array casts. An array cast is suspicious when it casts to a more specific array type. Such +Reports suspicious array casts. An array cast is suspicious when it casts to a more specific array type. Such a cast is legal at compile time but may fail with a ClassCastException at runtime.

    diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SuspiciousIndentAfterControlStatement.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SuspiciousIndentAfterControlStatement.html index 4d79d5169822..eef66c1575e6 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SuspiciousIndentAfterControlStatement.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SuspiciousIndentAfterControlStatement.html @@ -1,6 +1,6 @@ -This inspection reports any suspicious indentation of statements after a control statement +Reports any suspicious indentation of statements after a control statement without braces. Such indentation can make it look like the statement is part of the control statement, when in fact it will be executed after the control statement. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SuspiciousSystemArraycopy.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SuspiciousSystemArraycopy.html index 1f5515bc5c1c..c72448c267a2 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SuspiciousSystemArraycopy.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SuspiciousSystemArraycopy.html @@ -1,6 +1,6 @@ -This inspection reports suspicious calls to System.arraycopy(). +Reports suspicious calls to System.arraycopy(). Warnings reported by this inspection are:

    • source or destination which are not of an array type. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SuspiciousToArrayCall.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SuspiciousToArrayCall.html index 585681be15fe..5c7917fa2bea 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SuspiciousToArrayCall.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SuspiciousToArrayCall.html @@ -1,6 +1,6 @@ -This inspection reports suspicious calls to Collection.toArray(). +Reports suspicious calls to Collection.toArray(). Reported are calls where the type of the specified array argument is not of the same type as the array type to which the result is casted or the type of the specified array argument does not match the type parameter of the collection declaration. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatement.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatement.html index 3e27942e55da..c9f82778381d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatement.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatement.html @@ -1,6 +1,6 @@ -This inspection reports switch statements. +Reports switch statements. switch statements are often (but not always) indicators of poor object-oriented design.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatementDensity.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatementDensity.html index 277d88b5872a..dc3a4a2b1127 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatementDensity.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatementDensity.html @@ -1,6 +1,6 @@ -This inspection reports switch statements +Reports switch statements with too low a ratio of switch labels to executable statements. Such switch statements may be confusing, and should probably be refactored. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatementWithConfusingDeclaration.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatementWithConfusingDeclaration.html index 7abe1f58622a..bbc2cfd52ea0 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatementWithConfusingDeclaration.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatementWithConfusingDeclaration.html @@ -1,6 +1,6 @@ -This inspection reports local variables declared in one branch of a switch statement +Reports local variables declared in one branch of a switch statement and used in a different branch. Such declarations can be extremely confusing.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatementWithTooFewBranches.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatementWithTooFewBranches.html index 9cc83ebd5cd9..fcbd8e712f03 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatementWithTooFewBranches.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatementWithTooFewBranches.html @@ -1,6 +1,6 @@ -This inspection reports switch statements with too few case labels. +Reports switch statements with too few case labels. Such statements may be more clearly expressed as if statements.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatementWithTooManyBranches.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatementWithTooManyBranches.html index c14d989099ab..0ceee7b6fd87 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatementWithTooManyBranches.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatementWithTooManyBranches.html @@ -1,6 +1,6 @@ -This inspection reports switch statements with too many case labels. +Reports switch statements with too many case labels.

      Use the field provided below to specify the maximum number of case labels expected. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatementsWithoutDefault.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatementsWithoutDefault.html index b72457267a5e..f2fca679edb3 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatementsWithoutDefault.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SwitchStatementsWithoutDefault.html @@ -1,6 +1,6 @@ -This inspection reports switch statements that do not contain +Reports switch statements that do not contain default labels.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizationOnLocalVariableOrMethodParameter.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizationOnLocalVariableOrMethodParameter.html index ce5d0917e6f4..2f2293d0e3d1 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizationOnLocalVariableOrMethodParameter.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizationOnLocalVariableOrMethodParameter.html @@ -1,6 +1,6 @@ -This inspection reports synchronization on a local variable or parameter. Such +Reports synchronization on a local variable or parameter. Such synchronization has little effect, since different threads usually will have different values for the local variable or parameter. The intent of the code will usually be clearer if synchronization on a field is used. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizationOnStaticField.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizationOnStaticField.html index e900fb788244..54eb79329de3 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizationOnStaticField.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizationOnStaticField.html @@ -1,6 +1,6 @@ -This inspection reports synchronization on static fields. While not strictly incorrect, +Reports synchronization on static fields. While not strictly incorrect, synchronization on static fields can lead to bad performance because of contention.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizeOnLock.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizeOnLock.html index 38460cea82f7..da66174171b3 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizeOnLock.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizeOnLock.html @@ -1,6 +1,6 @@ -This inspection reports any synchronized +Reports any synchronized block which locks on an instance of java.util.concurrent.locks.Lock. Such synchronization is almost certainly inadvertent, and appropriate versions of .lock() and .unlock() should be used instead. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizeOnNonFinalField.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizeOnNonFinalField.html index 14b803f42b11..c9afbafc4731 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizeOnNonFinalField.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizeOnNonFinalField.html @@ -1,6 +1,6 @@ -This inspection reports synchronized statements where the lock expression +Reports synchronized statements where the lock expression is a reference to a non-final field. Such statements are unlikely to have useful semantics, as different threads may be locking on different objects even when operating on the same object. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizeOnThis.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizeOnThis.html index 045752aa4d61..155d75d3e3ea 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizeOnThis.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizeOnThis.html @@ -1,6 +1,6 @@ -This inspection reports synchronization which use this as their lock +Reports synchronization which use this as their lock expression. Constructs reported include synchronized blocks which lock this, and calls to wait(), notify() or notifyAll() which target wait(). diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizedMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizedMethod.html index bd3f1b107813..201649475d6c 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizedMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizedMethod.html @@ -1,6 +1,6 @@ -This inspection reports any use of the synchronized modifier on methods. Some coding standards +Reports any use of the synchronized modifier on methods. Some coding standards prohibit the use of the synchronized modifier, in favor of synchronized statements.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizedOnLiteralObject.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizedOnLiteralObject.html index 05819e11701e..cedf2b45b1ae 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizedOnLiteralObject.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SynchronizedOnLiteralObject.html @@ -1,6 +1,6 @@ -This inspection reports any synchronized +Reports any synchronized block which locks on an object which is initialized with a literal. String literals are interned and Character, Boolean and Number literals can be allocated from a cache. Because of this, it is possible that some other part of the system diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SystemExit.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SystemExit.html index cf699cbf431c..2e78ff6fb120 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SystemExit.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SystemExit.html @@ -1,6 +1,6 @@ -This inspection reports the calls to System.exit(), +Reports the calls to System.exit(), Runtime.exit(), or Runtime.halt(). Calls to these methods make the calling code unportable to most application servers. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SystemGC.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SystemGC.html index 02e14addcc01..11f41d0287a4 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SystemGC.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SystemGC.html @@ -1,6 +1,6 @@ -This inspection reports any call of System.gc() or Runtime.gc(). +Reports any call of System.gc() or Runtime.gc(). While occasionally useful in testing, explicitly triggering garbage collection via System.gc() is almost always a bad idea in production code, and can result in serious performance problems. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SystemGetenv.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SystemGetenv.html index b04007533c7b..c06e4b3c7d94 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SystemGetenv.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SystemGetenv.html @@ -1,6 +1,6 @@ -This inspection reports the calls to System.getenv(). +Reports the calls to System.getenv(). Calls to System.getenv() are inherently unportable.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SystemOutErr.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SystemOutErr.html index 706854f9c1ab..5d0e7fa9e1ee 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SystemOutErr.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SystemOutErr.html @@ -1,6 +1,6 @@ -This inspection reports any uses of System.out or System.err. +Reports any uses of System.out or System.err. These are often temporary debugging statements, and should probably be either removed from production code, or replaced by a more robust logging facility. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SystemProperties.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SystemProperties.html index 6e2e02a39176..27ee4b68adf8 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SystemProperties.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SystemProperties.html @@ -1,6 +1,6 @@ -This inspection reports any accesses of the System properties. While accessing the +Reports any accesses of the System properties. While accessing the System properties is not a security risk in it self, it is often found in malicious code. Accesses to System properties should be closely examined in any security audit. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SystemRunFinalizersOnExit.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SystemRunFinalizersOnExit.html index 97c8ec68144c..c8501fef5640 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SystemRunFinalizersOnExit.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SystemRunFinalizersOnExit.html @@ -1,6 +1,6 @@ -This inspection reports any calls to System.runFinalizersOnExit(). +Reports any calls to System.runFinalizersOnExit(). This call is one of the most dangerous in the Java language. It is inherently non-thread-safe, may result in data corruption, deadlock, and may effect parts of the program far removed from its call point. It is deprecated, and its use strongly discouraged. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SystemSetSecurityManager.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SystemSetSecurityManager.html index d4a0c26ab913..8bd05c1280e6 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/SystemSetSecurityManager.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SystemSetSecurityManager.html @@ -1,6 +1,6 @@ -This inspection reports any calls to System.setSecurityManager(). +Reports any calls to System.setSecurityManager(). While often benign, any call to System.setSecurityManager() should be closely examined in any security audit.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TailRecursion.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TailRecursion.html index 4a737f1b88bc..d3bac93bc12d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TailRecursion.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TailRecursion.html @@ -1,6 +1,6 @@ -This inspection reports tail recursion, that is when a method calls itself +Reports tail recursion, that is when a method calls itself as its last action before returning. Tail recursion can always be replaced by looping, which will be considerably faster. Some JVMs perform this optimization, while others do not. Thus, tail recursive solutions may have considerably different performance characteristics on different virtual machines. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TeardownCallsSuperTeardown.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TeardownCallsSuperTeardown.html index d5f48f3936ce..c4768af68f8b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TeardownCallsSuperTeardown.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TeardownCallsSuperTeardown.html @@ -1,6 +1,6 @@ -This inspection reports JUnit classes whose tearDown() method +Reports JUnit classes whose tearDown() method does not call super.tearDown().

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TeardownIsPublicVoidNoArg.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TeardownIsPublicVoidNoArg.html index 0f1cfd47076c..a1664d9bf0fa 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TeardownIsPublicVoidNoArg.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TeardownIsPublicVoidNoArg.html @@ -1,6 +1,6 @@ -This inspection reports JUnit classes whose tearDown() method +Reports JUnit classes whose tearDown() method is not declared public, does not return void, or takes arguments. Such tearDown() methods are easy to create inadvertently, diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TestCaseInProductCode.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TestCaseInProductCode.html index 063aef3522d1..9731f4cfc53e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TestCaseInProductCode.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TestCaseInProductCode.html @@ -1,6 +1,6 @@ -This inspection reports JUnit test cases in product source trees. +Reports JUnit test cases in product source trees. This most likely indicates programmer error, and can result in test code being shipped into production. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TestCaseWithConstructor.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TestCaseWithConstructor.html index 10d0de30eb35..fb507d739271 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TestCaseWithConstructor.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TestCaseWithConstructor.html @@ -1,6 +1,6 @@ -This inspection reports on JUnit test cases with initialization logic in their constructors. Initialization +Reports on JUnit test cases with initialization logic in their constructors. Initialization of JUnit test cases should be done in setUp() methods instead.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TestCaseWithNoTestMethods.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TestCaseWithNoTestMethods.html index ce6f0b32f7f2..2387aaa426c0 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TestCaseWithNoTestMethods.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TestCaseWithNoTestMethods.html @@ -1,6 +1,6 @@ -This inspection reports non-abstract JUnit test cases which do not +Reports non-abstract JUnit test cases which do not contain any test methods. Such test cases usually indicate developer error.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TestMethodInProductCode.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TestMethodInProductCode.html index 99d6349b085d..f63c7e9a2b34 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TestMethodInProductCode.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TestMethodInProductCode.html @@ -1,6 +1,6 @@ -This inspection reports JUnit 4.0 @Test methods in product source trees. +Reports JUnit 4.0 @Test methods in product source trees. This most likely indicates programmer error, and can result in test code being shipped into production. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TestMethodIsPublicVoidNoArg.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TestMethodIsPublicVoidNoArg.html index 08e9c44761ae..137eb6ca75ab 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TestMethodIsPublicVoidNoArg.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TestMethodIsPublicVoidNoArg.html @@ -1,6 +1,6 @@ -This inspection reports any JUnit test methods whose names which are not declared +Reports any JUnit test methods whose names which are not declared public, do not return void, or take arguments. Such test methods are easy to create inadvertently, but will not be executed by diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TestMethodWithoutAssertion.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TestMethodWithoutAssertion.html index 34f56927ee49..f99a055673a1 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TestMethodWithoutAssertion.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TestMethodWithoutAssertion.html @@ -1,6 +1,6 @@ -This inspection reports any test methods of JUnit test case classes which do not contain +Reports any test methods of JUnit test case classes which do not contain any assertions. Such methods indicate either incomplete or weak test cases. The table below can be used to specify which class name, method name regular expression combinations qualify as assertions. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TextLabelInSwitchStatement.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TextLabelInSwitchStatement.html index b24219f71504..e7e8188b3203 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TextLabelInSwitchStatement.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TextLabelInSwitchStatement.html @@ -1,6 +1,6 @@ -This inspection reports labelled statements inside of switch statements. +Reports labelled statements inside of switch statements. While occasionally intended, this construction is often the result of a typo.

           switch(x)
      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ThisEscapedInConstructor.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ThisEscapedInConstructor.html
      index 3ed3ec28e496..4598e74acfc0 100644
      --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ThisEscapedInConstructor.html
      +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ThisEscapedInConstructor.html
      @@ -1,6 +1,6 @@
       
       
      -This inspection reports possible escapes of this
      +Reports possible escapes of this
       during object construction. Escapes occur when this
       is used as a method argument or the object of an assignment in a constructor or
       initializer. Such escapes may result in subtle bugs, as the object is now
      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadDeathRethrown.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadDeathRethrown.html
      index 6c86eaccf6f1..e970d7cab10a 100644
      --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadDeathRethrown.html
      +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadDeathRethrown.html
      @@ -1,6 +1,6 @@
       
       
      -This inspection reports try statements which catch
      +Reports try statements which catch
       java.lang.ThreadDeath which do not rethrow the exception.
       
       

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadDumpStack.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadDumpStack.html index 991ea1e90333..dda114673e05 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadDumpStack.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadDumpStack.html @@ -1,6 +1,6 @@ -This inspection reports any uses Thread.dumpStack(). +Reports any uses Thread.dumpStack(). These are often temporary debugging statements, and should probably be either removed from production code, or replaced by a more robust logging facility. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadPriority.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadPriority.html index 28f7897722f7..1684bf22d7f4 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadPriority.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadPriority.html @@ -1,6 +1,6 @@ -This inspection reports any calls to Thread.setPriority(). +Reports any calls to Thread.setPriority(). Modifying priorities of threads is an inherently non-portable operation, as no guarantees are given in the Java specification of how priorities are used in scheduling threads, or even if they are used at all. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadRun.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadRun.html index f32f56e74569..d499f047a449 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadRun.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadRun.html @@ -1,6 +1,6 @@ -This inspection reports any calls to run() on java.lang.Thread or any of its subclasses. +Reports any calls to run() on java.lang.Thread or any of its subclasses. While occasionally intended, this is usually a mistake, with start() intended instead.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadStartInConstruction.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadStartInConstruction.html index 5945b01b8ad9..2938c76da4cf 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadStartInConstruction.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadStartInConstruction.html @@ -1,6 +1,6 @@ -This inspection reports any calls to start() on java.lang.Thread +Reports any calls to start() on java.lang.Thread or any of its subclasses during object construction. While occasionally useful, this construct should be avoided due to inheritance issues. Subclasses of a class which launches a thread during object construction will not have finished any initialization logic of their own before the thread has launched. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadStopSuspendResume.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadStopSuspendResume.html index 573ab22b46f3..6c15a884856d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadStopSuspendResume.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadStopSuspendResume.html @@ -1,6 +1,6 @@ -This inspection reports any calls to Thread.stop(), +Reports any calls to Thread.stop(), Thread.suspend(), or Thread.resume(). These calls are inherently prone to data corruption and deadlock, and their use is strongly discouraged. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadWithDefaultRunMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadWithDefaultRunMethod.html index 038bd8e98e69..b6f719ac8c84 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadWithDefaultRunMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadWithDefaultRunMethod.html @@ -1,6 +1,6 @@ -This inspection reports Thread instances being created without specifying +Reports Thread instances being created without specifying a Runnable parameter or overriding the run() method. Such threads do nothing useful. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadYield.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadYield.html index a949f32ff4da..2d37629b0ea6 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadYield.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ThreadYield.html @@ -1,6 +1,6 @@ -This inspection reports any calls to Thread.yield(). +Reports any calls to Thread.yield(). Thread.yield() has no useful guaranteed semantics, and is often used by inexperienced programmers to mask race conditions. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ThreeNegationsPerMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ThreeNegationsPerMethod.html index 9a3e7ee280bd..2bcdceda4cdc 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ThreeNegationsPerMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ThreeNegationsPerMethod.html @@ -1,6 +1,6 @@ -This inspection reports methods with three or more negation operations (! or !=). +Reports methods with three or more negation operations (! or !=). Such methods may be unnecessarily confusing.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowCaughtLocally.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowCaughtLocally.html index b3ef4bed1d4b..fd79e47ebcd9 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowCaughtLocally.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowCaughtLocally.html @@ -1,6 +1,6 @@ -This inspection reports throw statements whose exceptions are always +Reports throw statements whose exceptions are always caught by containing try statements. Using throw statements as a "goto" to change the local flow of control is both confusing and likely to have poor performance. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowFromFinallyBlock.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowFromFinallyBlock.html index 85692daf4b99..56083234dbc1 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowFromFinallyBlock.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowFromFinallyBlock.html @@ -1,6 +1,6 @@ -This inspection reports throw statements inside of finally +Reports throw statements inside of finally blocks. While occasionally intended, such throw statements may mask exceptions thrown, and tremendously complicate debugging. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowableInstanceNeverThrown.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowableInstanceNeverThrown.html index b9aa1e7901af..63f65d9532ff 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowableInstanceNeverThrown.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowableInstanceNeverThrown.html @@ -1,6 +1,6 @@ -This inspection reports Throwable +Reports Throwable instantiation, where the created Throwable is never actually thrown. Most often this is the result of a simple mistake. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowablePrintStackTrace.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowablePrintStackTrace.html index a9ab15769727..4a60995c55c3 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowablePrintStackTrace.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowablePrintStackTrace.html @@ -1,6 +1,6 @@ -This inspection reports any uses Throwable.printStackTrace() without arguments. +Reports any uses Throwable.printStackTrace() without arguments. These are often temporary debugging statements, and should probably be either removed from production code, or replaced by a more robust logging facility. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowableResultOfMethodCallIgnored.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowableResultOfMethodCallIgnored.html index c5a44ce50f07..c29d801b3bf6 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowableResultOfMethodCallIgnored.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowableResultOfMethodCallIgnored.html @@ -1,6 +1,6 @@ -This inspection reports calls to specific methods where the result of +Reports calls to specific methods where the result of the call is ignored and which return an object of type (or subtype of) Throwable. Usually these types of methods are meant as factory methods for exceptions and the result should be thrown. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ThrownExceptionsPerMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ThrownExceptionsPerMethod.html index 6cb190314d65..4a1d6db3543e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ThrownExceptionsPerMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ThrownExceptionsPerMethod.html @@ -1,6 +1,6 @@ -This inspection reports methods that are declared as throwing too many +Reports methods that are declared as throwing too many different types of exceptions. Methods with too many exceptions declared are a good sign that your error handling code is getting overly complex. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowsRuntimeException.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowsRuntimeException.html index a25b600e91ff..eb857bcf1f56 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowsRuntimeException.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ThrowsRuntimeException.html @@ -1,6 +1,6 @@ -This inspection reports declarations of unchecked exceptions (RuntimeException and its subclasses) in the throws clause of a method. +Reports declarations of unchecked exceptions (RuntimeException and its subclasses) in the throws clause of a method. Declaration of unchecked exceptions are not required and may be removed or moved to a Javadoc @throws tag.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TimeToString.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TimeToString.html index da7ada1317de..3e5cc2735c9d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TimeToString.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TimeToString.html @@ -1,6 +1,6 @@ -This inspection reports any call of toString() on java.sql.Time objects. Such calls are usually +Reports any call of toString() on java.sql.Time objects. Such calls are usually incorrect in an internationalized environment.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ToArrayCallWithZeroLengthArrayArgument.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ToArrayCallWithZeroLengthArrayArgument.html index 2bc010028e50..632ac661fc81 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ToArrayCallWithZeroLengthArrayArgument.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ToArrayCallWithZeroLengthArrayArgument.html @@ -1,6 +1,6 @@ -This inspection reports any call to toArray() +Reports any call to toArray() on an object of type or subtype java.util.Collection with a zero-length array argument. When passing in an array of too small size, the toArray() method has to construct a new array of diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TodoComment.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TodoComment.html index 0bd6e18b4dae..9db3ffeee114 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TodoComment.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TodoComment.html @@ -1,6 +1,6 @@ -This inspection reports "TODO" comments in your code. Format of +Reports "TODO" comments in your code. Format of "TODO" comments is configurable via the Settings | TODO panel. Since IDEA already provides syntax highlighting for "TODO" comments, it is expected that this will largely be used in batch mode. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TooBroadCatch.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TooBroadCatch.html index 36f297e70284..ffbe0df3e902 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TooBroadCatch.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TooBroadCatch.html @@ -1,6 +1,6 @@ -This inspection reports catch blocks which have parameters which are more generic than the +Reports catch blocks which have parameters which are more generic than the exceptions thrown by the corresponding try block.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TooBroadScope.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TooBroadScope.html index afba3f269bc2..d8f371a266c4 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TooBroadScope.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TooBroadScope.html @@ -1,6 +1,6 @@ -This inspection reports any variable declarations of which the scope can be narrowed. Especially +Reports any variable declarations of which the scope can be narrowed. Especially useful for "Pascal style" declarations at the start of a method, but variables with too broad a scope are also often left over after refactorings. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TooBroadThrows.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TooBroadThrows.html index e840389a0541..e48d2f2afff7 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TooBroadThrows.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TooBroadThrows.html @@ -1,6 +1,6 @@ -This inspection reports throws clauses which contain exceptions which are more generic than the +Reports throws clauses which contain exceptions which are more generic than the exceptions actually thrown by the method.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TransientFieldInNonSerializableClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TransientFieldInNonSerializableClass.html index 3da13577232e..b11cb80315c7 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TransientFieldInNonSerializableClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TransientFieldInNonSerializableClass.html @@ -1,6 +1,6 @@ -This inspection reports transient fields in non-Serializable classes. +Reports transient fields in non-Serializable classes.

      Powered by InspectionGadgets diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TransientFieldNotInitialized.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TransientFieldNotInitialized.html index 4f11ed9057b0..d974b33e8e65 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TransientFieldNotInitialized.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TransientFieldNotInitialized.html @@ -1,6 +1,6 @@ -This inspection reports transient fields which +Reports transient fields which are initialized during normal object construction, but whose class does not have a readObject method. Because transient fields are not serialized they need diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TrivialIf.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TrivialIf.html index 28a8dcb2f88e..24161e248be3 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TrivialIf.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TrivialIf.html @@ -1,6 +1,6 @@ -This inspection reports if statements which can be simplified to single assignment or +Reports if statements which can be simplified to single assignment or return statements.

      For example: diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TrivialStringConcatenation.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TrivialStringConcatenation.html index cafc4c79ead8..31e38d790a38 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TrivialStringConcatenation.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TrivialStringConcatenation.html @@ -1,6 +1,6 @@ -This inspection reports string concatenations where one of the arguments is the +Reports string concatenations where one of the arguments is the empty string. Such a concatenation is unnecessary and inefficient, particularly when used as an idiom for formatting non-String objects or primitives into Strings. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TryFinallyCanBeTryWithResources.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TryFinallyCanBeTryWithResources.html index 09a61fc3e264..22533392f259 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TryFinallyCanBeTryWithResources.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TryFinallyCanBeTryWithResources.html @@ -1,6 +1,6 @@ -This inspection reports try finally statements which can use Java 7 +Reports try finally statements which can use Java 7 Automatic Resource Management. A quickfix is provided to convert the try finally statement into a try with resources statement.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TryWithIdenticalCatches.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TryWithIdenticalCatches.html index 1af3727458ed..79143fd4e68f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TryWithIdenticalCatches.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TryWithIdenticalCatches.html @@ -1,6 +1,6 @@ -This inspection reports identical catch sections in try blocks under JDK 7. A quickfix is provided to collapse the sections into +Reports identical catch sections in try blocks under JDK 7. A quickfix is provided to collapse the sections into a multi-catch section.

      This inspection only reports if the project or module is configured to use a diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TypeMayBeWeakened.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TypeMayBeWeakened.html index b1432d192d54..abda9d4a685f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TypeMayBeWeakened.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TypeMayBeWeakened.html @@ -1,6 +1,6 @@ -This inspection reports any variables which may be declared with a weaker type. For instance, +Reports any variables which may be declared with a weaker type. For instance, a variable may be of type ArrayList, and only the method isEmpty() is called on it. In this case the type List would do just as well. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TypeParameterExtendsFinalClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TypeParameterExtendsFinalClass.html index 33ce8fc8f4f0..3716bd200f06 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TypeParameterExtendsFinalClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TypeParameterExtendsFinalClass.html @@ -1,6 +1,6 @@ -This inspection reports any type parameters declared to extend a final class. Since +Reports any type parameters declared to extend a final class. Since final classes cannot be extended, the type parameter could be replaced with the type of the specified final class. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TypeParameterExtendsObject.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TypeParameterExtendsObject.html index 331cc6e30a78..eb3b822741b3 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TypeParameterExtendsObject.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TypeParameterExtendsObject.html @@ -1,6 +1,6 @@ -This inspection reports any type parameters explicitly declared to extend java.lang.Object. +Reports any type parameters explicitly declared to extend java.lang.Object.

      Powered by InspectionGadgets diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TypeParameterHidesVisibleType.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TypeParameterHidesVisibleType.html index eee84bde3165..6bfc1087c914 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TypeParameterHidesVisibleType.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TypeParameterHidesVisibleType.html @@ -1,6 +1,6 @@ -This inspection reports type parameters being named +Reports type parameters being named identically to visible types in the current scope. Such a parameter name may be confusing.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/TypeParameterNamingConvention.html b/plugins/InspectionGadgets/src/inspectionDescriptions/TypeParameterNamingConvention.html index b62686856a63..be4665aa3ba9 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/TypeParameterNamingConvention.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/TypeParameterNamingConvention.html @@ -1,6 +1,6 @@ -This inspection reports type parameters whose names are either too short, too long, or do not follow +Reports type parameters whose names are either too short, too long, or do not follow the specified regular expression pattern.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnaryPlus.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnaryPlus.html index ab80c36d2d45..9425d5052fd0 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnaryPlus.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnaryPlus.html @@ -1,6 +1,6 @@ -This inspection reports any uses of the unary '+' operator. Unary plus is a null operation, and +Reports any uses of the unary '+' operator. Unary plus is a null operation, and its presence may represent a coding error, particularly in combination with the increment operator, '++'.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UncheckedExceptionClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UncheckedExceptionClass.html index 948575118ee7..ef33d8ff1193 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UncheckedExceptionClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UncheckedExceptionClass.html @@ -1,6 +1,6 @@ -This inspection reports unchecked exception classes (i.e. subclasses of RuntimeException). +Reports unchecked exception classes (i.e. subclasses of RuntimeException). Certain coding standards require that all user-defined exception classes be checked.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnclearBinaryExpression.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnclearBinaryExpression.html index c5187cca8826..17ace8371327 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnclearBinaryExpression.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnclearBinaryExpression.html @@ -1,6 +1,6 @@ -This inspection reports binary, conditional or instanceof expressions consisting of multiple terms with different operators +Reports binary, conditional or instanceof expressions consisting of multiple terms with different operators without parentheses. Such expressions can be unclear because not every developer is intimately familiar with all the precedence rules of the different operators. This inspection has a quickfix which adds clarifying parentheses. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnconditionalWait.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnconditionalWait.html index f6256660a488..6bfd8e63bcbf 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnconditionalWait.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnconditionalWait.html @@ -1,6 +1,6 @@ -This inspection reports .wait() +Reports .wait() being called unconditionally within a synchronized context. Normally, .wait() is used to block a thread until some condition is true. If .wait() diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnconstructableTestCase.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnconstructableTestCase.html index 1b03e626285c..037bff559b7f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnconstructableTestCase.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnconstructableTestCase.html @@ -1,6 +1,6 @@ -This inspection reports non-abstract JUnit test cases which do not +Reports non-abstract JUnit test cases which do not expose a public no-arg constructor or a public constructor which takes a single string as an argument. Such test cases will be unrunnable by most JUnit test runners, including IDEA's. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarilyQualifiedInnerClassAccess.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarilyQualifiedInnerClassAccess.html index cb3fc83052b3..8e514dbd4d23 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarilyQualifiedInnerClassAccess.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarilyQualifiedInnerClassAccess.html @@ -1,6 +1,6 @@ -This inspection reports any references to inner classes which are unnecessarily qualified with the name +Reports any references to inner classes which are unnecessarily qualified with the name of the enclosing class. Such qualification is unnecessary, and may be safely removed. This may require the addition of an import for the inner class. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarilyQualifiedStaticUsage.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarilyQualifiedStaticUsage.html index d98a34bd3f78..680c2439f7f7 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarilyQualifiedStaticUsage.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarilyQualifiedStaticUsage.html @@ -1,6 +1,6 @@ -This inspection reports calls to static methods or accesses of static fields +Reports calls to static methods or accesses of static fields on the current class which are qualified with the class name. Such qualification is unnecessary, and may be safely removed. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarilyQualifiedStaticallyImportedElement.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarilyQualifiedStaticallyImportedElement.html index 0dc768bc3878..4d508ae84386 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarilyQualifiedStaticallyImportedElement.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarilyQualifiedStaticallyImportedElement.html @@ -1,6 +1,6 @@ -This inspection reports any references to static members which are statically imported and also qualified with +Reports any references to static members which are statically imported and also qualified with their containing class name. Because the elements are already statically imported such qualification is unnecessary and can be removed. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryBlockStatement.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryBlockStatement.html index 1eb2f2f6e582..ffb45145c491 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryBlockStatement.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryBlockStatement.html @@ -1,6 +1,6 @@ -This inspection reports code blocks which are unnecessary to the semantics of the program, and can +Reports code blocks which are unnecessary to the semantics of the program, and can be replaced by their contents. Code blocks which are the bodies of if, do, while or for statements will not be reported by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryBoxing.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryBoxing.html index bbfa5f157d48..68d7fa543e40 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryBoxing.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryBoxing.html @@ -1,6 +1,6 @@ -This inspection reports "boxing", e.g. wrapping of primitive values in objects. +Reports "boxing", e.g. wrapping of primitive values in objects. Boxing is unnecessary under Java 5 and newer, and can be safely removed.

      This inspection only reports if the project or module is configured to use a diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryCallToStringValueOf.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryCallToStringValueOf.html index c31d5c548b0d..3d95b3ac2f14 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryCallToStringValueOf.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryCallToStringValueOf.html @@ -1,6 +1,6 @@ -This inspection reports on any calls to String.valueOf() +Reports on any calls to String.valueOf() used in string concatenations. The conversion to string is handled automatically by the compiler without a call to String.valueOf(), making it unnecessary. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryConditionalExpression.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryConditionalExpression.html index b2dfaca4f705..ae9cea2cbe93 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryConditionalExpression.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryConditionalExpression.html @@ -1,6 +1,6 @@ -This inspection reports conditional expressions of the form +Reports conditional expressions of the form condition?true:false or condition?false:true. These expressions may be safely simplified to condition or !condition, respectively. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryConstantArrayCreationExpression.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryConstantArrayCreationExpression.html index 0cd642ec5a6c..965c15673ca7 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryConstantArrayCreationExpression.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryConstantArrayCreationExpression.html @@ -1,6 +1,6 @@ -This inspection reports any constant new array expression which can be replaced +Reports any constant new array expression which can be replaced with an array initializer. Array initializers omit the type declaration because that is already specified by the declaration of the variable the expression is assigned to. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryConstructor.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryConstructor.html index f0730702a750..01a79e4514b3 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryConstructor.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryConstructor.html @@ -1,6 +1,6 @@ -This inspection reports unnecessary empty constructors without parameters with the same +Reports unnecessary empty constructors without parameters with the same access modifiers as their containing class. If such a constructor is the only constructor for a class and performs no initialization, it can be safely removed. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryContinue.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryContinue.html index 7390e671e90a..91b16f2a1f84 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryContinue.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryContinue.html @@ -1,6 +1,6 @@ -This inspection reports on any unnecessary continue statements at the end of loops. +Reports on any unnecessary continue statements at the end of loops. These may be safely removed.

      At present, this inspection is disabled in JSP files. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryDefault.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryDefault.html index 8729e528d1da..a721c95f9224 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryDefault.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryDefault.html @@ -1,6 +1,6 @@ -This inspection reports switch statements with +Reports switch statements with default branches which can never be taken. At present, such branches are only marked for switch statements over enumerated types all of whose values have corresponding case branches. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryEnumModifier.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryEnumModifier.html index dd5d87692452..fa804fde4e61 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryEnumModifier.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryEnumModifier.html @@ -1,6 +1,6 @@ -This inspection reports on any redundant modifiers on enumerated classes or components of +Reports on any redundant modifiers on enumerated classes or components of enumerated classes.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryExplicitNumericCast.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryExplicitNumericCast.html index 3a982e7833e8..9a7756bec6a1 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryExplicitNumericCast.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryExplicitNumericCast.html @@ -1,6 +1,6 @@ -This inspection reports any primitive numeric casts which would otherwise be inserted +Reports any primitive numeric casts which would otherwise be inserted implicitly by the compiler.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryFinalOnLocalVariableOrParameter.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryFinalOnLocalVariableOrParameter.html index 63ede42070cc..98769f438831 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryFinalOnLocalVariableOrParameter.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryFinalOnLocalVariableOrParameter.html @@ -1,6 +1,6 @@ -This inspection reports local variables or parameters unnecessarily declared final. +Reports local variables or parameters unnecessarily declared final. Some coding standards frown on variables declared final, for reasons of terseness.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryFullyQualifiedName.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryFullyQualifiedName.html index 74325ad91611..a0a58654e84e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryFullyQualifiedName.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryFullyQualifiedName.html @@ -1,6 +1,6 @@ -This inspection reports on fully qualified class names which can be shortened. The quick fix for this +Reports on fully qualified class names which can be shortened. The quick fix for this inspection will shorten the fully qualified names, adding import statements as necessary.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryInheritDoc.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryInheritDoc.html index 6e0cf9a29e2d..ec29484e1b6d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryInheritDoc.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryInheritDoc.html @@ -1,6 +1,6 @@ -This inspection reports any Javadoc comments which contain only the +Reports any Javadoc comments which contain only the {@inheritDoc} tag. Since Javadoc copies the super class' comment if no comment is present, a comment containing only an {@inheritDoc} diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryInterfaceModifier.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryInterfaceModifier.html index 3e9597c94b79..97fc1141f71a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryInterfaceModifier.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryInterfaceModifier.html @@ -1,6 +1,6 @@ -This inspection reports any redundant modifiers on interfaces or interface components. +Reports any redundant modifiers on interfaces or interface components.

      Powered by InspectionGadgets diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryJavaDocLink.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryJavaDocLink.html index 300766b02523..0cc0ef287aab 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryJavaDocLink.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryJavaDocLink.html @@ -1,6 +1,6 @@ -This inspection reports any Javadoc @see, +Reports any Javadoc @see, {@link} and {@linkplain} tags which reference the method owning the comment, the super method of the method owning the comment or the class containing the comment. Such links are diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryLabelOnBreakStatement.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryLabelOnBreakStatement.html index 4efb7471702e..14c4252d7a73 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryLabelOnBreakStatement.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryLabelOnBreakStatement.html @@ -1,6 +1,6 @@ -This inspection reports break statements with unnecessary +Reports break statements with unnecessary labels.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryLabelOnContinueStatement.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryLabelOnContinueStatement.html index 873ba23dc40a..ab14fcf22236 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryLabelOnContinueStatement.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryLabelOnContinueStatement.html @@ -1,6 +1,6 @@ -This inspection reports continue statements with unnecessary +Reports continue statements with unnecessary labels.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryLocalVariable.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryLocalVariable.html index cfa7deb84430..0a73b6644436 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryLocalVariable.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryLocalVariable.html @@ -1,6 +1,6 @@ -This inspection reports unnecessary local variables, which add +Reports unnecessary local variables, which add nothing to the comprehensibility of a method. Variables caught include local variables which are immediately returned, local variables that are immediately assigned to another variable and then not used, and local variables which always have the same value as another diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryParentheses.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryParentheses.html index aa4d3ad96e2d..76e07e94d868 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryParentheses.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryParentheses.html @@ -1,6 +1,6 @@ -This inspection reports on any instance of unnecessary parentheses. Parentheses +Reports on any instance of unnecessary parentheses. Parentheses are considered unnecessary if the evaluation order of an expression remains unchanged if the parentheses are removed. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryQualifierForThis.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryQualifierForThis.html index e982a4d3f833..fa42638c0f10 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryQualifierForThis.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryQualifierForThis.html @@ -1,6 +1,6 @@ -This inspection reports on any unnecessary qualification of this in the code. +Reports on any unnecessary qualification of this in the code. Using a qualifier on this to disambiguate a code reference may easily become unnecessary via automatic refactorings, and should be deleted for clarity.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryReturn.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryReturn.html index 152899df400a..a7f8bf773764 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryReturn.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryReturn.html @@ -1,6 +1,6 @@ -This inspection reports on any unnecessary return statements at the end of constructors and methods returning +Reports on any unnecessary return statements at the end of constructors and methods returning void. These may be safely removed.

      At present, this inspection is disabled in JSP files. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarySemicolon.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarySemicolon.html index 879e9b96624e..9dc34f82fa2d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarySemicolon.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarySemicolon.html @@ -1,6 +1,6 @@ -This inspection reports on any unnecessary semicolons, whether between class members, inside block statements, or after +Reports on any unnecessary semicolons, whether between class members, inside block statements, or after class definitions. While valid Java, these semicolons are redundant, and may be removed.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarySuperConstructor.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarySuperConstructor.html index 9d4e2aab3fab..b0d85126014d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarySuperConstructor.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarySuperConstructor.html @@ -1,6 +1,6 @@ -This inspection reports any no-argument calls to a superclass +Reports any no-argument calls to a superclass constructor as the first call of a constructor. Such calls are unnecessary, and may be removed.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarySuperQualifier.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarySuperQualifier.html index a4cf972ee67c..df77d59f339d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarySuperQualifier.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessarySuperQualifier.html @@ -1,6 +1,6 @@ -This inspection reports any unnecessary uses of the super +Reports any unnecessary uses of the super qualifier in method calls and fields references. A super qualifier is unnecessary when the field or method of the super class is not overridden in the calling class. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryTemporaryOnConversionFromString.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryTemporaryOnConversionFromString.html index 0ab695ddf467..f45264588fad 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryTemporaryOnConversionFromString.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryTemporaryOnConversionFromString.html @@ -1,6 +1,6 @@ -This inspection reports unnecessary creation of temporary objects when converting +Reports unnecessary creation of temporary objects when converting from Strings to primitive types.

      For example: diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryTemporaryOnConversionToString.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryTemporaryOnConversionToString.html index af2b1331a8fc..e81c4f73b2bc 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryTemporaryOnConversionToString.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryTemporaryOnConversionToString.html @@ -1,6 +1,6 @@ -This inspection reports unnecessary creation of temporary objects when converting +Reports unnecessary creation of temporary objects when converting from primitive types to Strings.

      For example: diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryThis.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryThis.html index edba3d48f9ff..43c4cabafdc1 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryThis.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryThis.html @@ -1,6 +1,6 @@ -This inspection reports on any unnecessary uses of this in the code. +Reports on any unnecessary uses of this in the code. Using this to disambiguate a code reference may easily become unnecessary via automatic refactorings, and is discouraged by many coding styles. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryUnaryMinus.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryUnaryMinus.html index 0286d37e5a72..b09b0cf9e6a4 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryUnaryMinus.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryUnaryMinus.html @@ -1,6 +1,6 @@ -This inspection reports any unnecessary unary minuses. +Reports any unnecessary unary minuses.

      For example:

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryUnboxing.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryUnboxing.html
      index b98af0a7d398..c7be1852f29e 100644
      --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryUnboxing.html
      +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryUnboxing.html
      @@ -1,6 +1,6 @@
       
       
      -This inspection reports "unboxing", e.g. explicit unwrapping of wrapped primitive values.
      +Reports "unboxing", e.g. explicit unwrapping of wrapped primitive values.
       Unboxing is unnecessary under Java 5 and newer, and can be safely removed.
       

      This inspection only reports if the project or module is configured to use a diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnpredictableBigDecimalConstructorCall.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnpredictableBigDecimalConstructorCall.html index d9f3a966c724..9fa3150e9873 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnpredictableBigDecimalConstructorCall.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnpredictableBigDecimalConstructorCall.html @@ -1,6 +1,6 @@ -This inspection reports on calls to BigDecimal +Reports on calls to BigDecimal constructors which accept a double value. These constructors can have somewhat unpredictable results because many numbers cannot be represented exactly in a double. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnqualifiedFieldAccess.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnqualifiedFieldAccess.html index 164729e83515..750813d91ca5 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnqualifiedFieldAccess.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnqualifiedFieldAccess.html @@ -1,6 +1,6 @@ -This inspection reports on field accesses which are not qualified with +Reports on field accesses which are not qualified with this or some other qualifier. Some coding styles mandate that all field accesses are qualified to prevent confusion with local variable or parameter accesses. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnqualifiedInnerClassAccess.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnqualifiedInnerClassAccess.html index 86c99c69e360..fd5303b3aba7 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnqualifiedInnerClassAccess.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnqualifiedInnerClassAccess.html @@ -1,6 +1,6 @@ -This inspection reports any references to inner classes which are not qualified with the name +Reports any references to inner classes which are not qualified with the name of the enclosing class.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnqualifiedMethodAccess.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnqualifiedMethodAccess.html index 8b14d83f4705..0323cd86166d 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnqualifiedMethodAccess.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnqualifiedMethodAccess.html @@ -1,6 +1,6 @@ -This inspection reports calls to non-static methods of the same object which are not qualified with this. +Reports calls to non-static methods of the same object which are not qualified with this.

      New in 11, Powered by InspectionGadgets diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnqualifiedStaticUsage.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnqualifiedStaticUsage.html index 13e57f63fe03..9b90ca77eb52 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnqualifiedStaticUsage.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnqualifiedStaticUsage.html @@ -1,6 +1,6 @@ -This inspection reports static method calls or field accesses that are not qualified +Reports static method calls or field accesses that are not qualified with the class name of the static method. This is legal if the static method or field is in the same class as the call, but may be confusing. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnsecureRandomNumberGeneration.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnsecureRandomNumberGeneration.html index 6f8fdf35f552..bb70fe35183c 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnsecureRandomNumberGeneration.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnsecureRandomNumberGeneration.html @@ -1,6 +1,6 @@ -This inspection reports any uses of java.lang.Random or +Reports any uses of java.lang.Random or java.lang.math.Random(). In secure environments, java.secure.SecureRandom is a better choice, offering cryptographically secure random number generation. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnusedCatchParameter.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnusedCatchParameter.html index c3af86c3a805..b08ac58ac5ef 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnusedCatchParameter.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnusedCatchParameter.html @@ -1,6 +1,6 @@ -This inspection reports any catch parameters that are unused in their +Reports any catch parameters that are unused in their corresponding blocks. This inspection will not report any catch parameters named "ignore" or "ignored". Conversely this inspection will warn on any catch parameters named "ignore" or "ignored" that are actually used. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnusedImport.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnusedImport.html index 958b156eeffd..4b4d2c2b50b8 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnusedImport.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnusedImport.html @@ -1,6 +1,6 @@ -This inspection reports any import statements that are unused. Since IDEA can automatically +Reports any import statements that are unused. Since IDEA can automatically detect and fix such statements with its "Optimize Imports" command, this inspection is mostly useful for off-line reporting on code bases that you don't intend to change. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnusedLabel.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnusedLabel.html index f1a372a491cb..8913dae89bb5 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnusedLabel.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnusedLabel.html @@ -1,6 +1,6 @@ -This inspection reports unused code labels. +Reports unused code labels.

      Powered by InspectionGadgets diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UpperCaseFieldNameNotConstant.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UpperCaseFieldNameNotConstant.html index 752424cd4db5..b4cb57ee7bfb 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UpperCaseFieldNameNotConstant.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UpperCaseFieldNameNotConstant.html @@ -1,6 +1,6 @@ -This inspection reports non-static non-final +Reports non-static non-final fields whose names are all upper-case. Such fields may cause confusion by breaking a common naming convention, and are often the result of developer error. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfAWTPeerClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfAWTPeerClass.html index 591a5278d5fb..82c45135265a 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfAWTPeerClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfAWTPeerClass.html @@ -1,6 +1,6 @@ -This inspection reports any uses of concrete AWT peer classes. Such classes represent +Reports any uses of concrete AWT peer classes. Such classes represent native windowing system widgets, and will be non-portable between different windowing systems. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfAnotherObjectsPrivateField.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfAnotherObjectsPrivateField.html index afe8bff54fb4..8a6f05df216b 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfAnotherObjectsPrivateField.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfAnotherObjectsPrivateField.html @@ -1,6 +1,6 @@ -This inspection reports any uses of another object's private or protected fields. Java +Reports any uses of another object's private or protected fields. Java allows the use of such fields for objects of the same class as the current objects, but some coding styles discourage this use. Additionally, such direct access to private fields may fail in component-oriented architectures such (e.g. Spring, Hibernate) which expect all access diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfJDBCDriverClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfJDBCDriverClass.html index cf5787091e96..14fad1f78ee9 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfJDBCDriverClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfJDBCDriverClass.html @@ -1,6 +1,6 @@ -This inspection reports any uses of concrete JDBC driver classes. Use of such classes will +Reports any uses of concrete JDBC driver classes. Use of such classes will bind your project to a specific database and driver, defeating the purpose of JDBC and resulting in loss of portability. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfObsoleteAssert.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfObsoleteAssert.html index 979c2889adef..07920d30a8b6 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfObsoleteAssert.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfObsoleteAssert.html @@ -1,6 +1,6 @@ -This inspection reports any calls to methods from the junit.framework.Assert class. This class is +Reports any calls to methods from the junit.framework.Assert class. This class is obsolete and the calls can be replaced by calls to methods from the org.junit.Assert class.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfProcessBuilder.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfProcessBuilder.html index 5edf75680e77..e8d7f4a03b31 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfProcessBuilder.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfProcessBuilder.html @@ -1,6 +1,6 @@ -This inspection reports the uses of java.lang.ProcessBuilder. +Reports the uses of java.lang.ProcessBuilder. Uses of ProcessBuilder are inherently unportable between operating systems.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfPropertiesAsHashtable.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfPropertiesAsHashtable.html index 5fd9848b0a60..a51fee963ff6 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfPropertiesAsHashtable.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfPropertiesAsHashtable.html @@ -1,6 +1,6 @@ -This inspection reports any calls to the java.util.Hashtable +Reports any calls to the java.util.Hashtable methods put(), putAll() or get() on a java.util.Properties object. For reasons lost to history, Properties inherits diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfSunClasses.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfSunClasses.html index 68fc023bb80b..8e94151d3678 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfSunClasses.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UseOfSunClasses.html @@ -1,6 +1,6 @@ -This inspection reports any uses of classes from the sun.* hierarchy. +Reports any uses of classes from the sun.* hierarchy. Such classes are non-portable between different JVM's.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UtilityClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UtilityClass.html index 0db80e730d40..05adf758d5f3 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UtilityClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UtilityClass.html @@ -1,6 +1,6 @@ -This inspection reports utility classes. +Reports utility classes. Utility classes have all fields and methods declared static, and their presence may indicate a lack of object-oriented design. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UtilityClassWithPublicConstructor.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UtilityClassWithPublicConstructor.html index c42215b0e090..fdae5e1e89bc 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UtilityClassWithPublicConstructor.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UtilityClassWithPublicConstructor.html @@ -1,6 +1,6 @@ -This inspection reports utility classes with public constructors. Utility +Reports utility classes with public constructors. Utility classes have all fields and methods declared static. Giving such classes a public constructor is confusing, and may lead to the class being inadvertently instantiated. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UtilityClassWithoutPrivateConstructor.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UtilityClassWithoutPrivateConstructor.html index 012ce5634fbc..cf512805d5bd 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UtilityClassWithoutPrivateConstructor.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UtilityClassWithoutPrivateConstructor.html @@ -1,6 +1,6 @@ -This inspection reports utility classes which do not have private constructors. +Reports utility classes which do not have private constructors. Utility classes have all fields and methods declared static. Giving such classes a private constructor prevents them from being inadvertently instantiated. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/VarargParameter.html b/plugins/InspectionGadgets/src/inspectionDescriptions/VarargParameter.html index 759c57484b67..cbbbe90d0a98 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/VarargParameter.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/VarargParameter.html @@ -1,6 +1,6 @@ -This inspection reports methods taking variable numbers of parameters. +Reports methods taking variable numbers of parameters. Such methods are not supported under Java 1.4 or earlier JVMs.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/VariableNotUsedInsideIf.html b/plugins/InspectionGadgets/src/inspectionDescriptions/VariableNotUsedInsideIf.html index 4cc8c463dfd3..b3b9357a722c 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/VariableNotUsedInsideIf.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/VariableNotUsedInsideIf.html @@ -1,6 +1,6 @@ -This inspection reports any references to variables which are checked for nullity +Reports any references to variables which are checked for nullity in the condition of an if statement or conditional expression but which are not used inside the if statement. Usually this either means that diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/VolatileArrayField.html b/plugins/InspectionGadgets/src/inspectionDescriptions/VolatileArrayField.html index 338ac01fb4bb..3c96f832362e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/VolatileArrayField.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/VolatileArrayField.html @@ -1,6 +1,6 @@ -This inspection reports array fields +Reports array fields which are declared as volatile. Such fields may be confusing, as accessing the array itself follows the rules for volatile fields, but accessing the array's contents does not. If such volatile access is needed to array contents, diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/VolatileLongOrDoubleField.html b/plugins/InspectionGadgets/src/inspectionDescriptions/VolatileLongOrDoubleField.html index ff4464bbd4c2..bac61d5cb5f0 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/VolatileLongOrDoubleField.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/VolatileLongOrDoubleField.html @@ -1,6 +1,6 @@ -This inspection reports fields of type long or double +Reports fields of type long or double which are declared as volatile. While Java specifies that reads and writes from such fields are atomic, many JVM's have violated this specification. Unless you are certain of your JVM, it is better to synchronized access to such fields rather than declare them volatile. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/WaitCalledOnCondition.html b/plugins/InspectionGadgets/src/inspectionDescriptions/WaitCalledOnCondition.html index 901268c41da6..f1e1aa803429 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/WaitCalledOnCondition.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/WaitCalledOnCondition.html @@ -1,6 +1,6 @@ -This inspection reports on any call to wait() +Reports on any call to wait() made on a java.util.concurrent.locks.Condition object. This is probably a programming error, and some variant of the await() method was intended instead. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/WaitNotInLoop.html b/plugins/InspectionGadgets/src/inspectionDescriptions/WaitNotInLoop.html index 9f96d1a14b14..0bff8ad9b2ae 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/WaitNotInLoop.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/WaitNotInLoop.html @@ -1,6 +1,6 @@ -This inspection reports on any call to wait() not made inside a loop. wait() is normally +Reports on any call to wait() not made inside a loop. wait() is normally used to suspend a thread until a condition is true, and that condition should be checked after the wait() returns. A loop is the clearest way to achieve this. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/WaitNotInSynchronizedContext.html b/plugins/InspectionGadgets/src/inspectionDescriptions/WaitNotInSynchronizedContext.html index 46ef9780aeb3..121a02cdf48f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/WaitNotInSynchronizedContext.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/WaitNotInSynchronizedContext.html @@ -1,6 +1,6 @@ -This inspection reports on any call to wait() not made inside a corresponding synchronized +Reports on any call to wait() not made inside a corresponding synchronized statement or synchronized method. Calling wait() on an object without holding a lock on that object will result in an IllegalMonitorStateException being thrown. Such a construct is not necessarily an error, as the necessary lock may be acquired before diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/WaitOrAwaitWithoutTimeout.html b/plugins/InspectionGadgets/src/inspectionDescriptions/WaitOrAwaitWithoutTimeout.html index b9427961f436..fc1b095ed7a4 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/WaitOrAwaitWithoutTimeout.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/WaitOrAwaitWithoutTimeout.html @@ -1,6 +1,6 @@ -This inspection reports on any call to Object.wait() or Condition.await() which +Reports on any call to Object.wait() or Condition.await() which does not specify a timeout. Such calls may be dangerous in high-availability programs, as failures in one component may result in blockages of the waiting component, if notify()/notifyAll() diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/WaitWhileHoldingTwoLocks.html b/plugins/InspectionGadgets/src/inspectionDescriptions/WaitWhileHoldingTwoLocks.html index 8256b064cbc1..3f66c1cbbebd 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/WaitWhileHoldingTwoLocks.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/WaitWhileHoldingTwoLocks.html @@ -1,6 +1,6 @@ -This inspection reports .wait() +Reports .wait() being called while the current thread is holding two locks. Since the call to .wait() only frees locks on the its target, waiting with two locks held can easily lead to deadlock. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/WaitWithoutCorrespondingNotify.html b/plugins/InspectionGadgets/src/inspectionDescriptions/WaitWithoutCorrespondingNotify.html index def93c7f20af..998c746f25d7 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/WaitWithoutCorrespondingNotify.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/WaitWithoutCorrespondingNotify.html @@ -1,6 +1,6 @@ -This inspection reports on any call to Object.wait() +Reports on any call to Object.wait() for which no call to a corresponding Object.notify() or Object.notifyAll() can be found. Only calls which target fields of the current class are reported by this inspection. diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/WhileCanBeForeach.html b/plugins/InspectionGadgets/src/inspectionDescriptions/WhileCanBeForeach.html index f996f5e0a0bd..4bc193be7e3f 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/WhileCanBeForeach.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/WhileCanBeForeach.html @@ -1,6 +1,6 @@ -This inspection reports while loops which iterate +Reports while loops which iterate over collections, and can be replaced with the "for each" iteration syntax, which is available in Java 5 and newer.

      diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/WhileLoopSpinsOnField.html b/plugins/InspectionGadgets/src/inspectionDescriptions/WhileLoopSpinsOnField.html index 918d07712021..4821456ec59e 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/WhileLoopSpinsOnField.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/WhileLoopSpinsOnField.html @@ -1,6 +1,6 @@ -This inspection reports on while loops which spin on the +Reports on while loops which spin on the value of a non-volatile field, waiting for it to be changed by another thread. In addition to being potentially extremely CPU intensive when little work is done inside the loop, such loops are likely have different semantics than intended, as the Java Memory Model allows such field accesses diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ZeroLengthArrayInitialization.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ZeroLengthArrayInitialization.html index 9dfaa8e94b12..7506803a3aa3 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ZeroLengthArrayInitialization.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ZeroLengthArrayInitialization.html @@ -1,6 +1,6 @@ -This inspection reports on allocations of arrays with known lengths of zero. Since array lengths in +Reports on allocations of arrays with known lengths of zero. Since array lengths in Java are non-modifiable, it is almost always possible to share zero-length arrays, rather than repeatedly allocating new zero-length arrays. Such sharing may provide useful optimizations in program runtime or footprint. Note that this inspection does not report zero-length arrays allocated as static final fields, diff --git a/plugins/android/src/META-INF/plugin.xml b/plugins/android/src/META-INF/plugin.xml index 5affa71acfea..2f12617d6888 100644 --- a/plugins/android/src/META-INF/plugin.xml +++ b/plugins/android/src/META-INF/plugin.xml @@ -336,6 +336,7 @@ + diff --git a/plugins/android/src/org/jetbrains/android/formatter/AndroidCodeStyleNotificationProvider.java b/plugins/android/src/org/jetbrains/android/formatter/AndroidCodeStyleNotificationProvider.java new file mode 100644 index 000000000000..1041b2997cec --- /dev/null +++ b/plugins/android/src/org/jetbrains/android/formatter/AndroidCodeStyleNotificationProvider.java @@ -0,0 +1,105 @@ +package org.jetbrains.android.formatter; + +import com.intellij.application.options.XmlCodeStyleSettingsProvider; +import com.intellij.ide.highlighter.XmlFileType; +import com.intellij.notification.NotificationDisplayType; +import com.intellij.notification.NotificationsConfiguration; +import com.intellij.notification.impl.NotificationsConfigurationImpl; +import com.intellij.openapi.module.Module; +import com.intellij.openapi.module.ModuleUtilCore; +import com.intellij.openapi.options.ShowSettingsUtil; +import com.intellij.openapi.project.Project; +import com.intellij.openapi.util.Key; +import com.intellij.openapi.vfs.VirtualFile; +import com.intellij.psi.codeStyle.CodeStyleSettings; +import com.intellij.psi.codeStyle.CodeStyleSettingsManager; +import com.intellij.ui.EditorNotificationPanel; +import com.intellij.ui.EditorNotifications; +import org.jetbrains.android.facet.AndroidFacet; +import org.jetbrains.annotations.NonNls; +import org.jetbrains.annotations.Nullable; + +/** + * @author Eugene.Kudelevsky + */ +public class AndroidCodeStyleNotificationProvider implements EditorNotifications.Provider { + private static final Key KEY = Key.create("android.xml.code.style.notification"); + + @NonNls private static final String ANDROID_XML_CODE_STYLE_NOTIFICATION_GROUP = "Android XML code style notification"; + + private final Project myProject; + private final EditorNotifications myNotifications; + + public AndroidCodeStyleNotificationProvider(Project project, final EditorNotifications notifications) { + myProject = project; + myNotifications = notifications; + } + + @Override + public Key getKey() { + return KEY; + } + + @Nullable + @Override + public MyPanel createNotificationPanel(VirtualFile file) { + if (file.getFileType() != XmlFileType.INSTANCE) { + return null; + } + final Module module = ModuleUtilCore.findModuleForFile(file, myProject); + + if (module == null) { + return null; + } + final AndroidFacet facet = AndroidFacet.getInstance(module); + + if (facet == null) { + return null; + } + final VirtualFile parent = file.getParent(); + final VirtualFile resDir = parent != null ? parent.getParent() : null; + + if (resDir == null || !facet.getLocalResourceManager().isResourceDir(resDir)) { + return null; + } + final CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(myProject); + final AndroidXmlCodeStyleSettings androidSettings = AndroidXmlCodeStyleSettings.getInstance(settings); + + if (androidSettings.USE_CUSTOM_SETTINGS) { + return null; + } + if (NotificationsConfigurationImpl.getSettings(ANDROID_XML_CODE_STYLE_NOTIFICATION_GROUP). + getDisplayType() == NotificationDisplayType.NONE) { + return null; + } + NotificationsConfiguration.getNotificationsConfiguration().register( + ANDROID_XML_CODE_STYLE_NOTIFICATION_GROUP, NotificationDisplayType.BALLOON, false); + return new MyPanel(); + } + + public class MyPanel extends EditorNotificationPanel { + + MyPanel() { + setText("You can format your XML resources in the 'standard' Android way. " + + "Choose 'Set from... | Android' in the XML code style settings."); + + createActionLabel("Open code style settings", new Runnable() { + @Override + public void run() { + ShowSettingsUtil.getInstance().showSettingsDialog( + myProject, XmlCodeStyleSettingsProvider.CONFIGURABLE_DISPLAY_NAME); + myNotifications.updateAllNotifications(); + } + }); + + createActionLabel("Disable notification", new Runnable() { + @Override + public void run() { + NotificationsConfiguration.getNotificationsConfiguration() + .changeSettings(ANDROID_XML_CODE_STYLE_NOTIFICATION_GROUP, NotificationDisplayType.NONE, false); + myNotifications.updateAllNotifications(); + } + }); + } + } +} diff --git a/plugins/git4idea/src/git4idea/GitBranch.java b/plugins/git4idea/src/git4idea/GitBranch.java index c17cbb76a972..fd12fc936e9e 100644 --- a/plugins/git4idea/src/git4idea/GitBranch.java +++ b/plugins/git4idea/src/git4idea/GitBranch.java @@ -16,49 +16,56 @@ package git4idea; import com.intellij.openapi.diagnostic.Logger; -import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Pair; -import com.intellij.openapi.util.io.FileUtil; -import com.intellij.openapi.vcs.VcsException; -import com.intellij.openapi.vfs.VirtualFile; -import git4idea.commands.GitCommand; -import git4idea.commands.GitSimpleHandler; -import git4idea.config.GitConfigUtil; -import git4idea.history.GitHistoryUtils; -import git4idea.repo.GitRepositoryFiles; +import git4idea.repo.GitRepository; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; +import static git4idea.repo.GitRepository.*; /** - * This data class represents a Git branch + *

      Represents a Git branch, local or remote.

      + * + *

      It contains information about the branch name and the hash it points to. + * Note that the object (including the hash) is immutable. That means that if branch reference move along, you have to get new instance + * of the GitBranch object, probably from {@link GitRepository#getBranches()} or {@link git4idea.repo.GitRepository#getCurrentBranch()}. + *

      + * + *

      GitBranches are equal, if their full names are equal. That means that if two GitBranch objects have different hashes, they + * are considered equal. But in this case an error if logged, becase it means that one of this GitBranch instances is out-of-date, and + * it is required to use an {@link GitRepository#update(TrackedTopic...) updated} version.

      */ public class GitBranch extends GitReference { - @NonNls public static final String NO_BRANCH_NAME = "(no branch)"; // The name that specifies that git is on specific commit rather then on some branch ({@value}) + @NonNls public static final String REFS_HEADS_PREFIX = "refs/heads/"; // Prefix for local branches ({@value}) @NonNls public static final String REFS_REMOTES_PREFIX = "refs/remotes/"; // Prefix for remote branches ({@value}) - private final boolean myRemote; - private boolean myActive; - private static final Logger LOG = Logger.getInstance(GitBranch.class); - private final String myHash; + /** + * @deprecated All usages should be reviewed and substituted with actual GitBranch objects with Hashes retrieved from the GitRepository. + */ + @Deprecated + public static final Hash DUMMY_HASH = Hash.create(""); - public GitBranch(@NotNull String name, @NotNull String hash, boolean active, boolean remote) { + private static final Logger LOG = Logger.getInstance(GitBranch.class); + + @NotNull private final Hash myHash; + private final boolean myRemote; + + public GitBranch(@NotNull String name, @NotNull Hash hash, boolean remote) { super(name); myRemote = remote; - myActive = active; - myHash = new String(hash.trim()); + myHash = hash; } - @Deprecated - public GitBranch(@NotNull String name, boolean active, boolean remote) { - this(name, "", active, remote); + /** + *

      Returns the hash on which this branch is reference to.

      + * + *

      In certain cases (which are to be eliminated in the future) it may be empty, + * if this information wasn't supplied to the GitBranch constructor.

      + */ + @NotNull + public String getHash() { + return myHash.asString(); } /** @@ -68,13 +75,6 @@ public class GitBranch extends GitReference { return myRemote; } - /** - * @return true if the branch is active - */ - public boolean isActive() { - return myActive; - } - @NotNull public String getFullName() { return (myRemote ? REFS_REMOTES_PREFIX : REFS_HEADS_PREFIX) + myName; @@ -107,298 +107,41 @@ public class GitBranch extends GitReference { return Pair.create(remoteName, remoteBranchName); } - /** - * Get tracked remote for the branch - * - * @param project the context project - * @param root the VCS root to investigate - * @return the remote name for tracked branch, "." meaning the current repository, or null if no branch is tracked - * @throws VcsException if there is a problem with running Git - */ - @Nullable - public String getTrackedRemoteName(Project project, VirtualFile root) throws VcsException { - return GitConfigUtil.getValue(project, root, trackedRemoteKey()); - } - - /** - * Get tracked the branch - * - * @param project the context project - * @param root the VCS root to investigate - * @return the name of tracked branch - * @throws VcsException if there is a problem with running Git - */ - @Nullable - public String getTrackedBranchName(Project project, VirtualFile root) throws VcsException { - return GitConfigUtil.getValue(project, root, trackedBranchKey()); - } - - /** - * Checks if the branch exists in the repository. - * @return true if the branch exists, false otherwise. - * @deprecated use {@link git4idea.repo.GitRepository#getBranches()} - */ - public boolean exists(VirtualFile root) { - final VirtualFile remoteBranch = root.findFileByRelativePath(GitRepositoryFiles.GIT_REFS_REMOTES + "/" + myName); - if (remoteBranch != null && remoteBranch.exists()) { - return true; + @Override + public boolean equals(Object o) { + if (!super.equals(o)) { + return false; } - final VirtualFile packedRefs = root.findFileByRelativePath(GitRepositoryFiles.GIT_PACKED_REFS); - if (packedRefs != null && packedRefs.exists()) { - final byte[] contents; - try { - contents = packedRefs.contentsToByteArray(); - return new String(contents).contains(myName); - } catch (IOException e) { - LOG.info("exists ", e); - return false; - } + + // Reusing equals from super: only the name is important: + // branches are considered equal even if they point to different commits. + // But if equal branches point to different commits (or have different local/remote nature), then it is a programmer bug: + // one if GitBranch instances in the calling code is out-of-date. + // throwing assertion in that case forcing the programmer to update before comparing. + GitBranch that = (GitBranch)o; + if (!myHash.equals(that.myHash)) { + LOG.error("Branches have equal names, but different hash codes. This: " + toLogString() + ", that: " + that.toLogString()); } - return false; + else if (myRemote != that.myRemote) { + LOG.error("Branches have equal names, but different local/remote type. This: " + toLogString() + ", that: " + that.toLogString()); + } + + return true; + } + + @Override + public int hashCode() { + return super.hashCode(); + } + + @Override + public String toString() { + return super.toString(); } - /** - * Returns the hash on which this branch is reference to. - * May be empty, if this information wasn't supplied to the GitBranch constructor. - */ @NotNull - public String getHash() { - return myHash; + public String toLogString() { + return String.format("%s:%s:%s", getFullName(), getHash(), isRemote() ? "remote" : "local"); } - /** - * Get current branch from Git. - * - * @param project a project - * @param root vcs root - * @return the current branch or null if there is no current branch or if specific commit has been checked out. - * @deprecated Prefer {@link git4idea.repo.GitRepository#getCurrentBranch()} that caches the current branch value, - * and for updating reads it from disk instead of spawning a Git process. - * Note however, that {@link git4idea.repo.GitRepository#getCurrentBranch()} is updated asynchronously. - * If you need to be absolutely sure, that you've got the right value at the moment, - * call {@link git4idea.repo.GitRepository#update(git4idea.repo.GitRepository.TrackedTopic...)} before querying. - * @throws VcsException if there is a problem running git - */ - @Deprecated - @Nullable - public static GitBranch current(Project project, VirtualFile root) throws VcsException { - return list(project, root, false, false, null, null); - } - - /** - * List branches for the git root as strings. - * @deprecated Prefer {@link git4idea.repo.GitRepository#getBranches()} that caches branches, - * and for updating reads them from disk instead of spawning a Git process. - * Note however, that {@link git4idea.repo.GitRepository#getBranches()} is updated asynchronously. - * If you need to be absolutely sure, that you've got the right value at the moment, - * call {@link git4idea.repo.GitRepository#update(git4idea.repo.GitRepository.TrackedTopic...)} before querying. - * @see #list(com.intellij.openapi.project.Project, com.intellij.openapi.vfs.VirtualFile, boolean, boolean, java.util.Collection, String) - */ - @Nullable - @Deprecated - public static GitBranch listAsStrings(final Project project, final VirtualFile root, final boolean remote, final boolean local, - final Collection branches, @Nullable final String containingCommit) throws VcsException { - final Collection gitBranches = new ArrayList(); - final GitBranch result = list(project, root, local, remote, gitBranches, containingCommit); - for (GitBranch b : gitBranches) { - branches.add(b.getName()); - } - return result; - } - - /** - * List branches in the repository. Supply a Collection to this method, and it will be filled by branches. - * @deprecated Prefer {@link git4idea.repo.GitRepository#getBranches()} that caches branches, - * and for updating reads them from disk instead of spawning a Git process. - * Note however, that {@link git4idea.repo.GitRepository#getBranches()} is updated asynchronously. - * If you need to be absolutely sure, that you've got the right value at the moment, - * call {@link git4idea.repo.GitRepository#update(git4idea.repo.GitRepository.TrackedTopic...)} before querying. - * @param project the context project - * @param root the git root - * @param localWanted should local branches be collected. - * @param remoteWanted should remote branches be collected. - * @param branches the collection which will be used to store branches. - * Can be null - then the method does the same as {@link #current(com.intellij.openapi.project.Project, com.intellij.openapi.vfs.VirtualFile)} - * @param containingCommit show only branches which contain the specified commit. If null, no commit filtering is performed. - * @return current branch. May be null if no branch is active. - * @throws VcsException if there is a problem with running git - */ - @Nullable - @Deprecated - public static GitBranch list(final Project project, final VirtualFile root, final boolean localWanted, final boolean remoteWanted, - @Nullable final Collection branches, @Nullable final String containingCommit) throws VcsException { - // preparing native command executor - final GitSimpleHandler handler = new GitSimpleHandler(project, root, GitCommand.BRANCH); - handler.setNoSSH(true); - handler.setSilent(true); - handler.addParameters("--no-color"); - boolean remoteOnly = false; - if (remoteWanted && localWanted) { - handler.addParameters("-a"); - remoteOnly = false; - } else if (remoteWanted) { - handler.addParameters("-r"); - remoteOnly = true; - } - if (containingCommit != null) { - handler.addParameters("--contains", containingCommit); - } - final String output = handler.run(); - - if (output.trim().length() == 0) { - // the case after git init and before first commit - there is no branch and no output, and we'll take refs/heads/master - String head; - try { - head = FileUtil.loadFile(new File(root.getPath(), GitRepositoryFiles.GIT_HEAD), GitUtil.UTF8_ENCODING).trim(); - final String prefix = "ref: refs/heads/"; - return head.startsWith(prefix) ? new GitBranch(head.substring(prefix.length()), true, false) : null; - } catch (IOException e) { - LOG.info(e); - return null; - } - } - - // standard situation. output example: - // master - //* my_feature - // remotes/origin/HEAD -> origin/master - // remotes/origin/eap - // remotes/origin/feature - // remotes/origin/master - // also possible: - //* (no branch) - // and if we call with -r instead of -a, remotes/ prefix is omitted: - // origin/HEAD -> origin/master - final String[] split = output.split("\n"); - GitBranch currentBranch = null; - String activeRemoteName = null; - for (String b : split) { - boolean current = b.charAt(0) == '*'; - b = b.substring(2).trim(); - if (b.equals(NO_BRANCH_NAME)) { continue; } - - String remotePrefix = null; - if (b.startsWith("remotes/")) { - remotePrefix = "remotes/"; - } else if (b.startsWith(REFS_REMOTES_PREFIX)) { - remotePrefix = REFS_REMOTES_PREFIX; - } - boolean isRemote = remotePrefix != null || remoteOnly; - if (isRemote) { - if (! remoteOnly) { - b = b.substring(remotePrefix.length()); - } - final int idx = b.indexOf("HEAD ->"); - if (idx > 0) { - activeRemoteName = b.substring(idx + "HEAD ->".length() + (remotePrefix == null ? 0 : remotePrefix.length())); - continue; - } - } - final GitBranch branch = new GitBranch(b, current, isRemote); - if (current) { - currentBranch = branch; - } - if (branches != null && ((isRemote && remoteWanted) || (!isRemote && localWanted))) { - branches.add(branch); - } - } - if (activeRemoteName != null) { - for (GitBranch branch : branches) { - if (activeRemoteName.equals(branch.getName())) { - branch.setActive(true); - break; - } - } - } - return currentBranch; - } - - /** - * Set tracked branch - * - * @param project the context project - * @param root the git root - * @param remote the remote to track (null, for do not track anything, "." for local repository) - * @param branch the branch to track - */ - public void setTrackedBranch(Project project, VirtualFile root, String remote, String branch) throws VcsException { - if (remote == null || branch == null) { - GitConfigUtil.unsetValue(project, root, trackedRemoteKey()); - GitConfigUtil.unsetValue(project, root, trackedBranchKey()); - } - else { - GitConfigUtil.setValue(project, root, trackedRemoteKey(), remote); - GitConfigUtil.setValue(project, root, trackedBranchKey(), branch); - } - } - - /** - * @return the key for the remote of the tracked branch - */ - private String trackedBranchKey() { - return "branch." + getName() + ".merge"; - } - - /** - * @return the key for the tracked branch - */ - private String trackedRemoteKey() { - return "branch." + getName() + ".remote"; - } - - /** - * Get tracked branch for the current branch - * - * @param project the project - * @param root the vcs root - * @return the tracked branch - * @throws VcsException if there is a problem with accessing configuration file - */ - @Nullable - public GitBranch tracked(Project project, VirtualFile root) throws VcsException { - final HashMap result = new HashMap(); - GitConfigUtil.getValues(project, root, null, result); - String remote = result.get(trackedRemoteKey()); - if (remote == null) { - return null; - } - String branch = result.get(trackedBranchKey()); - if (branch == null) { - return null; - } - if (branch.startsWith(REFS_HEADS_PREFIX)) { - branch = branch.substring(REFS_HEADS_PREFIX.length()); - } - else if (branch.startsWith(REFS_REMOTES_PREFIX)) { - branch = branch.substring(REFS_REMOTES_PREFIX.length()); - } - boolean remoteFlag; - if (!".".equals(remote)) { - branch = remote + "/" + branch; - remoteFlag = true; - } - else { - remoteFlag = false; - } - return new GitBranch(branch, false, remoteFlag); - } - - /** - * Get a merge base between the current branch and specified branch. - * - * @param project the current project - * @param root the vcs root - * @param branch the branch - * @return the common commit or null if the there is no common commit - * @throws VcsException the exception - */ - @Nullable - public GitRevisionNumber getMergeBase(@NotNull Project project, @NotNull VirtualFile root, @NotNull GitBranch branch) - throws VcsException { - return GitHistoryUtils.getMergeBase(project, root, this.getFullName(), branch.getFullName()); - } - - public void setActive(boolean active) { - myActive = active; - } } diff --git a/plugins/git4idea/src/git4idea/GitBranchesSearcher.java b/plugins/git4idea/src/git4idea/GitBranchesSearcher.java index adc38b506115..5c322a346272 100644 --- a/plugins/git4idea/src/git4idea/GitBranchesSearcher.java +++ b/plugins/git4idea/src/git4idea/GitBranchesSearcher.java @@ -20,6 +20,7 @@ import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; import com.intellij.openapi.vcs.VcsException; import com.intellij.openapi.vfs.VirtualFile; +import git4idea.branch.GitBranchUtil; import java.util.HashSet; import java.util.Set; @@ -32,14 +33,14 @@ public class GitBranchesSearcher { public GitBranchesSearcher(final Project project, final VirtualFile root, final boolean findRemote) throws VcsException { LOG.debug("constructing, root: " + root.getPath() + " findRemote = " + findRemote); final Set usedBranches = new HashSet(); - myLocal = GitBranch.current(project, root); + myLocal = GitBranchUtil.getCurrentBranch(project, root); LOG.debug("local: " + myLocal); if (myLocal == null) return; usedBranches.add(myLocal); GitBranch remote = myLocal; while (true) { - remote = remote.tracked(project, root); + remote = GitBranchUtil.tracked(project, root, remote.getName()); if (remote == null) { LOG.debug("remote == null, exiting"); return; diff --git a/plugins/git4idea/src/git4idea/GitReference.java b/plugins/git4idea/src/git4idea/GitReference.java index 5025d5b23f10..ef2c9a8a0c5e 100644 --- a/plugins/git4idea/src/git4idea/GitReference.java +++ b/plugins/git4idea/src/git4idea/GitReference.java @@ -17,31 +17,20 @@ package git4idea; import org.jetbrains.annotations.NotNull; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - /** - * The base class for named git references + * The base class for named git references, like branches and tags. */ public abstract class GitReference implements Comparable { - /** - * The name of the reference - */ - protected final String myName; - /** - * The constructor - * - * @param name the used name - */ + @NotNull protected final String myName; + public GitReference(@NotNull String name) { myName = new String(name); } /** - * @return the local name of the reference + * @return the name of the reference, e.g. "origin/master" or "feature". + * @see #getFullName() */ @NotNull public String getName() { @@ -49,70 +38,31 @@ public abstract class GitReference implements Comparable { } /** - * @return the full name of the object + * @return the full name of the reference, e.g. "refs/remotes/origin/master" or "refs/heads/master". */ @NotNull public abstract String getFullName(); - /** - * @return the full name for the reference ({@link #getFullName()}. - */ @Override public String toString() { return getFullName(); } - /** - * {@inheritDoc} - */ @Override - public boolean equals(final Object obj) { - return obj instanceof GitReference && - toString().equals(obj.toString()); //To change body of overridden methods use File | Settings | File Templates. + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + return obj instanceof GitReference && getFullName().equals(((GitReference)obj).getFullName()); } - /** - * {@inheritDoc} - */ @Override public int hashCode() { return toString().hashCode(); } - /** - * {@inheritDoc} - */ - public int compareTo(final GitReference o) { + public int compareTo(GitReference o) { return o == null ? 1 : getFullName().compareTo(o.getFullName()); } - - /** - * Get name clashes for the for the sequence of the collections - * - * @param collections the collection list - * @return the conflict set - */ - public static Set getNameClashes(Collection... collections) { - ArrayList> individual = new ArrayList>(); - // collect individual key sets - for (Collection c : collections) { - HashSet s = new HashSet(); - individual.add(s); - for (GitReference r : c) { - s.add(r.getName()); - } - } - HashSet rc = new HashSet(); - // all pairs from array - for (int i = 0; i < collections.length - 1; i++) { - HashSet si = individual.get(i); - for (int j = i + 1; j < collections.length; j++) { - HashSet sj = individual.get(i); - final HashSet copy = new HashSet(si); - copy.retainAll(sj); - rc.addAll(copy); - } - } - return rc; - } } diff --git a/plugins/git4idea/src/git4idea/GitUtil.java b/plugins/git4idea/src/git4idea/GitUtil.java index bb3fee239efd..fe6855f30a3c 100644 --- a/plugins/git4idea/src/git4idea/GitUtil.java +++ b/plugins/git4idea/src/git4idea/GitUtil.java @@ -704,7 +704,7 @@ public class GitUtil { remote is configured for the current branch). */ - String remoteName = branch.getTrackedRemoteName(repository.getProject(), repository.getRoot()); + String remoteName = GitBranchUtil.getTrackedRemoteName(repository.getProject(), repository.getRoot(), branch.getName()); GitRemote remote; if (remoteName == null) { remote = findOrigin(repository.getRemotes()); diff --git a/plugins/git4idea/src/git4idea/Hash.java b/plugins/git4idea/src/git4idea/Hash.java new file mode 100644 index 000000000000..fd22a24638d7 --- /dev/null +++ b/plugins/git4idea/src/git4idea/Hash.java @@ -0,0 +1,65 @@ +/* + * Copyright 2000-2012 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 git4idea; + +import org.jetbrains.annotations.NotNull; + +/** + * Encapsulation of the hash representing an object in Git. + * + * @author Kirill Likhodedov + */ +public class Hash { + + @NotNull private final String myHash; + + private Hash(@NotNull String hash) { + myHash = hash; + } + + @NotNull + public static Hash create(@NotNull String hash) { + return new Hash(hash); + } + + @NotNull + public String asString() { + return myHash; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + Hash hash = (Hash)o; + + if (!myHash.equals(hash.myHash)) return false; + + return true; + } + + @Override + public int hashCode() { + return myHash.hashCode(); + } + + @Override + public String toString() { + return myHash; + } + +} diff --git a/plugins/git4idea/src/git4idea/branch/GitBranchUtil.java b/plugins/git4idea/src/git4idea/branch/GitBranchUtil.java index 43e46e7120b5..29813b88d212 100644 --- a/plugins/git4idea/src/git4idea/branch/GitBranchUtil.java +++ b/plugins/git4idea/src/git4idea/branch/GitBranchUtil.java @@ -15,9 +15,17 @@ */ package git4idea.branch; +import com.google.common.base.Function; +import com.google.common.collect.Collections2; import com.intellij.openapi.diagnostic.Logger; +import com.intellij.openapi.project.Project; +import com.intellij.openapi.vcs.VcsException; +import com.intellij.openapi.vfs.VirtualFile; import git4idea.GitBranch; +import git4idea.GitUtil; +import git4idea.config.GitConfigUtil; import git4idea.repo.GitBranchTrackInfo; +import git4idea.repo.GitConfig; import git4idea.repo.GitRemote; import git4idea.repo.GitRepository; import git4idea.ui.branch.GitBranchUiUtil; @@ -26,6 +34,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.Collection; +import java.util.HashMap; /** * @author Kirill Likhodedov @@ -87,4 +96,92 @@ public class GitBranchUtil { return GitBranchUiUtil.getBranchNameOrRev(repository); } } + + @NotNull + public static Collection convertBranchesToNames(@NotNull Collection branches) { + return Collections2.transform(branches, new Function() { + @Override + public String apply(@Nullable GitBranch input) { + assert input != null; + return input.getName(); + } + }); + } + + /** + * Returns the current branch in the given repository, or null if either repository is not on the branch, or in case of error. + * @deprecated Use {@link GitRepository#getCurrentBranch()} + */ + @Deprecated + @Nullable + public static GitBranch getCurrentBranch(@NotNull Project project, @NotNull VirtualFile root) { + GitRepository repository = GitUtil.getRepositoryManager(project).getRepositoryForRoot(root); + if (repository != null) { + return repository.getCurrentBranch(); + } + else { + LOG.error("Repository is null for root " + root); + } + return null; + } + + /** + * Get tracked remote for the branch + */ + @Nullable + public static String getTrackedRemoteName(Project project, VirtualFile root, String branchName) throws VcsException { + return GitConfigUtil.getValue(project, root, trackedRemoteKey(branchName)); + } + + /** + * Get tracked branch of the given branch + */ + @Nullable + public static String getTrackedBranchName(Project project, VirtualFile root, String branchName) throws VcsException { + return GitConfigUtil.getValue(project, root, trackedBranchKey(branchName)); + } + + @NotNull + private static String trackedBranchKey(String branchName) { + return "branch." + branchName + ".merge"; + } + + @NotNull + private static String trackedRemoteKey(String branchName) { + return "branch." + branchName + ".remote"; + } + + /** + * Get the tracked branch for the given branch, or null if the given branch doesn't track anything. + * @deprecated Use {@link GitConfig#getBranchTrackInfos()} + */ + @Deprecated + @Nullable + public static GitBranch tracked(Project project, VirtualFile root, String branchName) throws VcsException { + final HashMap result = new HashMap(); + GitConfigUtil.getValues(project, root, null, result); + String remote = result.get(trackedRemoteKey(branchName)); + if (remote == null) { + return null; + } + String branch = result.get(trackedBranchKey(branchName)); + if (branch == null) { + return null; + } + if (branch.startsWith(GitBranch.REFS_HEADS_PREFIX)) { + branch = branch.substring(GitBranch.REFS_HEADS_PREFIX.length()); + } + else if (branch.startsWith(GitBranch.REFS_REMOTES_PREFIX)) { + branch = branch.substring(GitBranch.REFS_REMOTES_PREFIX.length()); + } + boolean remoteFlag; + if (!".".equals(remote)) { + branch = remote + "/" + branch; + remoteFlag = true; + } + else { + remoteFlag = false; + } + return new GitBranch(branch, GitBranch.DUMMY_HASH, remoteFlag); + } } diff --git a/plugins/git4idea/src/git4idea/changes/GitCommittedChangeListProvider.java b/plugins/git4idea/src/git4idea/changes/GitCommittedChangeListProvider.java index dd61e4e92ba4..dc685935e585 100644 --- a/plugins/git4idea/src/git4idea/changes/GitCommittedChangeListProvider.java +++ b/plugins/git4idea/src/git4idea/changes/GitCommittedChangeListProvider.java @@ -38,6 +38,7 @@ import git4idea.GitBranch; import git4idea.GitDeprecatedRemote; import git4idea.GitFileRevision; import git4idea.GitUtil; +import git4idea.branch.GitBranchUtil; import git4idea.commands.GitSimpleHandler; import git4idea.history.GitHistoryUtils; import git4idea.history.browser.GitCommit; @@ -78,11 +79,11 @@ public class GitCommittedChangeListProvider implements CommittedChangesProvider< return null; } try { - GitBranch c = GitBranch.current(myProject, gitRoot); + GitBranch c = GitBranchUtil.getCurrentBranch(myProject, gitRoot); if (c == null) { return null; } - String remote = c.getTrackedRemoteName(myProject, gitRoot); + String remote = GitBranchUtil.getTrackedRemoteName(myProject, gitRoot, c.getName()); if (StringUtil.isEmpty(remote)) { return null; } diff --git a/plugins/git4idea/src/git4idea/changes/GitOutgoingChangesProvider.java b/plugins/git4idea/src/git4idea/changes/GitOutgoingChangesProvider.java index 918e853f1e51..cc641808d81b 100644 --- a/plugins/git4idea/src/git4idea/changes/GitOutgoingChangesProvider.java +++ b/plugins/git4idea/src/git4idea/changes/GitOutgoingChangesProvider.java @@ -25,12 +25,14 @@ import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.util.Consumer; import com.intellij.util.containers.Convertor; +import git4idea.GitBranch; import git4idea.GitBranchesSearcher; import git4idea.GitRevisionNumber; import git4idea.GitUtil; import git4idea.commands.GitSimpleHandler; import git4idea.history.GitHistoryUtils; import git4idea.history.browser.SHAHash; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.*; @@ -50,7 +52,7 @@ public class GitOutgoingChangesProvider implements VcsOutgoingChangesProvider>(null, Collections.emptyList()); } - final GitRevisionNumber base = searcher.getLocal().getMergeBase(myProject, vcsRoot, searcher.getRemote()); + final GitRevisionNumber base = getMergeBase(myProject, vcsRoot, searcher.getLocal(), searcher.getRemote()); if (base == null) { return new Pair>(null, Collections.emptyList()); } @@ -82,7 +84,7 @@ public class GitOutgoingChangesProvider implements VcsOutgoingChangesProvider(localChanges); @@ -133,4 +135,14 @@ public class GitOutgoingChangesProvider implements VcsOutgoingChangesProvider getBranchesWithCommit(final SHAHash hash) throws VcsException; Collection getTagsWithCommit(final SHAHash hash) throws VcsException; - @Nullable - GitBranch loadLocalBranches(Collection sink) throws VcsException; - - @Nullable - GitBranch loadRemoteBranches(Collection sink) throws VcsException; - void loadAllBranches(final List sink) throws VcsException; void loadAllTags(final Collection sink) throws VcsException; diff --git a/plugins/git4idea/src/git4idea/history/browser/LowLevelAccessImpl.java b/plugins/git4idea/src/git4idea/history/browser/LowLevelAccessImpl.java index 10e4616e253f..fb71521608a5 100644 --- a/plugins/git4idea/src/git4idea/history/browser/LowLevelAccessImpl.java +++ b/plugins/git4idea/src/git4idea/history/browser/LowLevelAccessImpl.java @@ -19,6 +19,7 @@ import com.intellij.openapi.components.ServiceManager; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Getter; +import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.vcs.FilePathImpl; import com.intellij.openapi.vcs.VcsException; import com.intellij.openapi.vcs.history.VcsRevisionNumber; @@ -29,21 +30,29 @@ import git4idea.GitBranch; import git4idea.GitTag; import git4idea.GitUtil; import git4idea.PlatformFacade; +import git4idea.branch.GitBranchUtil; import git4idea.branch.GitBranchesCollection; +import git4idea.commands.GitCommand; +import git4idea.commands.GitSimpleHandler; import git4idea.config.GitConfigUtil; import git4idea.history.GitHistoryUtils; import git4idea.history.wholeTree.AbstractHash; import git4idea.history.wholeTree.CommitHashPlusParents; import git4idea.repo.GitRepository; +import git4idea.repo.GitRepositoryFiles; import git4idea.repo.GitRepositoryImpl; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.io.File; +import java.io.IOException; import java.util.*; public class LowLevelAccessImpl implements LowLevelAccess { private final static Logger LOG = Logger.getInstance("#git4idea.history.browser.LowLevelAccessImpl"); + // The name that specifies that git is on specific commit rather then on some branch ({@value}) + private static final String NO_BRANCH_NAME = "(no branch)"; + private final Project myProject; private final VirtualFile myRoot; @@ -121,7 +130,7 @@ public class LowLevelAccessImpl implements LowLevelAccess { final GitBranch current = repository.getCurrentBranch(); refs.setCurrentBranch(current); if (current != null) { - GitBranch tracked = current.tracked(myProject, myRoot); + GitBranch tracked = GitBranchUtil.tracked(myProject, myRoot, current.getName()); String fullName = tracked == null ? null : tracked.getFullName(); fullName = fullName != null && fullName.startsWith(GitBranch.REFS_REMOTES_PREFIX) ? fullName.substring(GitBranch.REFS_REMOTES_PREFIX.length()) : fullName; refs.setTrackedRemoteName(fullName); @@ -173,10 +182,7 @@ public class LowLevelAccessImpl implements LowLevelAccess { } public List getBranchesWithCommit(final String hash) throws VcsException { - final List result = new ArrayList(); - GitBranch.listAsStrings(myProject, myRoot, true, true, result, hash); - //GitBranch.listAsStrings(myProject, myRoot, true, false, result, hash.getValue()); - return result; + return new ArrayList(listAsStrings(myProject, myRoot, true, true, hash)); } public Collection getTagsWithCommit(final SHAHash hash) throws VcsException { @@ -185,23 +191,100 @@ public class LowLevelAccessImpl implements LowLevelAccess { return result; } - @Nullable - public GitBranch loadLocalBranches(Collection sink) throws VcsException { - return GitBranch.listAsStrings(myProject, myRoot, false, true, sink, null); - } - - @Nullable - public GitBranch loadRemoteBranches(Collection sink) throws VcsException { - return GitBranch.listAsStrings(myProject, myRoot, true, false, sink, null); - } - public void loadAllBranches(List sink) throws VcsException { - GitBranch.listAsStrings(myProject, myRoot, true, false, sink, null); - GitBranch.listAsStrings(myProject, myRoot, false, true, sink, null); + sink.addAll(listAsStrings(myProject, myRoot, true, false, null)); + sink.addAll(listAsStrings(myProject, myRoot, false, true, null)); } public void loadAllTags(Collection sink) throws VcsException { GitTag.listAsStrings(myProject, myRoot, sink, null); } + @NotNull + private static Collection listAsStrings(@NotNull Project project, @NotNull VirtualFile root, boolean localWanted, + boolean remoteWanted, @Nullable String containingCommit) throws VcsException { + return GitBranchUtil.convertBranchesToNames(list(project, root, localWanted, remoteWanted, containingCommit)); + } + /** + * List branches containing a commit. Specify null if no commit filtering is needed. + */ + @NotNull + private static Collection list(@NotNull Project project, @NotNull VirtualFile root, boolean localWanted, boolean remoteWanted, + @Nullable String containingCommit) throws VcsException { + // preparing native command executor + final GitSimpleHandler handler = new GitSimpleHandler(project, root, GitCommand.BRANCH); + handler.setNoSSH(true); + handler.setSilent(true); + handler.addParameters("--no-color"); + boolean remoteOnly = false; + if (remoteWanted && localWanted) { + handler.addParameters("-a"); + remoteOnly = false; + } else if (remoteWanted) { + handler.addParameters("-r"); + remoteOnly = true; + } + if (containingCommit != null) { + handler.addParameters("--contains", containingCommit); + } + final String output = handler.run(); + + if (output.trim().length() == 0) { + // the case after git init and before first commit - there is no branch and no output, and we'll take refs/heads/master + String head; + try { + head = FileUtil.loadFile(new File(root.getPath(), GitRepositoryFiles.GIT_HEAD), GitUtil.UTF8_ENCODING).trim(); + final String prefix = "ref: refs/heads/"; + return head.startsWith(prefix) ? + Collections.singletonList(new GitBranch(head.substring(prefix.length()), GitBranch.DUMMY_HASH, false)) : + null; + } catch (IOException e) { + LOG.info(e); + return null; + } + } + + Collection branches = new ArrayList(); + // standard situation. output example: + // master + //* my_feature + // remotes/origin/HEAD -> origin/master + // remotes/origin/eap + // remotes/origin/feature + // remotes/origin/master + // also possible: + //* (no branch) + // and if we call with -r instead of -a, remotes/ prefix is omitted: + // origin/HEAD -> origin/master + final String[] split = output.split("\n"); + for (String b : split) { + boolean current = b.charAt(0) == '*'; + b = b.substring(2).trim(); + if (b.equals(NO_BRANCH_NAME)) { continue; } + + String remotePrefix = null; + if (b.startsWith("remotes/")) { + remotePrefix = "remotes/"; + } else if (b.startsWith(GitBranch.REFS_REMOTES_PREFIX)) { + remotePrefix = GitBranch.REFS_REMOTES_PREFIX; + } + boolean isRemote = remotePrefix != null || remoteOnly; + if (isRemote) { + if (! remoteOnly) { + b = b.substring(remotePrefix.length()); + } + final int idx = b.indexOf("HEAD ->"); + if (idx > 0) { + continue; + } + } + final GitBranch branch = new GitBranch(b, GitBranch.DUMMY_HASH, isRemote); + if ((isRemote && remoteWanted) || (!isRemote && localWanted)) { + branches.add(branch); + } + } + return branches; + } + + } diff --git a/plugins/git4idea/src/git4idea/merge/GitMerger.java b/plugins/git4idea/src/git4idea/merge/GitMerger.java index 9bf920aa8734..4605aeb405d0 100644 --- a/plugins/git4idea/src/git4idea/merge/GitMerger.java +++ b/plugins/git4idea/src/git4idea/merge/GitMerger.java @@ -23,6 +23,7 @@ import com.intellij.openapi.vfs.VirtualFile; import git4idea.GitBranch; import git4idea.GitUtil; import git4idea.GitVcs; +import git4idea.branch.GitBranchUtil; import git4idea.commands.GitCommand; import git4idea.commands.GitSimpleHandler; import git4idea.repo.GitRepositoryFiles; @@ -69,7 +70,7 @@ public class GitMerger { File gitDir = new File(VfsUtilCore.virtualToIoFile(root), GitUtil.DOT_GIT); File messageFile = new File(gitDir, GitRepositoryFiles.MERGE_MSG); if (!messageFile.exists()) { - final GitBranch branch = GitBranch.current(myProject, root); + final GitBranch branch = GitBranchUtil.getCurrentBranch(myProject, root); final String branchName = branch != null ? branch.getName() : ""; handler.addParameters("-m", "Merge branch '" + branchName + "' of " + root.getPresentableUrl() + " with conflicts."); } else { diff --git a/plugins/git4idea/src/git4idea/push/GitPushDialog.java b/plugins/git4idea/src/git4idea/push/GitPushDialog.java index 2e26b537a79a..ea81a9308516 100644 --- a/plugins/git4idea/src/git4idea/push/GitPushDialog.java +++ b/plugins/git4idea/src/git4idea/push/GitPushDialog.java @@ -177,7 +177,7 @@ public class GitPushDialog extends DialogWrapper { } String remoteName; try { - remoteName = currentBranch.getTrackedRemoteName(myProject, repository.getRoot()); + remoteName = GitBranchUtil.getTrackedRemoteName(myProject, repository.getRoot(), currentBranch.getName()); if (remoteName == null) { remoteName = DEFAULT_REMOTE; } @@ -225,8 +225,8 @@ public class GitPushDialog extends DialogWrapper { if (currentBranch == null) { continue; } - String remoteName = currentBranch.getTrackedRemoteName(repository.getProject(), repository.getRoot()); - String trackedBranchName = currentBranch.getTrackedBranchName(repository.getProject(), repository.getRoot()); + String remoteName = GitBranchUtil.getTrackedRemoteName(repository.getProject(), repository.getRoot(), currentBranch.getName()); + String trackedBranchName = GitBranchUtil.getTrackedBranchName(repository.getProject(), repository.getRoot(), currentBranch.getName()); GitRemote remote = GitUtil.findRemoteByName(repository, remoteName); GitBranch targetBranch = GitBranchUtil.findRemoteBranchByName(repository, remote, trackedBranchName); if (remote == null || targetBranch == null) { @@ -248,7 +248,7 @@ public class GitPushDialog extends DialogWrapper { if (!manualBranchName.startsWith("refs/remotes/")) { manualBranchName = myRefspecPanel.getSelectedRemote().getName() + "/" + manualBranchName; } - manualBranch = new GitBranch(manualBranchName, false, true); + manualBranch = new GitBranch(manualBranchName, GitBranch.DUMMY_HASH, true); } targetBranch = manualBranch; } diff --git a/plugins/git4idea/src/git4idea/push/GitPushResult.java b/plugins/git4idea/src/git4idea/push/GitPushResult.java index e8ac07d4f6e1..c82b5ea816cb 100644 --- a/plugins/git4idea/src/git4idea/push/GitPushResult.java +++ b/plugins/git4idea/src/git4idea/push/GitPushResult.java @@ -33,6 +33,7 @@ import git4idea.GitBranch; import git4idea.GitRevisionNumber; import git4idea.GitUtil; import git4idea.GitVcs; +import git4idea.branch.GitBranchUtil; import git4idea.merge.MergeChangeCollector; import git4idea.repo.GitRepository; import org.jetbrains.annotations.NotNull; @@ -191,14 +192,14 @@ class GitPushResult { String trackedBranchName; try { - String simpleName = currentBranch.getTrackedBranchName(myProject, repository.getRoot()); + String simpleName = GitBranchUtil.getTrackedBranchName(myProject, repository.getRoot(), currentBranch.getName()); if (simpleName == null) { continue; } if (simpleName.startsWith(GitBranch.REFS_HEADS_PREFIX)) { simpleName = simpleName.substring(GitBranch.REFS_HEADS_PREFIX.length()); } - String remote = currentBranch.getTrackedRemoteName(myProject, repository.getRoot()); + String remote = GitBranchUtil.getTrackedRemoteName(myProject, repository.getRoot(), currentBranch.getName()); if (remote == null) { continue; } diff --git a/plugins/git4idea/src/git4idea/push/GitPushUtils.java b/plugins/git4idea/src/git4idea/push/GitPushUtils.java deleted file mode 100644 index 5fb3795372d7..000000000000 --- a/plugins/git4idea/src/git4idea/push/GitPushUtils.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2000-2009 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 git4idea.push; - -import com.intellij.execution.process.ProcessOutputTypes; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.util.Key; -import com.intellij.openapi.vcs.VcsException; -import com.intellij.openapi.vfs.VirtualFile; -import git4idea.GitBranch; -import git4idea.commands.GitCommand; -import git4idea.commands.GitLineHandler; -import git4idea.commands.GitLineHandlerAdapter; -import org.jetbrains.annotations.Nullable; - -/** - * Utilities that support pushing to remote repository - */ -public class GitPushUtils { - /** - * A private constructor for utility class - */ - private GitPushUtils() { - } - - /** - * Prepare push command - * - * @param project a project - * @param vcsRoot a vcsRoot - * @return a prepared push handler - * @throws VcsException if the git error happens - */ - @Nullable - public static GitLineHandler preparePush(Project project, VirtualFile vcsRoot) throws VcsException { - GitBranch current = GitBranch.current(project, vcsRoot); - if (current == null) { - return null; - } - String remote = current.getTrackedRemoteName(project, vcsRoot); - if (remote == null) { - return null; - } - String tracked = current.getTrackedBranchName(project, vcsRoot); - if (tracked == null) { - return null; - } - final GitLineHandler rc = new GitLineHandler(project, vcsRoot, GitCommand.PUSH); - rc.addParameters("-v", remote, current.getFullName() + ":" + tracked); - trackPushRejectedAsError(rc, "Rejected push (" + vcsRoot.getPresentableUrl() + "): "); - return rc; - } - - /** - * Install listener that tracks rejected push branch operations as errors - * - * @param handler the handler to use - * @param prefix the prefix for errors - */ - public static void trackPushRejectedAsError(final GitLineHandler handler, final String prefix) { - handler.addLineListener(new GitLineHandlerAdapter() { - @Override - public void onLineAvailable(final String line, final Key outputType) { - if (outputType == ProcessOutputTypes.STDERR && line.startsWith(" ! [")) { - //noinspection ThrowableInstanceNeverThrown - handler.addError(new VcsException(prefix + line)); - } - } - }); - } -} diff --git a/plugins/git4idea/src/git4idea/push/GitPusher.java b/plugins/git4idea/src/git4idea/push/GitPusher.java index c6c90bf3d3e3..8ea0c5121f66 100644 --- a/plugins/git4idea/src/git4idea/push/GitPusher.java +++ b/plugins/git4idea/src/git4idea/push/GitPusher.java @@ -62,7 +62,7 @@ public final class GitPusher { */ static final int RECENT_COMMITS_NUMBER = 5; - static final GitBranch NO_TARGET_BRANCH = new GitBranch("", false, true); + static final GitBranch NO_TARGET_BRANCH = new GitBranch("", GitBranch.DUMMY_HASH, true); private static final Logger LOG = Logger.getInstance(GitPusher.class); private static final String INDICATOR_TEXT = "Pushing"; diff --git a/plugins/git4idea/src/git4idea/rebase/GitRebaseDialog.java b/plugins/git4idea/src/git4idea/rebase/GitRebaseDialog.java index 2dff5fc4aa6e..bc58140a3faf 100644 --- a/plugins/git4idea/src/git4idea/rebase/GitRebaseDialog.java +++ b/plugins/git4idea/src/git4idea/rebase/GitRebaseDialog.java @@ -15,6 +15,7 @@ */ package git4idea.rebase; +import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.DialogWrapper; import com.intellij.openapi.vcs.VcsException; @@ -22,11 +23,13 @@ import com.intellij.openapi.vfs.VirtualFile; import com.intellij.ui.DocumentAdapter; import git4idea.GitBranch; import git4idea.GitTag; +import git4idea.GitUtil; import git4idea.commands.GitCommand; import git4idea.commands.GitLineHandler; import git4idea.config.GitConfigUtil; import git4idea.i18n.GitBundle; import git4idea.merge.GitMergeUtil; +import git4idea.repo.GitRepository; import git4idea.ui.GitReferenceValidator; import git4idea.util.GitUIUtil; @@ -41,6 +44,9 @@ import java.util.List; * The dialog that allows initiating git rebase activity */ public class GitRebaseDialog extends DialogWrapper { + + private static final Logger LOG = Logger.getInstance(GitRebaseDialog.class); + /** * Git root selector */ @@ -318,10 +324,16 @@ public class GitRebaseDialog extends DialogWrapper { myRemoteBranches.clear(); myTags.clear(); final VirtualFile root = gitRoot(); - GitBranch.list(myProject, root, true, false, myLocalBranches, null); - GitBranch.list(myProject, root, false, true, myRemoteBranches, null); + GitRepository repository = GitUtil.getRepositoryManager(myProject).getRepositoryForRoot(root); + if (repository != null) { + myLocalBranches.addAll(repository.getBranches().getLocalBranches()); + myRemoteBranches.addAll(repository.getBranches().getRemoteBranches()); + myCurrentBranch = repository.getCurrentBranch(); + } + else { + LOG.error("Repository is null for root " + root); + } GitTag.list(myProject, root, myTags); - myCurrentBranch = GitBranch.current(myProject, root); } catch (VcsException e) { GitUIUtil.showOperationError(myProject, e, "git branch -a"); @@ -346,10 +358,10 @@ public class GitRebaseDialog extends DialogWrapper { } else { if (remote.equals(".")) { - trackedBranch = new GitBranch(name, false, false); + trackedBranch = new GitBranch(name, GitBranch.DUMMY_HASH, false); } else { - trackedBranch = new GitBranch(remote + "/" + name, false, true); + trackedBranch = new GitBranch(remote + "/" + name, GitBranch.DUMMY_HASH, true); } } } diff --git a/plugins/git4idea/src/git4idea/repo/GitRepositoryReader.java b/plugins/git4idea/src/git4idea/repo/GitRepositoryReader.java index 0432f040b8de..12f712bf97ce 100644 --- a/plugins/git4idea/src/git4idea/repo/GitRepositoryReader.java +++ b/plugins/git4idea/src/git4idea/repo/GitRepositoryReader.java @@ -19,6 +19,7 @@ import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.util.io.FileUtil; import com.intellij.util.Processor; import git4idea.GitBranch; +import git4idea.Hash; import git4idea.branch.GitBranchesCollection; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; @@ -28,10 +29,7 @@ import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; +import java.util.*; import java.util.concurrent.Callable; import java.util.concurrent.atomic.AtomicReference; import java.util.regex.Matcher; @@ -123,8 +121,8 @@ class GitRepositoryReader { Head head = readHead(); if (head.isBranch) { String branchName = head.ref; - String hash = readCurrentRevision(); // TODO make this faster, because we know the branch name - return new GitBranch(branchName, hash == null ? "" : hash, true, false); + String hash = readCurrentRevision(); // TODO we know the branch name, so no need to read head twice + return new GitBranch(branchName, hash == null ? GitBranch.DUMMY_HASH : Hash.create(hash), false); } if (isRebaseInProgress()) { GitBranch branch = readRebaseBranch("rebase-apply"); @@ -151,10 +149,15 @@ class GitRepositoryReader { return null; } String branchName = tryLoadFile(headName).trim(); + Hash hash = Hash.create(readBranchFile(findBranchFile(branchName))); if (branchName.startsWith(REFS_HEADS_PREFIX)) { branchName = branchName.substring(REFS_HEADS_PREFIX.length()); } - return new GitBranch(branchName, true, false); + return new GitBranch(branchName, hash, false); + } + + private File findBranchFile(@NotNull String branchName) { + return new File(myGitDir.getPath() + File.separator + branchName); } private boolean isMergeInProgress() { @@ -249,30 +252,28 @@ class GitRepositoryReader { Set localBranches = readUnpackedLocalBranches(); Set remoteBranches = readUnpackedRemoteBranches(); GitBranchesCollection packedBranches = readPackedBranches(); - localBranches.addAll(packedBranches.getLocalBranches()); - remoteBranches.addAll(packedBranches.getRemoteBranches()); - - // note that even the active branch may be packed. So at first we collect branches, then we find the active. - GitBranch currentBranch = readCurrentBranch(); - markActiveBranch(localBranches, currentBranch); - + addPackedBranches(packedBranches.getLocalBranches(), localBranches); + addPackedBranches(packedBranches.getRemoteBranches(), remoteBranches); return new GitBranchesCollection(localBranches, remoteBranches); } - - /** - * Sets the 'active' flag to the current branch if it is contained in the specified collection. - * @param branches branches to be walked through. - * @param currentBranch current branch. - */ - private static void markActiveBranch(@NotNull Set branches, @Nullable GitBranch currentBranch) { - if (currentBranch == null) { - return; - } - for (GitBranch branch : branches) { - if (branch.getName().equals(currentBranch.getName())) { - branch.setActive(true); + + // this is to avoid hash comparison in GitBranch.equals that leads to a log error. + // the algorithm is N^2 instead of N, but the number of branches rarely exceeds even 100, so that shouldn't be a problem. + private static void addPackedBranches(@NotNull Collection packedBranches, @NotNull Set branchesCollection) { + Set branchesToAdd = new HashSet(); + for (GitBranch packedBranch : packedBranches) { + boolean found = false; + for (GitBranch branch : branchesCollection) { + if (branch.getName().equals(packedBranch.getName())) { + found = true; + break; + } + } + if (!found) { + branchesToAdd.add(packedBranch); } } + branchesCollection.addAll(branchesToAdd); } /** @@ -285,7 +286,7 @@ class GitRepositoryReader { String branchName = entry.getKey(); File branchFile = entry.getValue(); String hash = loadHashFromBranchFile(branchFile); - branches.add(new GitBranch(branchName, hash == null ? "" : hash, false, false)); + branches.add(new GitBranch(branchName, hash == null ? GitBranch.DUMMY_HASH : Hash.create(hash), false)); } return branches; } @@ -293,7 +294,7 @@ class GitRepositoryReader { @Nullable private static String loadHashFromBranchFile(@NotNull File branchFile) { try { - return tryLoadFile(branchFile); + return tryLoadFile(branchFile).trim(); } catch (GitRepoStateException e) { // notify about error but don't break the process LOG.error("Couldn't read " + branchFile, e); @@ -317,7 +318,7 @@ class GitRepositoryReader { if (relativePath != null) { String branchName = FileUtil.toSystemIndependentName(relativePath); String hash = loadHashFromBranchFile(file); - branches.add(new GitBranch(branchName, hash == null ? "": hash, false, true)); + branches.add(new GitBranch(branchName, hash == null ? GitBranch.DUMMY_HASH : Hash.create(hash), true)); } } return true; @@ -345,9 +346,9 @@ class GitRepositoryReader { return; } if (branchName.startsWith(REFS_HEADS_PREFIX)) { - localBranches.add(new GitBranch(branchName.substring(REFS_HEADS_PREFIX.length()), hash, false, false)); + localBranches.add(new GitBranch(branchName.substring(REFS_HEADS_PREFIX.length()), Hash.create(hash), false)); } else if (branchName.startsWith(REFS_REMOTES_PREFIX)) { - remoteBranches.add(new GitBranch(branchName.substring(REFS_REMOTES_PREFIX.length()), hash, false, true)); + remoteBranches.add(new GitBranch(branchName.substring(REFS_REMOTES_PREFIX.length()), Hash.create(hash), true)); } } }); @@ -463,7 +464,7 @@ class GitRepositoryReader { } if (hash != null && branch != null) { - resultHandler.handleResult(hash, branch); + resultHandler.handleResult(hash.trim(), branch); } else { LOG.info("Ignoring invalid packed-refs line: [" + line + "]"); diff --git a/plugins/git4idea/src/git4idea/ui/GitUnstashDialog.java b/plugins/git4idea/src/git4idea/ui/GitUnstashDialog.java index 0942eb7fa93a..4d52c11535a1 100644 --- a/plugins/git4idea/src/git4idea/ui/GitUnstashDialog.java +++ b/plugins/git4idea/src/git4idea/ui/GitUnstashDialog.java @@ -36,10 +36,12 @@ import com.intellij.openapi.vfs.VirtualFile; import com.intellij.ui.DocumentAdapter; import com.intellij.util.Consumer; import git4idea.*; +import git4idea.branch.GitBranchUtil; import git4idea.commands.*; import git4idea.config.GitVersionSpecialty; import git4idea.i18n.GitBundle; import git4idea.merge.GitConflictResolver; +import git4idea.repo.GitRepository; import git4idea.stash.GitStashUtils; import git4idea.util.GitUIUtil; import git4idea.validators.GitBranchNameValidator; @@ -52,7 +54,10 @@ import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.util.*; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; /** @@ -306,18 +311,20 @@ public class GitUnstashDialog extends DialogWrapper { private void refreshStashList() { final DefaultListModel listModel = (DefaultListModel)myStashList.getModel(); listModel.clear(); - GitStashUtils.loadStashStack(myProject, getGitRoot(), new Consumer() { + VirtualFile root = getGitRoot(); + GitStashUtils.loadStashStack(myProject, root, new Consumer() { @Override public void consume(StashInfo stashInfo) { listModel.addElement(stashInfo); } }); myBranches.clear(); - try { - GitBranch.listAsStrings(myProject, getGitRoot(), false, true, myBranches, null); + GitRepository repository = GitUtil.getRepositoryManager(myProject).getRepositoryForRoot(root); + if (repository != null) { + myBranches.addAll(GitBranchUtil.convertBranchesToNames(repository.getBranches().getLocalBranches())); } - catch (VcsException e) { - // ignore error + else { + LOG.error("Repository is null for root " + root); } myStashList.setSelectedIndex(0); } diff --git a/plugins/git4idea/src/git4idea/update/GitUpdater.java b/plugins/git4idea/src/git4idea/update/GitUpdater.java index cbf2d7805474..ca6d53ff2929 100644 --- a/plugins/git4idea/src/git4idea/update/GitUpdater.java +++ b/plugins/git4idea/src/git4idea/update/GitUpdater.java @@ -26,6 +26,7 @@ import git4idea.GitBranch; import git4idea.GitRevisionNumber; import git4idea.GitVcs; import git4idea.branch.GitBranchPair; +import git4idea.branch.GitBranchUtil; import git4idea.commands.Git; import git4idea.commands.GitCommand; import git4idea.commands.GitSimpleHandler; @@ -98,7 +99,7 @@ public abstract class GitUpdater { @NotNull Map trackedBranches, @NotNull ProgressIndicator progressIndicator, @NotNull UpdatedFiles updatedFiles) { try { - final GitBranch branchName = GitBranch.current(project, root); + final GitBranch branchName = GitBranchUtil.getCurrentBranch(project, root); final String rebase = GitConfigUtil.getValue(project, root, "branch." + branchName + ".rebase"); if (rebase != null && rebase.equalsIgnoreCase("true")) { return new GitRebaseUpdater(project, git, root, trackedBranches, progressIndicator, updatedFiles); diff --git a/plugins/git4idea/tests/git4idea/branch/GitBranchWorkerTest.groovy b/plugins/git4idea/tests/git4idea/branch/GitBranchWorkerTest.groovy index 6c5e603e6b34..b3e1de3df2fd 100644 --- a/plugins/git4idea/tests/git4idea/branch/GitBranchWorkerTest.groovy +++ b/plugins/git4idea/tests/git4idea/branch/GitBranchWorkerTest.groovy @@ -19,7 +19,6 @@ import com.intellij.openapi.progress.ProgressIndicator import com.intellij.openapi.progress.util.ProgressIndicatorBase import com.intellij.openapi.project.Project import com.intellij.openapi.ui.DialogWrapper -import com.intellij.openapi.util.Disposer import com.intellij.openapi.util.io.FileUtil import com.intellij.openapi.util.text.StringUtil import com.intellij.openapi.vcs.FilePathImpl @@ -29,14 +28,14 @@ import com.intellij.openapi.vfs.VirtualFile import com.intellij.testFramework.vcs.MockChangeListManager import com.intellij.util.LineSeparator import com.intellij.util.text.CharArrayUtil -import git4idea.PlatformFacade -import git4idea.commands.Git import git4idea.config.GitVersion import git4idea.config.GitVersionSpecialty import git4idea.history.browser.GitCommit import git4idea.repo.GitRepository -import git4idea.repo.GitRepositoryImpl -import git4idea.test.* +import git4idea.test.GitExecutor +import git4idea.test.GitLightTest +import git4idea.test.GitMockVirtualFile +import git4idea.test.GitScenarios import org.jetbrains.annotations.NotNull import org.junit.After import org.junit.Before @@ -52,13 +51,7 @@ import static groovy.util.GroovyTestCase.* */ @Mixin(GitExecutor) @Mixin(GitScenarios) -@Mixin(GitLightTest) -class GitBranchWorkerTest { - - private String myRootDir - private GitMockProject myProject - private PlatformFacade myPlatformFacade - private Git myGit +class GitBranchWorkerTest extends GitLightTest { private GitRepository myUltimate private GitRepository myCommunity @@ -68,59 +61,26 @@ class GitBranchWorkerTest { @Before public void setUp() { - myRootDir = FileUtil.createTempDirectory("", "").getPath() - myProject = new GitMockProject(myRootDir) - myPlatformFacade = new GitTestPlatformFacade() - myGit = new GitTestImpl() + super.setUp(); - cd(myRootDir) + cd(myProjectRoot) def community = mkdir("community") def contrib = mkdir("contrib") - [ myRootDir, community, contrib ].each { initRepo(it) } - - myUltimate = createRepository(myRootDir) + myUltimate = createRepository(myProjectRoot) myCommunity = createRepository(community) myContrib = createRepository(contrib) + myRepositories = [ myUltimate, myCommunity, myContrib ] - cd(myRootDir) + cd(myProjectRoot) touch(".gitignore", "community\ncontrib") git("add .gitignore") git("commit -m gitignore") - - myRepositories = [ myUltimate, myCommunity, myContrib ] - myRepositories.each { ((GitTestRepositoryManager)myPlatformFacade.getRepositoryManager(myProject)).add(it) } - } - - private GitRepository createRepository(String rootDir) { - // TODO this smells hacky - // the constructor and notifyListeners() should probably be private - // getPresentableUrl should probably be final, and we should have a better VirtualFile implementation for tests. - new GitRepositoryImpl(new GitMockVirtualFile(rootDir), myPlatformFacade, myProject, myProject, true) { - @Override - protected void notifyListeners() { - } - - @Override - String getPresentableUrl() { - return rootDir; - } - } - } - - private void initRepo(String repoRoot) { - cd repoRoot - git("init") - setupUsername(); - touch("file.txt") - git("add file.txt") - git("commit -m initial") } @After public void tearDown() { - FileUtil.delete(new File(myRootDir)) - Disposer.dispose(myProject) + super.tearDown(); } @Test @@ -242,7 +202,7 @@ class GitBranchWorkerTest { public void "checkout with untracked files overwritten by checkout in first repo should show notification"() { test_untracked_files_overwritten_by_in_first_repo("checkout"); } - + @Test public void "checkout with several untracked files overwritten by checkout in first repo should show notification"() { // note that in old Git versions only one file is listed in the error. @@ -253,7 +213,7 @@ class GitBranchWorkerTest { public void "merge with untracked files overwritten by checkout in first repo should show notification"() { test_untracked_files_overwritten_by_in_first_repo("merge"); } - + def test_untracked_files_overwritten_by_in_first_repo(String operation, int untrackedFiles = 1) { branchWithCommit(myRepositories, "feature") def files = [] @@ -266,15 +226,15 @@ class GitBranchWorkerTest { checkoutOrMerge operation, "feature", [ showUntrackedFilesNotification : { String s, Collection c -> notificationShown = true } ] - + assertTrue "Untracked files notification was not shown", notificationShown } - + @Test public void "checkout with untracked files overwritten by checkout in second repo should show rollback proposal with file list"() { test_checkout_with_untracked_files_overwritten_by_in_second_repo("checkout"); } - + @Test public void "merge with untracked files overwritten by checkout in second repo should show rollback proposal with file list"() { test_checkout_with_untracked_files_overwritten_by_in_second_repo("merge"); @@ -317,11 +277,11 @@ class GitBranchWorkerTest { List changes = null; checkoutOrMerge(operation, "feature", [ showSmartOperationDialog: { Project p, List cs, String op, boolean force -> - changes = cs + changes = cs DialogWrapper.CANCEL_EXIT_CODE } ]) - + assertNotNull "Local changes were not shown in the dialog", changes if (newGitVersion()) { assertEquals "Incorrect set of local changes was shown in the dialog", @@ -344,7 +304,7 @@ class GitBranchWorkerTest { Change toChange(String relPath) { // we don't care about the before revision - new Change(null, CurrentContentRevision.create(new FilePathImpl(new GitMockVirtualFile(myRootDir + "/" + relPath)))) + new Change(null, CurrentContentRevision.create(new FilePathImpl(new GitMockVirtualFile(myProjectRoot + "/" + relPath)))) } @Test @@ -372,7 +332,7 @@ class GitBranchWorkerTest { LOCAL_CHANGES_OVERWRITTEN_BY.masterLine; assertContent(expectedContent, actual) } - + Collection agree_to_smart_operation(String operation, String expectedSuccessMessage) { def localChanges = prepareLocalChangesOverwrittenBy(myUltimate) @@ -408,7 +368,7 @@ class GitBranchWorkerTest { public void "deny to smart checkout in first repo should show nothing"() { test_deny_to_smart_operation_in_first_repo_should_show_notification("checkout"); } - + @Test public void "deny to smart merge in first repo should show nothing"() { test_deny_to_smart_operation_in_first_repo_should_show_notification("merge"); @@ -426,7 +386,7 @@ class GitBranchWorkerTest { assertNull "Error message was not shown", errorMessage assertCurrentBranch("master"); } - + @Test public void "deny to smart checkout in second repo should show rollback proposal"() { test_deny_to_smart_operation_in_second_repo_should_show_rollback_proposal("checkout"); @@ -434,7 +394,7 @@ class GitBranchWorkerTest { assertCurrentBranch(myCommunity, "master") assertCurrentBranch(myContrib, "master") } - + @Test public void "deny to smart merge in second repo should show rollback proposal"() { test_deny_to_smart_operation_in_second_repo_should_show_rollback_proposal("merge"); @@ -451,7 +411,7 @@ class GitBranchWorkerTest { assertNotNull "Rollback proposal was not shown", rollbackMsg } - + @Test public void "rollback of 'checkout branch as new branch' should delete branches"() { branchWithCommit(myRepositories, "feature") @@ -563,8 +523,12 @@ class GitBranchWorkerTest { @Test public void "delete branch merged to head but unmerged to upstream should show dialog"() { // inspired by IDEA-83604 + // for the sake of simplicity we deal with a single myCommunity repository for remote operations + prepareRemoteRepo(myCommunity) + cd myCommunity + git("checkout -b feature"); + git("push -u origin feature") - prepareRemoteRepoAndBranch("feature") // create a commit and merge it to master, but not to feature's upstream touch("feature.txt", "feature content") git("add feature.txt") @@ -582,25 +546,6 @@ class GitBranchWorkerTest { assertTrue "'Branch is not fully merged' dialog was not shown", dialogShown } - // for the sake of simplicity we deal with a single myCommunity repository for remote operations - private void prepareRemoteRepoAndBranch(String branch) { - // prepare parent repository - // create it under ultimate not to bother with removing it after the test (tearDown will clean automatically) - cd myUltimate - git("clone --bare $myCommunity parent.git") - - // initialize feature branch and push to make origin/feature, set up tracking - cd myCommunity - git("checkout -b $branch"); - git("remote add origin ${myUltimate.root.path}/parent.git"); - git("push -u origin $branch") - } - - @Test - void "delete remote branch without problems"() { - - } - @Test public void "simple merge without problems"() { branchWithCommit(myRepositories, "master2", "branch_file.txt", "branch content") diff --git a/plugins/git4idea/tests/git4idea/test/GitExecutor.groovy b/plugins/git4idea/tests/git4idea/test/GitExecutor.groovy index 5348eb267073..a6026c3452fa 100644 --- a/plugins/git4idea/tests/git4idea/test/GitExecutor.groovy +++ b/plugins/git4idea/tests/git4idea/test/GitExecutor.groovy @@ -21,24 +21,16 @@ import com.intellij.util.ArrayUtil import git4idea.repo.GitRepository /** + * Executes various shell commands: cd, touch, mkdir, cat, echo, git. * * @author Kirill Likhodedov */ class GitExecutor { - private String myCurrentDir - - def shortenPath(String path) { - def split = path.split("/") - if (split.size() > 3) { - // split[0] is empty, because the path starts from / - return "/${split[1]}/.../${split[-2]}/${split[-1]}" - } - return path - } + private static String ourCurrentDir def cd(String path) { - myCurrentDir = path + ourCurrentDir = path println "cd ${shortenPath(path)}" } @@ -49,7 +41,7 @@ class GitExecutor { String git(String command) { List split = StringUtil.split(command, " ") String[] params = split.size() > 1 ? ArrayUtil.toObjectArray(split.subList(1, split.size()), String) : ArrayUtil.EMPTY_STRING_ARRAY - return new GitTestRunEnv(new File(myCurrentDir)).run(split.get(0), params); + return new GitTestRunEnv(new File(ourCurrentDir)).run(split.get(0), params); } String git(GitRepository repository, String command) { @@ -58,7 +50,7 @@ class GitExecutor { } def touch(String fileName) { - File file = new File(myCurrentDir, fileName) + File file = new File(ourCurrentDir, fileName) assert !file.exists() file.createNewFile() println("touch $fileName") @@ -71,20 +63,29 @@ class GitExecutor { } def echo(String fileName, String content) { - new File(myCurrentDir, fileName).withWriterAppend("UTF-8") { it.write(content) } + new File(ourCurrentDir, fileName).withWriterAppend("UTF-8") { it.write(content) } } def mkdir(String dirName) { - File file = new File(myCurrentDir, dirName) + File file = new File(ourCurrentDir, dirName) file.mkdir() println("mkdir $dirName") file.path } def cat(String fileName) { - def content = FileUtil.loadFile(new File(myCurrentDir, fileName)) + def content = FileUtil.loadFile(new File(ourCurrentDir, fileName)) println("cat fileName") content } + def shortenPath(String path) { + def split = path.split("/") + if (split.size() > 3) { + // split[0] is empty, because the path starts from / + return "/${split[1]}/.../${split[-2]}/${split[-1]}" + } + return path + } + } diff --git a/plugins/git4idea/tests/git4idea/test/GitFastTest.groovy b/plugins/git4idea/tests/git4idea/test/GitFastTest.groovy index e73c06a91d50..cd690e6a847f 100644 --- a/plugins/git4idea/tests/git4idea/test/GitFastTest.groovy +++ b/plugins/git4idea/tests/git4idea/test/GitFastTest.groovy @@ -29,7 +29,9 @@ import static junit.framework.Assert.assertNotNull /** * * @author Kirill Likhodedov + * @deprecated Use {@link GitLightTest} */ +@Deprecated class GitFastTest { public static final String TEST_NOTIFICATION_GROUP = "Test" diff --git a/plugins/git4idea/tests/git4idea/test/GitLightTest.groovy b/plugins/git4idea/tests/git4idea/test/GitLightTest.groovy index de7b1c99f2c7..e2c4b128836c 100644 --- a/plugins/git4idea/tests/git4idea/test/GitLightTest.groovy +++ b/plugins/git4idea/tests/git4idea/test/GitLightTest.groovy @@ -15,17 +15,108 @@ */ package git4idea.test +import com.intellij.openapi.util.Disposer +import com.intellij.openapi.util.io.FileUtil +import git4idea.PlatformFacade +import git4idea.commands.Git +import git4idea.repo.GitRepository +import git4idea.repo.GitRepositoryImpl +import org.junit.After +import org.junit.Before + /** + *

      GitLightTest is a test that doesn't need to start the whole {@link com.intellij.openapi.application.Application} and Project. + * It substitutes everything with Mocks, and communicates with this mocked platform via {@link GitTestPlatformFacade}.

      + * + *

      However, GitLightTests tests are not entirely unit. They may use other components from the git4idea plugin, they operate on the + * real file system, and they call native Git to prepare test case and from the code which is being tested.

      * * @author Kirill Likhodedov */ @Mixin(GitExecutor) class GitLightTest { - public static final String USER_NAME = "John Doe"; - public static final String USER_EMAIL = "John.Doe@example.com"; + private static final String USER_NAME = "John Doe"; + private static final String USER_EMAIL = "John.Doe@example.com"; - public void setupUsername() { + /** + * The file system root of test files. + * Automatically deleted on {@link #tearDown()}. + * Tests should create new files only inside this directory. + */ + protected String myTestRoot + + /** + * The file system root of the project. All project should locate inside this directory. + */ + protected String myProjectRoot + + protected GitMockProject myProject + protected PlatformFacade myPlatformFacade + protected Git myGit + + @Before + protected void setUp() { + myTestRoot = FileUtil.createTempDirectory("", "").getPath() + cd myTestRoot + myProjectRoot = mkdir ("project") + myProject = new GitMockProject(myProjectRoot) + myPlatformFacade = new GitTestPlatformFacade() + myGit = new GitTestImpl() + } + + @After + protected void tearDown() { + FileUtil.delete(new File(myTestRoot)) + Disposer.dispose(myProject) + } + + protected GitRepository createRepository(String rootDir) { + initRepo(rootDir) + + // TODO this smells hacky + // the constructor and notifyListeners() should probably be private + // getPresentableUrl should probably be final, and we should have a better VirtualFile implementation for tests. + GitRepository repository = new GitRepositoryImpl(new GitMockVirtualFile(rootDir), myPlatformFacade, myProject, myProject, true) { + @Override + protected void notifyListeners() { + } + + @Override + String getPresentableUrl() { + return rootDir; + } + } + + registerRepository(repository) + + return repository + } + + /** + * Clones the given source repository into a bare parent.git and adds the remote origin. + */ + protected void prepareRemoteRepo(GitRepository source, String target = "parent.git", String targetName = "origin") { + cd myTestRoot + git("clone --bare $source $target") + cd source + git("remote add $targetName $myTestRoot/$target"); + } + + private void registerRepository(GitRepositoryImpl repository) { + ((GitTestRepositoryManager)myPlatformFacade.getRepositoryManager(myProject)).add(repository) + } + + private void initRepo(String repoRoot) { + cd repoRoot + git("init") + setupUsername(); + touch("file.txt") + git("add file.txt") + git("commit -m initial") + } + + private void setupUsername() { git("config user.name $USER_NAME") git("config user.email $USER_EMAIL") } diff --git a/plugins/git4idea/tests/git4idea/test/GitScenarios.groovy b/plugins/git4idea/tests/git4idea/test/GitScenarios.groovy index 1d1b345f95d7..3a1ede9b586d 100644 --- a/plugins/git4idea/tests/git4idea/test/GitScenarios.groovy +++ b/plugins/git4idea/tests/git4idea/test/GitScenarios.groovy @@ -135,7 +135,7 @@ class GitScenarios { def prepend(String fileName, String content) { def previousContent = cat(fileName) - new File(myCurrentDir, fileName).withWriter("UTF-8") { it.write(content + previousContent) } + new File(ourCurrentDir, fileName).withWriter("UTF-8") { it.write(content + previousContent) } } } diff --git a/plugins/git4idea/tests/git4idea/tests/GitBranchTest.java b/plugins/git4idea/tests/git4idea/tests/GitBranchTest.java deleted file mode 100644 index 3c8d28d4918c..000000000000 --- a/plugins/git4idea/tests/git4idea/tests/GitBranchTest.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright 2000-2010 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 git4idea.tests; - -import com.intellij.openapi.vcs.VcsException; -import com.intellij.openapi.vfs.VirtualFile; -import git4idea.GitBranch; -import git4idea.test.GitTestUtil; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -import java.io.IOException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.Iterator; -import java.util.List; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNull; -import static org.testng.Assert.assertTrue; - -/** - * @author Kirill Likhodedov - */ -public class GitBranchTest extends GitTest { - - private List myBranches; - private VirtualFile myDir; - private TestBranch myFeatureBranch; - - @BeforeMethod - @Override - public void setUp(Method testMethod) throws Exception { - super.setUp(testMethod); - GitTestUtil.createFileStructure(myProject, myRepo, "a.txt", "b.txt", "dir/c.txt", "dir/subdir/d.txt"); - myRepo.commit(); - myRepo.push("origin", "master"); - - myBrotherRepo.pull(); - myBrotherRepo.createBranch("feature"); - createFileInCommand(myBrotherRepo.getVFRootDir(), "feature.txt", "feature content"); - myBrotherRepo.addCommit(); - myBrotherRepo.push("--all"); - - myBrotherRepo.createBranch("eap"); - createFileInCommand(myBrotherRepo.getVFRootDir(), "eap.txt", "eap content"); - myBrotherRepo.addCommit(); - myBrotherRepo.push("--all"); - - myRepo.pull(); - myRepo.createBranch("my_feature"); - - String[] branches = myRepo.branch("-a").split("\n"); - myBranches = new ArrayList(branches.length); - for (String b : branches) { - boolean current = b.charAt(0) == '*'; - b = b.substring(2); - final boolean remote = b.startsWith("remotes"); // we don't store the 'remote' prefix. Instead we store a boolean flag. - if (remote) { - b = b.substring("remotes/".length()); - } - TestBranch branch = new TestBranch(current, !remote, b); - if (current) { - myFeatureBranch = branch; // it is current at the end of setUp. - } - myBranches.add(branch); - } - myDir = myRepo.getVFRootDir(); - } - - @Test - public void testListAsStrings() throws VcsException { - List branches = new ArrayList(); - GitBranch.listAsStrings(myProject, myDir, true, true, branches, null); - assertEqualBranchStringLists(branches, myBranches); - } - - @Test - public void testListAsStringsWithNoActiveBranch() throws VcsException, IOException { - checkoutRemoteBranch(); - - List branches = new ArrayList(); - GitBranch.listAsStrings(myProject, myDir, true, true, branches, null); - assertEqualBranchStringLists(branches, myBranches); - } - - @Test - public void testList() throws VcsException { - List branches = new ArrayList(); - GitBranch.list(myProject, myDir, true, true, branches, null); - assertEqualBranchLists(branches, myBranches); - } - - @Test - public void testListWithNoActiveBranch() throws VcsException, IOException { - checkoutRemoteBranch(); - - List branches = new ArrayList(); - GitBranch.list(myProject, myDir, true, true, branches, null); - assertEqualBranchLists(branches, myBranches); - } - - @Test - public void testCurrent() throws VcsException { - final GitBranch current = GitBranch.current(myProject, myDir); - assertEqualBranches(current, new TestBranch(true, true, "my_feature")); - } - - @Test - public void testCurrentWithNoActiveBranch() throws VcsException, IOException { - checkoutRemoteBranch(); - assertNull(GitBranch.current(myProject, myDir)); - } - - private void checkoutRemoteBranch() throws IOException { - myRepo.checkout("remotes/origin/feature"); - myFeatureBranch.isCurrent = false; - } - - private static void assertEqualBranchStringLists(List actual, List expected) { - assertEquals(actual.size(), expected.size(), "Size differs. branches: [" + actual + "], myBranches: [" + expected + "]"); - for (TestBranch b : expected) { - assertTrue(actual.contains(b.name)); - } - } - - private static void assertEqualBranchLists(List actual, List expected) { - assertEquals(actual.size(), expected.size(), "Size differs. branches: [" + actual + "], myBranches: [" + expected + "]"); - Collections.sort(actual, new GitBranchComparator()); - Collections.sort(expected, new TestGitBranchComparator()); - for (Iterator ait = actual.iterator(), eit = expected.iterator(); ait.hasNext(); ) { - GitBranch gb = (GitBranch)ait.next(); - TestBranch tgb = (TestBranch)eit.next(); - assertEqualBranches(gb, tgb); - } - } - - private static void assertEqualBranches(GitBranch gb, TestBranch tgb) { - assertEquals(gb.getName(), tgb.name); - assertEquals(gb.isActive(), tgb.isCurrent); - assertEquals(gb.isRemote(), !tgb.isLocal); - } - - private static class TestBranch { - boolean isCurrent; - boolean isLocal; // false if remote - String name; - TestBranch(boolean current, boolean local, String name) { - isCurrent = current; - isLocal = local; - this.name = name; - } - @Override public String toString() { - return name; - } - } - - private static class GitBranchComparator implements Comparator { - @Override - public int compare(GitBranch o1, GitBranch o2) { - return o1.getName().compareTo(o2.getName()); - } - } - - private static class TestGitBranchComparator implements Comparator { - @Override - public int compare(TestBranch o1, TestBranch o2) { - return o1.name.compareTo(o2.name); - } - } - -} diff --git a/plugins/github/src/org/jetbrains/plugins/github/GithubOpenInBrowserAction.java b/plugins/github/src/org/jetbrains/plugins/github/GithubOpenInBrowserAction.java index a249d6d752b1..88d6066ce7ff 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/GithubOpenInBrowserAction.java +++ b/plugins/github/src/org/jetbrains/plugins/github/GithubOpenInBrowserAction.java @@ -29,6 +29,7 @@ import com.intellij.openapi.vcs.changes.ChangeListManager; import com.intellij.openapi.vfs.VirtualFile; import git4idea.GitBranch; import git4idea.GitUtil; +import git4idea.branch.GitBranchUtil; import git4idea.repo.GitRepository; import git4idea.repo.GitRepositoryManager; import icons.GithubIcons; @@ -144,12 +145,12 @@ public class GithubOpenInBrowserAction extends DumbAwareAction { public static String getBranchNameOnRemote(@NotNull Project project, @NotNull VirtualFile root) { final GitBranch tracked; try { - final GitBranch current = GitBranch.current(project, root); + final GitBranch current = GitBranchUtil.getCurrentBranch(project, root); if (current == null) { Messages.showErrorDialog(project, "Cannot find local branch", CANNOT_OPEN_IN_BROWSER); return null; } - tracked = current.tracked(project, root); + tracked = GitBranchUtil.tracked(project, root, current.getName()); if (tracked == null || !tracked.isRemote()) { Messages.showErrorDialog(project, "Cannot find tracked branch for branch: " + current.getFullName(), CANNOT_OPEN_IN_BROWSER); return null; diff --git a/plugins/github/src/org/jetbrains/plugins/github/ui/GithubRebaseDialog.java b/plugins/github/src/org/jetbrains/plugins/github/ui/GithubRebaseDialog.java index b6c8e0085261..e7250f82e6c0 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/ui/GithubRebaseDialog.java +++ b/plugins/github/src/org/jetbrains/plugins/github/ui/GithubRebaseDialog.java @@ -16,9 +16,9 @@ package org.jetbrains.plugins.github.ui; import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.VcsException; import com.intellij.openapi.vfs.VirtualFile; import git4idea.GitBranch; +import git4idea.branch.GitBranchUtil; import git4idea.rebase.GitRebaseDialog; import git4idea.util.GitUIUtil; import org.jetbrains.annotations.NotNull; @@ -60,14 +60,9 @@ public class GithubRebaseDialog extends GitRebaseDialog { // Preselect remote master GitBranch remoteBranch = null; String currentLocalBranchName = null; - try { - final GitBranch currentBranch = GitBranch.current(myProject, gitRoot()); - if (currentBranch != null) { - currentLocalBranchName = currentBranch.getName(); - } - } - catch (VcsException e) { - // Do noting; + final GitBranch currentBranch = GitBranchUtil.getCurrentBranch(myProject, gitRoot()); + if (currentBranch != null) { + currentLocalBranchName = currentBranch.getName(); } if (currentLocalBranchName != null) { diff --git a/plugins/groovy/src/META-INF/plugin.xml b/plugins/groovy/src/META-INF/plugin.xml index a46ba6a79b5b..33c5a667db96 100644 --- a/plugins/groovy/src/META-INF/plugin.xml +++ b/plugins/groovy/src/META-INF/plugin.xml @@ -71,6 +71,8 @@ + + diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/codeInspection/declaration/GrMethodMayBeStaticInspection.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/codeInspection/declaration/GrMethodMayBeStaticInspection.java index 0c4ee5533ef8..063cba59f6d4 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/codeInspection/declaration/GrMethodMayBeStaticInspection.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/codeInspection/declaration/GrMethodMayBeStaticInspection.java @@ -144,6 +144,12 @@ public class GrMethodMayBeStaticInspection extends BaseInspection { if (method.getName().equals("propertyMissing") && (parameters.length == 2 || parameters.length == 1)) return true; if (method.getName().equals("methodMissing") && (parameters.length == 2 || parameters.length == 1)) return true; + for (GrMethodMayBeStaticInspectionFilter filter : GrMethodMayBeStaticInspectionFilter.EP_NAME.getExtensions()) { + if (filter.isIgnored(method)) { + return true; + } + } + return false; } diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/codeInspection/declaration/GrMethodMayBeStaticInspectionFilter.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/codeInspection/declaration/GrMethodMayBeStaticInspectionFilter.java new file mode 100644 index 000000000000..2e3555480ada --- /dev/null +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/codeInspection/declaration/GrMethodMayBeStaticInspectionFilter.java @@ -0,0 +1,32 @@ +/* + * Copyright 2000-2012 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 org.jetbrains.plugins.groovy.codeInspection.declaration; + +import com.intellij.openapi.extensions.ExtensionPointName; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.plugins.groovy.lang.psi.api.statements.typedef.members.GrMethod; + +/** + * @author Sergey Evdokimov + */ +public abstract class GrMethodMayBeStaticInspectionFilter { + + public static final ExtensionPointName EP_NAME = + new ExtensionPointName("org.intellij.groovy.methodMayBeStaticInspectionFilter"); + + public abstract boolean isIgnored(@NotNull GrMethod method); + +} diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/command/HgMergeCommand.java b/plugins/hg4idea/src/org/zmlx/hg4idea/command/HgMergeCommand.java index 6f0233650f3d..d1b83b76777d 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/command/HgMergeCommand.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/command/HgMergeCommand.java @@ -19,6 +19,7 @@ import org.jetbrains.annotations.Nullable; import org.zmlx.hg4idea.HgVcs; import org.zmlx.hg4idea.execution.HgCommandExecutor; import org.zmlx.hg4idea.execution.HgCommandResult; +import org.zmlx.hg4idea.execution.HgDeleteModifyPromptHandler; import java.util.LinkedList; import java.util.List; @@ -55,7 +56,7 @@ public class HgMergeCommand { } else if (!StringUtil.isEmptyOrSpaces(branch)) { arguments.add(branch); } - final HgCommandResult result = commandExecutor.executeInCurrentThread(repo, "merge", arguments); + final HgCommandResult result = commandExecutor.executeInCurrentThread(repo, "merge", arguments, new HgDeleteModifyPromptHandler()); project.getMessageBus().syncPublisher(HgVcs.BRANCH_TOPIC).update(project); return result; } diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/execution/HgCommandExecutor.java b/plugins/hg4idea/src/org/zmlx/hg4idea/execution/HgCommandExecutor.java index 575cb123fcb8..be2354b95320 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/execution/HgCommandExecutor.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/execution/HgCommandExecutor.java @@ -295,9 +295,9 @@ public final class HgCommandExecutor { choicePresentationArray[i] = choices[i].toString(); } index[0] = Messages - .showChooseDialog(message, "hg4idea", - choicePresentationArray, - defaultChoice.toString(), Messages.getQuestionIcon()); + .showDialog(message, "hg4idea", + choicePresentationArray, + defaultChoice.getChosenIndex(), Messages.getQuestionIcon()); } }); diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/execution/HgDeleteModifyPromptHandler.java b/plugins/hg4idea/src/org/zmlx/hg4idea/execution/HgDeleteModifyPromptHandler.java index 1402d6b735f3..91c3f50a2570 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/execution/HgDeleteModifyPromptHandler.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/execution/HgDeleteModifyPromptHandler.java @@ -57,7 +57,7 @@ public class HgDeleteModifyPromptHandler implements HgPromptHandler { "File " + filename + " is deleted remotely, but modified locally. Do you want to keep the modified version or remove the file?"; } else { - modifiedMessage = ""; + modifiedMessage = message; } final int[] chosen = new int[]{-1}; try { @@ -69,9 +69,9 @@ public class HgDeleteModifyPromptHandler implements HgPromptHandler { choicePresentationArray[i] = choices[i].toString(); } chosen[0] = Messages - .showChooseDialog(modifiedMessage, "Delete-Modify Conflict", - choicePresentationArray, - defaultChoice.toString(), Messages.getQuestionIcon()); + .showDialog(modifiedMessage, "Delete-Modify Conflict", + choicePresentationArray, defaultChoice.getChosenIndex(), + Messages.getQuestionIcon()); } }); } diff --git a/xml/impl/src/com/intellij/application/options/XmlCodeStyleSettingsProvider.java b/xml/impl/src/com/intellij/application/options/XmlCodeStyleSettingsProvider.java index 2162de19f63a..62ae4f803b35 100644 --- a/xml/impl/src/com/intellij/application/options/XmlCodeStyleSettingsProvider.java +++ b/xml/impl/src/com/intellij/application/options/XmlCodeStyleSettingsProvider.java @@ -27,6 +27,9 @@ import org.jetbrains.annotations.NotNull; * @author yole */ public class XmlCodeStyleSettingsProvider extends CodeStyleSettingsProvider { + + public static final String CONFIGURABLE_DISPLAY_NAME = ApplicationBundle.message("title.xml"); + @NotNull public Configurable createSettingsPage(final CodeStyleSettings settings, final CodeStyleSettings originalSettings) { return new CodeStyleAbstractConfigurable(settings, originalSettings, ApplicationBundle.message("title.xml")){ @@ -42,7 +45,7 @@ public class XmlCodeStyleSettingsProvider extends CodeStyleSettingsProvider { @Override public String getConfigurableDisplayName() { - return ApplicationBundle.message("title.xml"); + return CONFIGURABLE_DISPLAY_NAME; } @Override