From 2ceb7ad719aaece59eccdd6a7cd624953bceaee6 Mon Sep 17 00:00:00 2001 From: nixel2007 Date: Sun, 29 Dec 2024 23:06:25 +0000 Subject: [PATCH] deploy: ec574967c6cfbf703e85079ac04a42159a790923 --- .../results/descriptions/Code_Inspection.json | 758 ++-- qodana/results/metaInformation.json | 4 +- .../results/projectStructure/qodana.spdx.json | 8 +- .../thirdPartySoftwareList.json | 8 +- qodana/results/promo.json | 64 +- qodana/results/qodana.sarif.json | 3250 +++++++++-------- qodana/results/sanity.json | 64 +- 7 files changed, 2166 insertions(+), 1990 deletions(-) diff --git a/qodana/results/descriptions/Code_Inspection.json b/qodana/results/descriptions/Code_Inspection.json index 1b35bcba0ce..6f7d9f7a48f 100644 --- a/qodana/results/descriptions/Code_Inspection.json +++ b/qodana/results/descriptions/Code_Inspection.json @@ -128,18 +128,18 @@ "enabled": false, "description": "Reports calls to `assertTrue()` and `assertFalse()` that can be replaced with assert equality functions.\n\n\n`assertEquals()`, `assertSame()`, and their negating counterparts (-Not-) provide more informative messages on\nfailure.\n\n**Example:**\n\n assertTrue(a == b)\n\nAfter the quick-fix is applied:\n\n assertEquals(a, b)\n" }, - { - "shortName": "ReplaceNotNullAssertionWithElvisReturn", - "displayName": "Not-null assertion can be replaced with 'return'", - "enabled": false, - "description": "Reports not-null assertion (`!!`) calls that can be replaced with the elvis operator and return (`?: return`).\n\nA not-null assertion can lead to NPE (NullPointerException) that is not expected. Avoiding the use of `!!` is good practice.\n\nThe quick-fix replaces the not-null assertion with `return` or `return null`.\n\n**Example:**\n\n\n fun test(number: Int?) {\n val x = number!!\n }\n\nAfter the quick-fix is applied:\n\n\n fun test(number: Int?) {\n val x = number ?: return\n }\n" - }, { "shortName": "ReplaceStringFormatWithLiteral", "displayName": "'String.format' call can be replaced with string templates", "enabled": false, "description": "Reports `String.format` calls that can be replaced with string templates.\n\nUsing string templates makes your code simpler.\n\nThe quick-fix replaces the call with a string template.\n\n**Example:**\n\n\n fun main() {\n val id = \"abc\"\n val date = \"123\"\n val s = String.format(\"%s_%s_%s\", id, date, id)\n }\n\nAfter the quick-fix is applied:\n\n\n fun main() {\n val id = \"abc\"\n val date = \"123\"\n val s = \"${id}_${date}_$id\"\n }\n" }, + { + "shortName": "ReplaceNotNullAssertionWithElvisReturn", + "displayName": "Not-null assertion can be replaced with 'return'", + "enabled": false, + "description": "Reports not-null assertion (`!!`) calls that can be replaced with the elvis operator and return (`?: return`).\n\nA not-null assertion can lead to NPE (NullPointerException) that is not expected. Avoiding the use of `!!` is good practice.\n\nThe quick-fix replaces the not-null assertion with `return` or `return null`.\n\n**Example:**\n\n\n fun test(number: Int?) {\n val x = number!!\n }\n\nAfter the quick-fix is applied:\n\n\n fun test(number: Int?) {\n val x = number ?: return\n }\n" + }, { "shortName": "ReplaceSubstringWithSubstringBefore", "displayName": "'substring' call should be replaced with 'substringBefore'", @@ -1169,18 +1169,18 @@ "enabled": false, "description": "Reports method and constructor calls that implicitly use the platform default charset. Such calls can produce different results on systems that use a different default charset and may result in unexpected behaviour.\n\n**Example:**\n\n void foo(byte[] bytes) {\n String s = new String(bytes);\n }\n\nYou can use a quick-fix that specifies the explicit UTF-8 charset if the corresponding overloaded method is available.\nAfter the quick-fix is applied:\n\n void foo(byte[] bytes) {\n String s = new String(bytes, StandardCharsets.UTF_8);\n }\n" }, - { - "shortName": "UnnecessaryUnicodeEscape", - "displayName": "Unnecessary unicode escape sequence", - "enabled": false, - "description": "Reports unnecessary unicode escape sequences. For example, when the file encoding can handle the character without escaping it. Unicode control characters are not reported by this inspection (except for a line feed and a tab).\n\n**Example:**\n\n String s = \"\\u0062\";\n" - }, { "shortName": "StringTokenizer", "displayName": "Use of 'StringTokenizer'", "enabled": false, "description": "Reports usages of the `StringTokenizer` class. Excessive use of `StringTokenizer` is incorrect in an internationalized environment." }, + { + "shortName": "UnnecessaryUnicodeEscape", + "displayName": "Unnecessary unicode escape sequence", + "enabled": false, + "description": "Reports unnecessary unicode escape sequences. For example, when the file encoding can handle the character without escaping it. Unicode control characters are not reported by this inspection (except for a line feed and a tab).\n\n**Example:**\n\n String s = \"\\u0062\";\n" + }, { "shortName": "NumericToString", "displayName": "Call to 'Number.toString()'", @@ -3195,18 +3195,18 @@ "enabled": true, "description": "Reports calls to `StringBuffer` and `StringBuilder` constructors with `char` as the argument. In this case, `char` is silently cast to an integer and interpreted as the initial capacity of the buffer.\n\n**Example:**\n\n\n new StringBuilder('(').append(\"1\").append(')');\n\nAfter the quick-fix is applied:\n\n\n new StringBuilder(\"(\").append(\"1\").append(')');\n" }, - { - "shortName": "ResultOfObjectAllocationIgnored", - "displayName": "Result of object allocation ignored", - "enabled": false, - "description": "Reports object allocations where the allocated object is ignored and neither assigned to a variable nor used in another way.\n\n\nSuch allocation expressions are legal in Java, but are usually either unintended, or\nevidence of a very odd object initialization strategy.\n\n\nUse the options to list classes whose allocations should be ignored by this inspection." - }, { "shortName": "ClassGetClass", "displayName": "Suspicious 'Class.getClass()' call", "enabled": true, "description": "Reports `getClass()` methods that are called on a `java.lang.Class` instance.\n\nThis is usually a mistake as the result is always equivalent to `Class.class`.\nIf it's a mistake, then it's better to remove the `getClass()` call and use the qualifier directly.\nIf the behavior is intended, then it's better to write `Class.class` explicitly to avoid confusion.\n\nExample:\n\n\n void test(Class clazz) {\n String name = clazz.getClass().getName();\n }\n\nAfter one of the possible quick-fixes is applied:\n\n\n void test(Class clazz) {\n String name = clazz.getName();\n }\n\nNew in 2018.2" }, + { + "shortName": "ResultOfObjectAllocationIgnored", + "displayName": "Result of object allocation ignored", + "enabled": false, + "description": "Reports object allocations where the allocated object is ignored and neither assigned to a variable nor used in another way.\n\n\nSuch allocation expressions are legal in Java, but are usually either unintended, or\nevidence of a very odd object initialization strategy.\n\n\nUse the options to list classes whose allocations should be ignored by this inspection." + }, { "shortName": "MismatchedStringBuilderQueryUpdate", "displayName": "Mismatched query and update of 'StringBuilder'", @@ -3765,18 +3765,18 @@ "enabled": true, "description": "Reports expressions and conditions that always produce the same result, like true, false, null, or zero. Such expressions could be replaced with the corresponding constant value. Very often though they signal about a bug in the code.\n\nExamples:\n\n // always true\n // root cause: || is used instead of &&\n if (x > 0 || x < 10) {}\n\n System.out.println(str.trim());\n // always false\n // root cause: variable was dereferenced before null-check\n if (str == null) {}\n\n\nThe inspection behavior may be controlled by a number of annotations, such as\n[nullability](https://www.jetbrains.com/help/idea/nullable-and-notnull-annotations.html) annotations,\n[@Contract](https://www.jetbrains.com/help/idea/contract-annotations.html) annotation,\n`@Range` annotation and so on.\n\nConfigure the inspection:\n\n* Use the **Don't report assertions with condition statically proven to be always true** option to avoid reporting assertions that were statically proven to be always true. This also includes conditions like `if (alwaysFalseCondition) throw new IllegalArgumentException();`.\n* Use the **Ignore assert statements** option to control how the inspection treats `assert` statements. By default, the option is disabled, which means that the assertions are assumed to be executed (-ea mode). If the option is enabled, the assertions will be completely ignored (-da mode).\n* Use the **Warn when constant is stored in variable** option to display warnings when variable is used, whose value is known to be a constant.\n\n\nBefore IntelliJ IDEA 2022.3, this inspection was part of \"Constant Conditions \\& Exceptions\" inspection. Now, it split into two inspections:\n\"Constant Values\" and \"Nullability and data flow problems\"." }, - { - "shortName": "EqualsAndHashcode", - "displayName": "'equals()' and 'hashCode()' not paired", - "enabled": false, - "description": "Reports classes that override the `equals()` method but do not override the `hashCode()` method or vice versa, which can potentially lead to problems when the class is added to a `Collection` or a `HashMap`.\n\nThe quick-fix generates the default implementation for an absent method.\n\nExample:\n\n\n class StringHolder {\n String s;\n\n @Override public int hashCode() {\n return s != null ? s.hashCode() : 0;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class StringHolder {\n String s;\n\n @Override public int hashCode() {\n return s != null ? s.hashCode() : 0;\n }\n\n @Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof StringHolder)) return false;\n\n StringHolder holder = (StringHolder)o;\n\n if (s != null ? !s.equals(holder.s) : holder.s != null) return false;\n\n return true;\n }\n }\n" - }, { "shortName": "IteratorHasNextCallsIteratorNext", "displayName": "'Iterator.hasNext()' which calls 'next()'", "enabled": true, "description": "Reports implementations of `Iterator.hasNext()` or `ListIterator.hasPrevious()` that call `Iterator.next()` or `ListIterator.previous()` on the iterator instance. Such calls are almost certainly an error, as methods like `hasNext()` should not modify the iterators state, while `next()` should.\n\n**Example:**\n\n\n class MyIterator implements Iterator {\n public boolean hasNext() {\n return next() != null;\n }\n }\n" }, + { + "shortName": "EqualsAndHashcode", + "displayName": "'equals()' and 'hashCode()' not paired", + "enabled": false, + "description": "Reports classes that override the `equals()` method but do not override the `hashCode()` method or vice versa, which can potentially lead to problems when the class is added to a `Collection` or a `HashMap`.\n\nThe quick-fix generates the default implementation for an absent method.\n\nExample:\n\n\n class StringHolder {\n String s;\n\n @Override public int hashCode() {\n return s != null ? s.hashCode() : 0;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class StringHolder {\n String s;\n\n @Override public int hashCode() {\n return s != null ? s.hashCode() : 0;\n }\n\n @Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof StringHolder)) return false;\n\n StringHolder holder = (StringHolder)o;\n\n if (s != null ? !s.equals(holder.s) : holder.s != null) return false;\n\n return true;\n }\n }\n" + }, { "shortName": "MathRoundingWithIntArgument", "displayName": "Call math rounding with 'int' argument", @@ -4750,18 +4750,18 @@ "enabled": false, "description": "Reports non-final fields in enumeration types. Non-final fields introduce global mutable state, which is generally considered undesirable.\n\n**Example:**\n\n\n enum Enum {\n FIRST(\"first\"),\n SECOND(\"second\");\n\n public String str;\n\n Enum(String str) {\n this.str = str;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n enum Enum {\n FIRST(\"first\"),\n SECOND(\"second\");\n\n public final String str;\n\n Enum(String str) {\n this.str = str;\n }\n }\n\nUse the \\`Ignore fields that cannot be made 'final'\\` option to only warn on fields that can be made final using the quick-fix." }, - { - "shortName": "Singleton", - "displayName": "Singleton", - "enabled": false, - "description": "Reports singleton classes.\n\nSingleton classes are declared in a way that only one instance of the class can ever be instantiated. Singleton classes complicate testing,\nand their presence may indicate a lack of object-oriented design.\n\n**Example:**\n\n\n class Singleton {\n private static final Singleton ourInstance = new Singleton();\n\n private Singleton() {\n }\n\n public Singleton getInstance() {\n return ourInstance;\n }\n }\n" - }, { "shortName": "NonFinalUtilityClass", "displayName": "Utility class is not 'final'", "enabled": false, "description": "Reports utility classes that aren't `final` or `abstract`.\n\nUtility classes have all fields and methods declared as `static`.\nMaking them `final` prevents them from being accidentally subclassed.\n\n**Example:**\n\n\n public class UtilityClass {\n public static void foo() {}\n }\n\nAfter the quick-fix is applied:\n\n\n public final class UtilityClass {\n public static void foo() {}\n }\n" }, + { + "shortName": "Singleton", + "displayName": "Singleton", + "enabled": false, + "description": "Reports singleton classes.\n\nSingleton classes are declared in a way that only one instance of the class can ever be instantiated. Singleton classes complicate testing,\nand their presence may indicate a lack of object-oriented design.\n\n**Example:**\n\n\n class Singleton {\n private static final Singleton ourInstance = new Singleton();\n\n private Singleton() {\n }\n\n public Singleton getInstance() {\n return ourInstance;\n }\n }\n" + }, { "shortName": "ParameterCanBeLocal", "displayName": "Value passed as parameter never read", @@ -4907,96 +4907,96 @@ ] }, { - "name": "Maven", + "name": "JSON and JSON5", "inspections": [ { - "shortName": "MavenDuplicatePluginInspection", - "displayName": "Duplicate plugin declaration", + "shortName": "MongoDBJsonDuplicatePropertyKeys", + "displayName": "Duplicate keys in object literals", "enabled": false, - "description": "Reports the duplication of the plugin declaration in pom.xml" + "description": "Reports a duplicate key in an object literal." }, { - "shortName": "MavenPropertyInParent", - "displayName": "Usage of properties in parent description", + "shortName": "JsonSchemaCompliance", + "displayName": "Compliance with JSON schema", "enabled": false, - "description": "Reports that the usage of properties in modules parent definition is prohibited" + "description": "Reports inconsistence between a JSON file and the [JSON schema](https://json-schema.org) that is assigned to it. " }, { - "shortName": "MavenDuplicateDependenciesInspection", - "displayName": "Duplicate Dependencies", + "shortName": "JsonStandardCompliance", + "displayName": "Compliance with JSON standard", "enabled": false, - "description": "Reports duplicate dependencies" + "description": "Reports the following discrepancies of a JSON file with [the language specification](https://tools.ietf.org/html/rfc7159):\n\n* A line or block comment (configurable).\n* Multiple top-level values (expect for JSON Lines files, configurable for others).\n* A trailing comma in an object or array (configurable).\n* A single quoted string.\n* A property key is a not a double quoted strings.\n* A NaN or Infinity/-Infinity numeric value as a floating point literal (configurable)." }, { - "shortName": "MavenModelInspection", - "displayName": "Maven Model Inspection", + "shortName": "JsonSchemaRefReference", + "displayName": "Unresolved '$ref' and '$schema' references", "enabled": false, - "description": "Reports resolution problems in a Maven model" + "description": "Reports an unresolved `$ref` or `$schema` path in a JSON schema. " }, { - "shortName": "MavenParentMissedVersionInspection", - "displayName": "Parent version missed", + "shortName": "Json5StandardCompliance", + "displayName": "Compliance with JSON5 standard", "enabled": false, - "description": "Reports the absence of the parent version element for versions that do not support consumer POM feature" + "description": "Reports inconsistency with [the language specification](http://json5.org) in a JSON5 file." }, { - "shortName": "MavenRedundantGroupId", - "displayName": "Redundant groupId", + "shortName": "JsonSchemaDeprecation", + "displayName": "Deprecated JSON property", "enabled": false, - "description": "Reports the unnecessary \\ definition since it is already defined in the parent pom.xml" + "description": "Reports a deprecated property in a JSON file. \nNote that deprecation mechanism is not defined in the JSON Schema specification yet, and this inspection uses a non-standard extension 'deprecationMessage'." }, { - "shortName": "MavenCoroutinesDeprecation", - "displayName": "Incompatible kotlinx.coroutines dependency is used with Kotlin 1.3+ in Maven", + "shortName": "JsonDuplicatePropertyKeys", + "displayName": "Duplicate keys in object literals", "enabled": false, - "description": "Reports **kotlinx.coroutines** library dependencies in Maven that should be updated in order to be compatible with Kotlin 1.3 and later." + "description": "Reports a duplicate key in an object literal." } ] }, { - "name": "JSON and JSON5", + "name": "Maven", "inspections": [ { - "shortName": "MongoDBJsonDuplicatePropertyKeys", - "displayName": "Duplicate keys in object literals", + "shortName": "MavenDuplicatePluginInspection", + "displayName": "Duplicate plugin declaration", "enabled": false, - "description": "Reports a duplicate key in an object literal." + "description": "Reports the duplication of the plugin declaration in pom.xml" }, { - "shortName": "JsonSchemaCompliance", - "displayName": "Compliance with JSON schema", + "shortName": "MavenPropertyInParent", + "displayName": "Usage of properties in parent description", "enabled": false, - "description": "Reports inconsistence between a JSON file and the [JSON schema](https://json-schema.org) that is assigned to it. " + "description": "Reports that the usage of properties in modules parent definition is prohibited" }, { - "shortName": "JsonStandardCompliance", - "displayName": "Compliance with JSON standard", + "shortName": "MavenDuplicateDependenciesInspection", + "displayName": "Duplicate Dependencies", "enabled": false, - "description": "Reports the following discrepancies of a JSON file with [the language specification](https://tools.ietf.org/html/rfc7159):\n\n* A line or block comment (configurable).\n* Multiple top-level values (expect for JSON Lines files, configurable for others).\n* A trailing comma in an object or array (configurable).\n* A single quoted string.\n* A property key is a not a double quoted strings.\n* A NaN or Infinity/-Infinity numeric value as a floating point literal (configurable)." + "description": "Reports duplicate dependencies" }, { - "shortName": "JsonSchemaRefReference", - "displayName": "Unresolved '$ref' and '$schema' references", + "shortName": "MavenModelInspection", + "displayName": "Maven Model Inspection", "enabled": false, - "description": "Reports an unresolved `$ref` or `$schema` path in a JSON schema. " + "description": "Reports resolution problems in a Maven model" }, { - "shortName": "Json5StandardCompliance", - "displayName": "Compliance with JSON5 standard", + "shortName": "MavenParentMissedVersionInspection", + "displayName": "Parent version missed", "enabled": false, - "description": "Reports inconsistency with [the language specification](http://json5.org) in a JSON5 file." + "description": "Reports the absence of the parent version element for versions that do not support consumer POM feature" }, { - "shortName": "JsonSchemaDeprecation", - "displayName": "Deprecated JSON property", + "shortName": "MavenRedundantGroupId", + "displayName": "Redundant groupId", "enabled": false, - "description": "Reports a deprecated property in a JSON file. \nNote that deprecation mechanism is not defined in the JSON Schema specification yet, and this inspection uses a non-standard extension 'deprecationMessage'." + "description": "Reports the unnecessary \\ definition since it is already defined in the parent pom.xml" }, { - "shortName": "JsonDuplicatePropertyKeys", - "displayName": "Duplicate keys in object literals", + "shortName": "MavenCoroutinesDeprecation", + "displayName": "Incompatible kotlinx.coroutines dependency is used with Kotlin 1.3+ in Maven", "enabled": false, - "description": "Reports a duplicate key in an object literal." + "description": "Reports **kotlinx.coroutines** library dependencies in Maven that should be updated in order to be compatible with Kotlin 1.3 and later." } ] }, @@ -5176,18 +5176,18 @@ "enabled": true, "description": "Reports classes that refer to their subclasses in static initializers or static fields.\n\nSuch references can cause JVM-level deadlocks in multithreaded environment, when one thread tries to load the superclass\nand another thread tries to load the subclass at the same time.\n\n**Example:**\n\n\n class Parent {\n static final Child field = new Child();\n }\n class Child extends Parent { }\n" }, - { - "shortName": "WaitCalledOnCondition", - "displayName": "'wait()' called on 'java.util.concurrent.locks.Condition' object", - "enabled": false, - "description": "Reports calls 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.\n\n**Example:**\n\n\n void acquire(Condition released) throws InterruptedException {\n while (acquired) {\n released.wait();\n }\n }\n\nGood code would look like this:\n\n\n void acquire(Condition released) throws InterruptedException {\n while (acquired) {\n released.await();\n }\n }\n" - }, { "shortName": "NonSynchronizedMethodOverridesSynchronizedMethod", "displayName": "Unsynchronized method overrides 'synchronized' method", "enabled": false, "description": "Reports non-`synchronized` methods overriding `synchronized` methods.\n\n\nThe overridden method will not be automatically synchronized if the superclass method\nis declared as `synchronized`. This may result in unexpected race conditions when using the subclass.\n\n**Example:**\n\n\n class Super {\n synchronized void process() {}\n }\n class Sub extends Super {\n // Unsynchronized method 'process()' overrides synchronized method\n void process() {}\n } \n" }, + { + "shortName": "WaitCalledOnCondition", + "displayName": "'wait()' called on 'java.util.concurrent.locks.Condition' object", + "enabled": false, + "description": "Reports calls 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.\n\n**Example:**\n\n\n void acquire(Condition released) throws InterruptedException {\n while (acquired) {\n released.wait();\n }\n }\n\nGood code would look like this:\n\n\n void acquire(Condition released) throws InterruptedException {\n while (acquired) {\n released.await();\n }\n }\n" + }, { "shortName": "WaitNotifyNotInSynchronizedContext", "displayName": "'wait()' or 'notify()' is not in synchronized context", @@ -5448,179 +5448,6 @@ } ] }, - { - "name": "Numeric issues", - "inspections": [ - { - "shortName": "RemoveLiteralUnderscores", - "displayName": "Underscores in numeric literal", - "enabled": false, - "description": "Reports numeric literals with underscores and suggests removing them with a quick-fix. This may be useful if you need to lower the language level.\n\nThe quick-fix removes underscores from numeric literals. For example `1_000_000` will be converted to `1000000`.\n\n\n*Numeric literals with underscores* appeared in Java 7.\nThis inspection can help to downgrade for backward compatibility with earlier Java versions.\n\nNew in 2020.2" - }, - { - "shortName": "BadOddness", - "displayName": "Suspicious oddness check", - "enabled": false, - "description": "Reports odd-even checks of the following form: `x % 2 == 1`. Such checks fail when used with negative odd values. Consider using `x % 2 != 0` or `(x & 1) == 1` instead." - }, - { - "shortName": "InsertLiteralUnderscores", - "displayName": "Unreadable numeric literal", - "enabled": false, - "description": "Reports long numeric literals without underscores and suggests adding them. Underscores make such literals easier to read.\n\nExample:\n\n\n 1000000\n\nAfter the quick-fix is applied:\n\n\n 1_000_000\n\nThis inspection only reports if the language level of the project of module is 7 or higher.\n\nNew in 2020.2" - }, - { - "shortName": "ConfusingFloatingPointLiteral", - "displayName": "Confusing floating-point literal", - "enabled": false, - "description": "Reports any floating point numbers that don't have a decimal point, numbers before the decimal point, or numbers after the decimal point.\n\nSuch literals may be confusing, and violate several coding standards.\n\n**Example:**\n\n double d = .03;\n\nAfter the quick-fix is applied:\n\n double d = 0.03;\n\n\nUse the **Ignore floating point literals in scientific notation** option to ignore floating point numbers in scientific notation." - }, - { - "shortName": "OctalAndDecimalIntegersMixed", - "displayName": "Octal and decimal integers in same array", - "enabled": false, - "description": "Reports mixed octal and decimal integer literals in a single array initializer. This situation might happen when you copy a list of numbers into an array initializer. Some numbers in the array might be zero-padded and the compiler will interpret them as octal.\n\n**Example:**\n\n int[] elapsed = {1, 13, 052};\n\nAfter the quick-fix that removes a leading zero is applied:\n\n int[] elapsed = {1, 13, 52};\n\nIf it is an octal number (for example, after a variable inline), then you can use another quick-fix that converts octal to decimal:\n`int[] elapsed = {1, 13, 42};`" - }, - { - "shortName": "UnnecessaryUnaryMinus", - "displayName": "Unnecessary unary minus", - "enabled": true, - "description": "Reports unnecessary unary minuses. Such expressions might be hard to understand and might contain errors.\n\n**For example:**\n\n void unaryMinus(int i) {\n int x = - -i;\n }\n\nThe following quick fixes are suggested here:\n\n* Remove `-` operators before the `i` variable:\n\n void unaryMinus(int i) {\n int x = i;\n }\n\n* Replace `-` operators with the prefix decrement operator:\n\n void unaryMinus(int i) {\n int x = --i;\n }\n\n**Another example:**\n\n void unaryMinus(int i) {\n i += - 8;\n }\n\nAfter the quick-fix is applied:\n\n void unaryMinus(int i) {\n i -= 8;\n }\n" - }, - { - "shortName": "LossyConversionCompoundAssignment", - "displayName": "Possibly lossy implicit cast in compound assignment", - "enabled": true, - "description": "Reports compound assignments if the type of the right-hand operand is not assignment compatible with the type of the variable.\n\n\nDuring such compound assignments, an implicit cast occurs, potentially resulting in lossy conversions.\n\nExample:\n\n\n long c = 1;\n c += 1.2;\n\nAfter the quick-fix is applied:\n\n\n long c = 1;\n c += (long) 1.2;\n\nNew in 2023.2" - }, - { - "shortName": "NegativeIntConstantInLongContext", - "displayName": "Negative int hexadecimal constant in long context", - "enabled": true, - "description": "Reports negative int hexadecimal constants in long context. Such constants are implicitly widened to long, which means their higher bits will become 1 rather than 0 (e.g., 0xFFFF_FFFF will become 0xFFFF_FFFF_FFFF_FFFFL). Unlikely this is intended, and even if it is, using an explicit long constant would be less confusing.\n\n**Example:**\n\n\n // Warning: this is int constant -1 which is widened to long\n // becoming 0xFFFF_FFFF_FFFF_FFFFL.\n long mask = 0xFFFF_FFFF;\n\nNew in 2022.3" - }, - { - "shortName": "ImplicitNumericConversion", - "displayName": "Implicit numeric conversion", - "enabled": false, - "description": "Reports implicit conversion between numeric types.\n\nImplicit numeric conversion is not a problem in itself but, if unexpected, may cause difficulties when tracing bugs.\n\n**Example:**\n\n\n double m(int i) {\n return i * 10;\n }\n\nAfter the quick-fix is applied:\n\n\n double m(int i) {\n return (double) (i * 10);\n }\n\nConfigure the inspection:\n\n* Use the **Ignore widening conversions** option to ignore implicit conversion that cannot result in data loss (for example, `int`-\\>`long`).\n* Use the **Ignore conversions from and to 'char'** option to ignore conversion from and to `char`. The inspection will still report conversion from and to floating-point numbers.\n* Use the **Ignore conversion from constants and literals** to make the inspection ignore conversion from literals and compile-time constants." - }, - { - "shortName": "OctalLiteral", - "displayName": "Octal integer", - "enabled": true, - "description": "Reports octal integer literals. Some coding standards prohibit the use of octal literals, as they may be easily confused with decimal literals.\n\nExample:\n\n\n int i = 015;\n int j = 0_777;\n\nThis inspection has two different quick-fixes.\nAfter the **Convert octal literal to decimal literal** quick-fix is applied, the code changes to:\n\n\n int i = 13;\n int j = 511;\n\nAfter the **Remove leading zero to make decimal** quick-fix is applied, the code changes to:\n\n\n int i = 15;\n int j = 777;\n" - }, - { - "shortName": "NumericOverflow", - "displayName": "Numeric overflow", - "enabled": true, - "description": "Reports expressions that overflow during computation. Usually, this happens by accident and indicates a bug. For example, a wrong type is used or a shift should be done in an opposite direction .\n\n**Examples:**\n\n\n float a = 1.0f/0.0f;\n long b = 30 * 24 * 60 * 60 * 1000;\n long c = 1000L << 62;\n" - }, - { - "shortName": "SuspiciousLiteralUnderscore", - "displayName": "Suspicious underscore in number literal", - "enabled": false, - "description": "Reports decimal number literals that use the underscore numeric separator with groups where the number of digits is not three. Such literals may contain a typo.\n\nThis inspection will not warn on literals containing two consecutive underscores.\nIt is also allowed to omit underscores in the fractional part of `double` and `float` literals.\n\n**Example:** `int oneMillion = 1_000_0000;`" - }, - { - "shortName": "ComparisonOfShortAndChar", - "displayName": "Comparison of 'short' and 'char' values", - "enabled": true, - "description": "Reports equality comparisons between `short` and `char` values.\n\nSuch comparisons may cause subtle bugs because while both values are 2-byte long, `short` values are\nsigned, and `char` values are unsigned.\n\n**Example:**\n\n\n if (Character.MAX_VALUE == shortValue()) {} //never can be true\n" - }, - { - "shortName": "DivideByZero", - "displayName": "Division by zero", - "enabled": true, - "description": "Reports division by zero or remainder by zero. Such expressions will produce an `Infinity`, `-Infinity` or `NaN` result for doubles or floats, and will throw an `ArithmeticException` for integers.\n\nWhen the expression has a `NaN` result, the fix suggests replacing the division expression with the `NaN` constant." - }, - { - "shortName": "ComparisonToNaN", - "displayName": "Comparison to 'Double.NaN' or 'Float.NaN'", - "enabled": true, - "description": "Reports any comparisons to `Double.NaN` or `Float.NaN`. Such comparisons are never meaningful, as NaN is not equal to anything, including itself. Use the `Double.isNaN()` or `Float.isNaN()` methods instead.\n\n**Example:**\n\n\n if (x == Double.NaN) {...}\n\nAfter the quick-fix is applied:\n\n\n if (Double.isNaN(x)) {...}\n" - }, - { - "shortName": "UnaryPlus", - "displayName": "Unary plus", - "enabled": true, - "description": "Reports usages of the `+` unary operator. The unary plus is usually a null operation, and its presence might represent a coding error. For example, in a combination with the increment operator (like in `+++`) or with the equal operator (like in `=+`).\n\n**Example:**\n\n\n void unaryPlus(int i) {\n int x = + +i;\n }\n\nThe following quick fixes are suggested:\n\n* Remove `+` operators before the `i` variable:\n\n\n void unaryPlus(int i) {\n int x = i;\n }\n\n* Replace `+` operators with the prefix increment operator:\n\n\n void unaryPlus(int i) {\n int x = ++i;\n }\n\n\nUse the checkbox below to report unary pluses that are used together with a binary or another unary expression.\nIt means the inspection will not report situations when a unary plus expression is used in array\ninitializer expressions or as a method argument." - }, - { - "shortName": "CachedNumberConstructorCall", - "displayName": "Number constructor call with primitive argument", - "enabled": true, - "description": "Reports instantiations of new `Long`, `Integer`, `Short`, or `Byte` objects that have a primitive `long`, `integer`, `short`, or `byte` argument.\n\nIt is recommended that you use the static method `valueOf()`\nintroduced in Java 5. By default, this method caches objects for values between -128 and\n127 inclusive.\n\n**Example:**\n\n\n Integer i = new Integer(1);\n Long l = new Long(1L);\n\nAfter the quick-fix is applied, the code changes to:\n\n\n Integer i = Integer.valueOf(1);\n Long l = Long.valueOf(1L);\n\nThis inspection only reports if the language level of the project or module is 5 or higher\n\n\nUse the **Ignore new number expressions with a String argument** option to ignore calls to number constructors with a `String` argument.\n\n\nUse the **Report only when constructor is @Deprecated** option to only report calls to deprecated constructors.\n`Long`, `Integer`, `Short` and `Byte` constructors are deprecated since JDK 9." - }, - { - "shortName": "PointlessArithmeticExpression", - "displayName": "Pointless arithmetic expression", - "enabled": true, - "description": "Reports pointless arithmetic expressions. Such expressions include adding or subtracting zero, multiplying by zero or one, and division by one.\n\nSuch expressions may be the result of automated refactorings and they are unlikely to be what the developer intended to do.\n\nThe quick-fix simplifies such expressions.\n\n**Example:**\n\n\n void f(int a) {\n int x = a - a;\n int y = a + 0;\n int res = x / x;\n }\n\nAfter the quick-fix is applied:\n\n\n void f(int a) {\n int x = 0;\n int y = a;\n int res = 1;\n }\n\n\nNote that in rare cases, the suggested replacement might not be completely equivalent to the original code\nfor all possible inputs. For example, the inspection suggests replacing `x / x` with `1`.\nHowever, if `x` is zero, the original code throws `ArithmeticException` or results in `NaN`.\nAlso, if `x` is `NaN`, then the result is also `NaN`. It's very unlikely that such behavior is intended." - }, - { - "shortName": "CharUsedInArithmeticContext", - "displayName": "'char' expression used in arithmetic context", - "enabled": false, - "description": "Reports expressions of the `char` type used in addition or subtraction expressions.\n\nSuch code is not necessarily an issue but may result in bugs (for example,\nif a string is expected).\n\n**Example:** `int a = 'a' + 42;`\n\nAfter the quick-fix is applied: `int a = (int) 'a' + 42;`\n\nFor the `String` context:\n\n int i1 = 1;\n int i2 = 2;\n System.out.println(i2 + '-' + i1 + \" = \" + (i2 - i1));\n\nAfter the quick-fix is applied:\n`System.out.println(i2 + \"-\" + i1 + \" = \" + (i2 - i1));`" - }, - { - "shortName": "UnpredictableBigDecimalConstructorCall", - "displayName": "Unpredictable 'BigDecimal' constructor call", - "enabled": true, - "description": "Reports calls to `BigDecimal` constructors that accept a `double` value. These constructors produce `BigDecimal` that is exactly equal to the supplied `double` value. However, because doubles are encoded in the IEEE 754 64-bit double-precision binary floating-point format, the exact value can be unexpected.\n\nFor example, `new BigDecimal(0.1)` yields a `BigDecimal` object. Its value is\n`0.1000000000000000055511151231257827021181583404541015625`\nwhich is the nearest number to 0.1 representable as a double.\nTo get `BigDecimal` that stores the same value as written in the source code,\nuse either `new BigDecimal(\"0.1\")` or `BigDecimal.valueOf(0.1)`.\n\n**Example:**\n\n\n class Constructor {\n void foo() {\n new BigDecimal(0.1);\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Constructor {\n void foo() {\n new BigDecimal(\"0.1\");\n }\n }\n" - }, - { - "shortName": "IntegerDivisionInFloatingPointContext", - "displayName": "Integer division in floating-point context", - "enabled": true, - "description": "Reports integer divisions where the result is used as a floating-point number. Such division is often an error and may have unexpected results due to the truncation that happens in integer division.\n\n**Example:**\n\n\n float x = 3.0F + 3 * 2 / 5;\n\nAfter the quick-fix is applied:\n\n\n float x = 3.0F + ((float) (3 * 2)) /5;\n" - }, - { - "shortName": "BigDecimalEquals", - "displayName": "'equals()' called on 'BigDecimal'", - "enabled": false, - "description": "Reports `equals()` calls that compare two `java.math.BigDecimal` numbers. This is normally a mistake, as two `java.math.BigDecimal` numbers are only equal if they are equal in both value and scale.\n\n**Example:**\n\n\n if (new BigDecimal(\"2.0\").equals(\n new BigDecimal(\"2.00\"))) {} // false\n\nAfter the quick-fix is applied:\n\n\n if (new BigDecimal(\"2.0\").compareTo(\n new BigDecimal(\"2.00\")) == 0) {} // true\n" - }, - { - "shortName": "ConstantMathCall", - "displayName": "Constant call to 'Math'", - "enabled": false, - "description": "Reports calls to `java.lang.Math` or `java.lang.StrictMath` methods that can be replaced with simple compile-time constants.\n\n**Example:**\n\n double v = Math.sin(0.0);\n\nAfter the quick-fix is applied:\n\n double v = 0.0;\n" - }, - { - "shortName": "NonReproducibleMathCall", - "displayName": "Non-reproducible call to 'Math'", - "enabled": false, - "description": "Reports calls to `java.lang.Math` methods, which results are not guaranteed to be reproduced precisely.\n\nIn environments where reproducibility of results is required, `java.lang.StrictMath`\nshould be used instead." - }, - { - "shortName": "FloatingPointEquality", - "displayName": "Floating-point equality comparison", - "enabled": false, - "description": "Reports floating-point values that are being compared using the `==` or `!=` operator.\n\nFloating-point values are inherently inaccurate, and comparing them for exact equality is seldom the desired semantics.\n\nThis inspection ignores comparisons with zero and infinity literals.\n\n**Example:**\n\n\n void m(double d1, double d2) {\n if (d1 == d2) {}\n }\n" - }, - { - "shortName": "LongLiteralsEndingWithLowercaseL", - "displayName": "'long' literal ending with 'l' instead of 'L'", - "enabled": true, - "description": "Reports `long` literals ending with lowercase 'l'. These literals may be confusing, as the lowercase 'l' looks very similar to a literal '1' (one).\n\n**Example:**\n\n\n long nights = 100l;\n\nAfter the quick-fix is applied:\n\n\n long nights = 100L;\n" - }, - { - "shortName": "BigDecimalMethodWithoutRoundingCalled", - "displayName": "Call to 'BigDecimal' method without a rounding mode argument", - "enabled": true, - "description": "Reports calls to `divide()` or `setScale()` without a rounding mode argument.\n\nSuch calls can lead to an `ArithmeticException` when the exact value cannot be represented in the result\n(for example, because it has a non-terminating decimal expansion).\n\nSpecifying a rounding mode prevents the `ArithmeticException`.\n\n**Example:**\n\n\n BigDecimal.valueOf(1).divide(BigDecimal.valueOf(3));\n" - }, - { - "shortName": "OverlyComplexArithmeticExpression", - "displayName": "Overly complex arithmetic expression", - "enabled": false, - "description": "Reports arithmetic expressions with the excessive number of terms. Such expressions might be hard to understand and might contain errors.\n\nParameters, field references, and other primary expressions are counted as a term.\n\n**Example:**\n\n int calc(int a, int b) {\n return a + a + a + b + b + b + b; // The line contains 7 terms and will be reported.\n }\n\nUse the field below to specify a number of terms allowed in arithmetic expressions." - } - ] - }, { "name": "Control flow issues", "inspections": [ @@ -6063,88 +5890,261 @@ "description": "Reports an `if` statement with too many branches. Such statements may be confusing, and often indicate inadequate levels of design abstraction.\n\n\nUse the field below to specify the maximum number of branches expected." }, { - "shortName": "UnnecessaryContinueJS", - "displayName": "Unnecessary 'continue' statement", - "enabled": false, - "description": "Reports an unnecessary `continue` statement at the end of a loop. Suggests removing such statements." + "shortName": "UnnecessaryContinueJS", + "displayName": "Unnecessary 'continue' statement", + "enabled": false, + "description": "Reports an unnecessary `continue` statement at the end of a loop. Suggests removing such statements." + }, + { + "shortName": "PointlessBooleanExpressionJS", + "displayName": "Pointless statement or boolean expression", + "enabled": false, + "description": "Reports a pointless or pointlessly complicated boolean expression or statement.\n\nExample:\n\n\n let a = !(false && x);\n let b = false || x;\n\nAfter the quick fix is applied the result looks like:\n\n\n let a = true;\n let b = x;\n" + }, + { + "shortName": "UnnecessaryLabelOnContinueStatementJS", + "displayName": "Unnecessary label on 'continue' statement", + "enabled": false, + "description": "Reports a labeled `continue` statement whose labels may be removed without changing the flow of control." + }, + { + "shortName": "ConditionalExpressionWithIdenticalBranchesJS", + "displayName": "Conditional expression with identical branches", + "enabled": false, + "description": "Reports a ternary conditional expression with identical `then` and `else` branches." + }, + { + "shortName": "UnnecessaryLabelOnBreakStatementJS", + "displayName": "Unnecessary label on 'break' statement", + "enabled": false, + "description": "Reports a labeled `break` statement whose labels may be removed without changing the flow of control." + }, + { + "shortName": "SuspiciousTypeOfGuard", + "displayName": "Unsound type guard check", + "enabled": false, + "description": "Reports a `typeof` or `instanceof` unsound type guard check. The `typeof x` type guard can be unsound in one of the following two cases:\n\n* `typeof x` never corresponds to the specified value (for example, `typeof x === 'number'` when `x` is of the type 'string \\| boolean')\n* `typeof x` always corresponds to the specified value (for example, `typeof x === 'string'` when `x` is of the type 'string')\n\nThe `x instanceof A` type guard can be unsound in one of the following two cases:\n\n* The type of `x` is not related to `A`\n* The type of `x` is `A` or a subtype of `A`" + }, + { + "shortName": "LoopStatementThatDoesntLoopJS", + "displayName": "Loop statement that doesn't loop", + "enabled": false, + "description": "Reports a `for`, `while`, or `do` statement whose bodies are guaranteed to execute at most once. Normally, this indicates an error." + }, + { + "shortName": "TailRecursionJS", + "displayName": "Tail recursion", + "enabled": false, + "description": "Reports a tail recursion, that is, when a function calls itself as its last action before returning. A tail recursion can always be replaced by looping, which will be considerably faster. Some JavaScript engines perform this optimization, while others do not. Thus, tail recursive solutions may have considerably different performance characteristics in different environments." + }, + { + "shortName": "DuplicateConditionJS", + "displayName": "Duplicate condition in 'if' statement", + "enabled": false, + "description": "Reports duplicate conditions in different branches of an `if` statement. Duplicate conditions usually represent programmer oversight.\n\nExample:\n\n\n if (a) {\n ...\n } else if (a) {\n ...\n }\n\n" + }, + { + "shortName": "UnnecessaryLabelJS", + "displayName": "Unnecessary label", + "enabled": false, + "description": "Reports an unused label." + }, + { + "shortName": "ForLoopReplaceableByWhileJS", + "displayName": "'for' loop may be replaced by 'while' loop", + "enabled": false, + "description": "Reports a `for` loop that contains neither initialization nor an update component. Suggests replacing the loop with a simpler `while` statement.\n\nExample:\n\n\n for(; exitCondition(); ) {\n process();\n }\n\nAfter the quick-fix is applied the result looks like:\n\n\n while(exitCondition()) {\n process();\n }\n\nUse the checkbox below if you wish this inspection to ignore **for** loops with trivial or non-existent conditions." + }, + { + "shortName": "ConstantConditionalExpressionJS", + "displayName": "Constant conditional expression", + "enabled": false, + "description": "Reports a conditional expression in the format `true? result1: result2` or `false? result1: result2``.\nSuggests simplifying the expression.\n`" + }, + { + "shortName": "JSObjectNullOrUndefined", + "displayName": "Object is 'null' or 'undefined'", + "enabled": false, + "description": "Reports an error caused by invoking a method, accessing a property, or calling a function on an object that is `undefined` or `null`." + }, + { + "shortName": "UnreachableCodeJS", + "displayName": "Unreachable code", + "enabled": false, + "description": "Reports code that can never be executed, which almost certainly indicates an error" + } + ] + }, + { + "name": "Numeric issues", + "inspections": [ + { + "shortName": "RemoveLiteralUnderscores", + "displayName": "Underscores in numeric literal", + "enabled": false, + "description": "Reports numeric literals with underscores and suggests removing them with a quick-fix. This may be useful if you need to lower the language level.\n\nThe quick-fix removes underscores from numeric literals. For example `1_000_000` will be converted to `1000000`.\n\n\n*Numeric literals with underscores* appeared in Java 7.\nThis inspection can help to downgrade for backward compatibility with earlier Java versions.\n\nNew in 2020.2" + }, + { + "shortName": "BadOddness", + "displayName": "Suspicious oddness check", + "enabled": false, + "description": "Reports odd-even checks of the following form: `x % 2 == 1`. Such checks fail when used with negative odd values. Consider using `x % 2 != 0` or `(x & 1) == 1` instead." + }, + { + "shortName": "InsertLiteralUnderscores", + "displayName": "Unreadable numeric literal", + "enabled": false, + "description": "Reports long numeric literals without underscores and suggests adding them. Underscores make such literals easier to read.\n\nExample:\n\n\n 1000000\n\nAfter the quick-fix is applied:\n\n\n 1_000_000\n\nThis inspection only reports if the language level of the project of module is 7 or higher.\n\nNew in 2020.2" + }, + { + "shortName": "ConfusingFloatingPointLiteral", + "displayName": "Confusing floating-point literal", + "enabled": false, + "description": "Reports any floating point numbers that don't have a decimal point, numbers before the decimal point, or numbers after the decimal point.\n\nSuch literals may be confusing, and violate several coding standards.\n\n**Example:**\n\n double d = .03;\n\nAfter the quick-fix is applied:\n\n double d = 0.03;\n\n\nUse the **Ignore floating point literals in scientific notation** option to ignore floating point numbers in scientific notation." + }, + { + "shortName": "OctalAndDecimalIntegersMixed", + "displayName": "Octal and decimal integers in same array", + "enabled": false, + "description": "Reports mixed octal and decimal integer literals in a single array initializer. This situation might happen when you copy a list of numbers into an array initializer. Some numbers in the array might be zero-padded and the compiler will interpret them as octal.\n\n**Example:**\n\n int[] elapsed = {1, 13, 052};\n\nAfter the quick-fix that removes a leading zero is applied:\n\n int[] elapsed = {1, 13, 52};\n\nIf it is an octal number (for example, after a variable inline), then you can use another quick-fix that converts octal to decimal:\n`int[] elapsed = {1, 13, 42};`" + }, + { + "shortName": "UnnecessaryUnaryMinus", + "displayName": "Unnecessary unary minus", + "enabled": true, + "description": "Reports unnecessary unary minuses. Such expressions might be hard to understand and might contain errors.\n\n**For example:**\n\n void unaryMinus(int i) {\n int x = - -i;\n }\n\nThe following quick fixes are suggested here:\n\n* Remove `-` operators before the `i` variable:\n\n void unaryMinus(int i) {\n int x = i;\n }\n\n* Replace `-` operators with the prefix decrement operator:\n\n void unaryMinus(int i) {\n int x = --i;\n }\n\n**Another example:**\n\n void unaryMinus(int i) {\n i += - 8;\n }\n\nAfter the quick-fix is applied:\n\n void unaryMinus(int i) {\n i -= 8;\n }\n" + }, + { + "shortName": "LossyConversionCompoundAssignment", + "displayName": "Possibly lossy implicit cast in compound assignment", + "enabled": true, + "description": "Reports compound assignments if the type of the right-hand operand is not assignment compatible with the type of the variable.\n\n\nDuring such compound assignments, an implicit cast occurs, potentially resulting in lossy conversions.\n\nExample:\n\n\n long c = 1;\n c += 1.2;\n\nAfter the quick-fix is applied:\n\n\n long c = 1;\n c += (long) 1.2;\n\nNew in 2023.2" + }, + { + "shortName": "NegativeIntConstantInLongContext", + "displayName": "Negative int hexadecimal constant in long context", + "enabled": true, + "description": "Reports negative int hexadecimal constants in long context. Such constants are implicitly widened to long, which means their higher bits will become 1 rather than 0 (e.g., 0xFFFF_FFFF will become 0xFFFF_FFFF_FFFF_FFFFL). Unlikely this is intended, and even if it is, using an explicit long constant would be less confusing.\n\n**Example:**\n\n\n // Warning: this is int constant -1 which is widened to long\n // becoming 0xFFFF_FFFF_FFFF_FFFFL.\n long mask = 0xFFFF_FFFF;\n\nNew in 2022.3" + }, + { + "shortName": "ImplicitNumericConversion", + "displayName": "Implicit numeric conversion", + "enabled": false, + "description": "Reports implicit conversion between numeric types.\n\nImplicit numeric conversion is not a problem in itself but, if unexpected, may cause difficulties when tracing bugs.\n\n**Example:**\n\n\n double m(int i) {\n return i * 10;\n }\n\nAfter the quick-fix is applied:\n\n\n double m(int i) {\n return (double) (i * 10);\n }\n\nConfigure the inspection:\n\n* Use the **Ignore widening conversions** option to ignore implicit conversion that cannot result in data loss (for example, `int`-\\>`long`).\n* Use the **Ignore conversions from and to 'char'** option to ignore conversion from and to `char`. The inspection will still report conversion from and to floating-point numbers.\n* Use the **Ignore conversion from constants and literals** to make the inspection ignore conversion from literals and compile-time constants." + }, + { + "shortName": "OctalLiteral", + "displayName": "Octal integer", + "enabled": true, + "description": "Reports octal integer literals. Some coding standards prohibit the use of octal literals, as they may be easily confused with decimal literals.\n\nExample:\n\n\n int i = 015;\n int j = 0_777;\n\nThis inspection has two different quick-fixes.\nAfter the **Convert octal literal to decimal literal** quick-fix is applied, the code changes to:\n\n\n int i = 13;\n int j = 511;\n\nAfter the **Remove leading zero to make decimal** quick-fix is applied, the code changes to:\n\n\n int i = 15;\n int j = 777;\n" + }, + { + "shortName": "NumericOverflow", + "displayName": "Numeric overflow", + "enabled": true, + "description": "Reports expressions that overflow during computation. Usually, this happens by accident and indicates a bug. For example, a wrong type is used or a shift should be done in an opposite direction .\n\n**Examples:**\n\n\n float a = 1.0f/0.0f;\n long b = 30 * 24 * 60 * 60 * 1000;\n long c = 1000L << 62;\n" + }, + { + "shortName": "SuspiciousLiteralUnderscore", + "displayName": "Suspicious underscore in number literal", + "enabled": false, + "description": "Reports decimal number literals that use the underscore numeric separator with groups where the number of digits is not three. Such literals may contain a typo.\n\nThis inspection will not warn on literals containing two consecutive underscores.\nIt is also allowed to omit underscores in the fractional part of `double` and `float` literals.\n\n**Example:** `int oneMillion = 1_000_0000;`" + }, + { + "shortName": "ComparisonOfShortAndChar", + "displayName": "Comparison of 'short' and 'char' values", + "enabled": true, + "description": "Reports equality comparisons between `short` and `char` values.\n\nSuch comparisons may cause subtle bugs because while both values are 2-byte long, `short` values are\nsigned, and `char` values are unsigned.\n\n**Example:**\n\n\n if (Character.MAX_VALUE == shortValue()) {} //never can be true\n" + }, + { + "shortName": "DivideByZero", + "displayName": "Division by zero", + "enabled": true, + "description": "Reports division by zero or remainder by zero. Such expressions will produce an `Infinity`, `-Infinity` or `NaN` result for doubles or floats, and will throw an `ArithmeticException` for integers.\n\nWhen the expression has a `NaN` result, the fix suggests replacing the division expression with the `NaN` constant." + }, + { + "shortName": "ComparisonToNaN", + "displayName": "Comparison to 'Double.NaN' or 'Float.NaN'", + "enabled": true, + "description": "Reports any comparisons to `Double.NaN` or `Float.NaN`. Such comparisons are never meaningful, as NaN is not equal to anything, including itself. Use the `Double.isNaN()` or `Float.isNaN()` methods instead.\n\n**Example:**\n\n\n if (x == Double.NaN) {...}\n\nAfter the quick-fix is applied:\n\n\n if (Double.isNaN(x)) {...}\n" }, { - "shortName": "PointlessBooleanExpressionJS", - "displayName": "Pointless statement or boolean expression", - "enabled": false, - "description": "Reports a pointless or pointlessly complicated boolean expression or statement.\n\nExample:\n\n\n let a = !(false && x);\n let b = false || x;\n\nAfter the quick fix is applied the result looks like:\n\n\n let a = true;\n let b = x;\n" + "shortName": "UnaryPlus", + "displayName": "Unary plus", + "enabled": true, + "description": "Reports usages of the `+` unary operator. The unary plus is usually a null operation, and its presence might represent a coding error. For example, in a combination with the increment operator (like in `+++`) or with the equal operator (like in `=+`).\n\n**Example:**\n\n\n void unaryPlus(int i) {\n int x = + +i;\n }\n\nThe following quick fixes are suggested:\n\n* Remove `+` operators before the `i` variable:\n\n\n void unaryPlus(int i) {\n int x = i;\n }\n\n* Replace `+` operators with the prefix increment operator:\n\n\n void unaryPlus(int i) {\n int x = ++i;\n }\n\n\nUse the checkbox below to report unary pluses that are used together with a binary or another unary expression.\nIt means the inspection will not report situations when a unary plus expression is used in array\ninitializer expressions or as a method argument." }, { - "shortName": "UnnecessaryLabelOnContinueStatementJS", - "displayName": "Unnecessary label on 'continue' statement", - "enabled": false, - "description": "Reports a labeled `continue` statement whose labels may be removed without changing the flow of control." + "shortName": "CachedNumberConstructorCall", + "displayName": "Number constructor call with primitive argument", + "enabled": true, + "description": "Reports instantiations of new `Long`, `Integer`, `Short`, or `Byte` objects that have a primitive `long`, `integer`, `short`, or `byte` argument.\n\nIt is recommended that you use the static method `valueOf()`\nintroduced in Java 5. By default, this method caches objects for values between -128 and\n127 inclusive.\n\n**Example:**\n\n\n Integer i = new Integer(1);\n Long l = new Long(1L);\n\nAfter the quick-fix is applied, the code changes to:\n\n\n Integer i = Integer.valueOf(1);\n Long l = Long.valueOf(1L);\n\nThis inspection only reports if the language level of the project or module is 5 or higher\n\n\nUse the **Ignore new number expressions with a String argument** option to ignore calls to number constructors with a `String` argument.\n\n\nUse the **Report only when constructor is @Deprecated** option to only report calls to deprecated constructors.\n`Long`, `Integer`, `Short` and `Byte` constructors are deprecated since JDK 9." }, { - "shortName": "ConditionalExpressionWithIdenticalBranchesJS", - "displayName": "Conditional expression with identical branches", - "enabled": false, - "description": "Reports a ternary conditional expression with identical `then` and `else` branches." + "shortName": "PointlessArithmeticExpression", + "displayName": "Pointless arithmetic expression", + "enabled": true, + "description": "Reports pointless arithmetic expressions. Such expressions include adding or subtracting zero, multiplying by zero or one, and division by one.\n\nSuch expressions may be the result of automated refactorings and they are unlikely to be what the developer intended to do.\n\nThe quick-fix simplifies such expressions.\n\n**Example:**\n\n\n void f(int a) {\n int x = a - a;\n int y = a + 0;\n int res = x / x;\n }\n\nAfter the quick-fix is applied:\n\n\n void f(int a) {\n int x = 0;\n int y = a;\n int res = 1;\n }\n\n\nNote that in rare cases, the suggested replacement might not be completely equivalent to the original code\nfor all possible inputs. For example, the inspection suggests replacing `x / x` with `1`.\nHowever, if `x` is zero, the original code throws `ArithmeticException` or results in `NaN`.\nAlso, if `x` is `NaN`, then the result is also `NaN`. It's very unlikely that such behavior is intended." }, { - "shortName": "UnnecessaryLabelOnBreakStatementJS", - "displayName": "Unnecessary label on 'break' statement", + "shortName": "CharUsedInArithmeticContext", + "displayName": "'char' expression used in arithmetic context", "enabled": false, - "description": "Reports a labeled `break` statement whose labels may be removed without changing the flow of control." + "description": "Reports expressions of the `char` type used in addition or subtraction expressions.\n\nSuch code is not necessarily an issue but may result in bugs (for example,\nif a string is expected).\n\n**Example:** `int a = 'a' + 42;`\n\nAfter the quick-fix is applied: `int a = (int) 'a' + 42;`\n\nFor the `String` context:\n\n int i1 = 1;\n int i2 = 2;\n System.out.println(i2 + '-' + i1 + \" = \" + (i2 - i1));\n\nAfter the quick-fix is applied:\n`System.out.println(i2 + \"-\" + i1 + \" = \" + (i2 - i1));`" }, { - "shortName": "SuspiciousTypeOfGuard", - "displayName": "Unsound type guard check", - "enabled": false, - "description": "Reports a `typeof` or `instanceof` unsound type guard check. The `typeof x` type guard can be unsound in one of the following two cases:\n\n* `typeof x` never corresponds to the specified value (for example, `typeof x === 'number'` when `x` is of the type 'string \\| boolean')\n* `typeof x` always corresponds to the specified value (for example, `typeof x === 'string'` when `x` is of the type 'string')\n\nThe `x instanceof A` type guard can be unsound in one of the following two cases:\n\n* The type of `x` is not related to `A`\n* The type of `x` is `A` or a subtype of `A`" + "shortName": "UnpredictableBigDecimalConstructorCall", + "displayName": "Unpredictable 'BigDecimal' constructor call", + "enabled": true, + "description": "Reports calls to `BigDecimal` constructors that accept a `double` value. These constructors produce `BigDecimal` that is exactly equal to the supplied `double` value. However, because doubles are encoded in the IEEE 754 64-bit double-precision binary floating-point format, the exact value can be unexpected.\n\nFor example, `new BigDecimal(0.1)` yields a `BigDecimal` object. Its value is\n`0.1000000000000000055511151231257827021181583404541015625`\nwhich is the nearest number to 0.1 representable as a double.\nTo get `BigDecimal` that stores the same value as written in the source code,\nuse either `new BigDecimal(\"0.1\")` or `BigDecimal.valueOf(0.1)`.\n\n**Example:**\n\n\n class Constructor {\n void foo() {\n new BigDecimal(0.1);\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Constructor {\n void foo() {\n new BigDecimal(\"0.1\");\n }\n }\n" }, { - "shortName": "LoopStatementThatDoesntLoopJS", - "displayName": "Loop statement that doesn't loop", - "enabled": false, - "description": "Reports a `for`, `while`, or `do` statement whose bodies are guaranteed to execute at most once. Normally, this indicates an error." + "shortName": "IntegerDivisionInFloatingPointContext", + "displayName": "Integer division in floating-point context", + "enabled": true, + "description": "Reports integer divisions where the result is used as a floating-point number. Such division is often an error and may have unexpected results due to the truncation that happens in integer division.\n\n**Example:**\n\n\n float x = 3.0F + 3 * 2 / 5;\n\nAfter the quick-fix is applied:\n\n\n float x = 3.0F + ((float) (3 * 2)) /5;\n" }, { - "shortName": "TailRecursionJS", - "displayName": "Tail recursion", + "shortName": "BigDecimalEquals", + "displayName": "'equals()' called on 'BigDecimal'", "enabled": false, - "description": "Reports a tail recursion, that is, when a function calls itself as its last action before returning. A tail recursion can always be replaced by looping, which will be considerably faster. Some JavaScript engines perform this optimization, while others do not. Thus, tail recursive solutions may have considerably different performance characteristics in different environments." + "description": "Reports `equals()` calls that compare two `java.math.BigDecimal` numbers. This is normally a mistake, as two `java.math.BigDecimal` numbers are only equal if they are equal in both value and scale.\n\n**Example:**\n\n\n if (new BigDecimal(\"2.0\").equals(\n new BigDecimal(\"2.00\"))) {} // false\n\nAfter the quick-fix is applied:\n\n\n if (new BigDecimal(\"2.0\").compareTo(\n new BigDecimal(\"2.00\")) == 0) {} // true\n" }, { - "shortName": "DuplicateConditionJS", - "displayName": "Duplicate condition in 'if' statement", + "shortName": "ConstantMathCall", + "displayName": "Constant call to 'Math'", "enabled": false, - "description": "Reports duplicate conditions in different branches of an `if` statement. Duplicate conditions usually represent programmer oversight.\n\nExample:\n\n\n if (a) {\n ...\n } else if (a) {\n ...\n }\n\n" + "description": "Reports calls to `java.lang.Math` or `java.lang.StrictMath` methods that can be replaced with simple compile-time constants.\n\n**Example:**\n\n double v = Math.sin(0.0);\n\nAfter the quick-fix is applied:\n\n double v = 0.0;\n" }, { - "shortName": "UnnecessaryLabelJS", - "displayName": "Unnecessary label", + "shortName": "NonReproducibleMathCall", + "displayName": "Non-reproducible call to 'Math'", "enabled": false, - "description": "Reports an unused label." + "description": "Reports calls to `java.lang.Math` methods, which results are not guaranteed to be reproduced precisely.\n\nIn environments where reproducibility of results is required, `java.lang.StrictMath`\nshould be used instead." }, { - "shortName": "ForLoopReplaceableByWhileJS", - "displayName": "'for' loop may be replaced by 'while' loop", + "shortName": "FloatingPointEquality", + "displayName": "Floating-point equality comparison", "enabled": false, - "description": "Reports a `for` loop that contains neither initialization nor an update component. Suggests replacing the loop with a simpler `while` statement.\n\nExample:\n\n\n for(; exitCondition(); ) {\n process();\n }\n\nAfter the quick-fix is applied the result looks like:\n\n\n while(exitCondition()) {\n process();\n }\n\nUse the checkbox below if you wish this inspection to ignore **for** loops with trivial or non-existent conditions." + "description": "Reports floating-point values that are being compared using the `==` or `!=` operator.\n\nFloating-point values are inherently inaccurate, and comparing them for exact equality is seldom the desired semantics.\n\nThis inspection ignores comparisons with zero and infinity literals.\n\n**Example:**\n\n\n void m(double d1, double d2) {\n if (d1 == d2) {}\n }\n" }, { - "shortName": "ConstantConditionalExpressionJS", - "displayName": "Constant conditional expression", - "enabled": false, - "description": "Reports a conditional expression in the format `true? result1: result2` or `false? result1: result2``.\nSuggests simplifying the expression.\n`" + "shortName": "LongLiteralsEndingWithLowercaseL", + "displayName": "'long' literal ending with 'l' instead of 'L'", + "enabled": true, + "description": "Reports `long` literals ending with lowercase 'l'. These literals may be confusing, as the lowercase 'l' looks very similar to a literal '1' (one).\n\n**Example:**\n\n\n long nights = 100l;\n\nAfter the quick-fix is applied:\n\n\n long nights = 100L;\n" }, { - "shortName": "JSObjectNullOrUndefined", - "displayName": "Object is 'null' or 'undefined'", - "enabled": false, - "description": "Reports an error caused by invoking a method, accessing a property, or calling a function on an object that is `undefined` or `null`." + "shortName": "BigDecimalMethodWithoutRoundingCalled", + "displayName": "Call to 'BigDecimal' method without a rounding mode argument", + "enabled": true, + "description": "Reports calls to `divide()` or `setScale()` without a rounding mode argument.\n\nSuch calls can lead to an `ArithmeticException` when the exact value cannot be represented in the result\n(for example, because it has a non-terminating decimal expansion).\n\nSpecifying a rounding mode prevents the `ArithmeticException`.\n\n**Example:**\n\n\n BigDecimal.valueOf(1).divide(BigDecimal.valueOf(3));\n" }, { - "shortName": "UnreachableCodeJS", - "displayName": "Unreachable code", + "shortName": "OverlyComplexArithmeticExpression", + "displayName": "Overly complex arithmetic expression", "enabled": false, - "description": "Reports code that can never be executed, which almost certainly indicates an error" + "description": "Reports arithmetic expressions with the excessive number of terms. Such expressions might be hard to understand and might contain errors.\n\nParameters, field references, and other primary expressions are counted as a term.\n\n**Example:**\n\n int calc(int a, int b) {\n return a + a + a + b + b + b + b; // The line contains 7 terms and will be reported.\n }\n\nUse the field below to specify a number of terms allowed in arithmetic expressions." } ] }, @@ -9661,41 +9661,6 @@ } ] }, - { - "name": "Class", - "inspections": [ - { - "shortName": "ExceptionNameDoesntEndWithException", - "displayName": "Exception class name does not end with 'Exception'", - "enabled": false, - "description": "Reports exception classes whose names don't end with `Exception`.\n\n**Example:** `class NotStartedEx extends Exception {}`\n\nA quick-fix that renames such classes is available only in the editor." - }, - { - "shortName": "NewClassNamingConvention", - "displayName": "Class naming convention", - "enabled": false, - "description": "Reports classes whose names are too short, too long, or do not follow the specified regular expression pattern.\n\n**Example:** if the inspection is enabled for tests, and the specified length for the minimum class name is 8 (the default), the following test class\nproduces a warning because the length of its name is 6, which is less than 8: `public class MyTest{}`.\n\nA quick-fix that renames such classes is available only in the editor.\n\nConfigure the inspection:\n\n\nUse the list in the **Options** section to specify which classes should be checked. Deselect the checkboxes for the classes for which\nyou want to skip the check.\n\nFor each class type, specify the minimum length, maximum length, and the regular expression expected for class names using the\nprovided input fields. Specify **0** in the length fields to skip corresponding checks.\n\nRegular expressions should be specified in the standard `java.util.regex` format." - }, - { - "shortName": "NonExceptionNameEndsWithException", - "displayName": "Non-exception class name ends with 'Exception'", - "enabled": false, - "description": "Reports non-`exception` classes whose names end with `Exception`.\n\nSuch classes may cause confusion by breaking a common naming convention and\noften indicate that the `extends Exception` clause is missing.\n\n**Example:**\n\n public class NotStartedException {}\n\nA quick-fix that renames such classes is available only in the editor." - }, - { - "shortName": "ClassNameSameAsAncestorName", - "displayName": "Class name same as ancestor name", - "enabled": false, - "description": "Reports classes that have the same name as one of their superclasses, while their fully qualified names remain different. Such class names may be very confusing.\n\n**Example:**\n\n\n package util;\n abstract class Iterable implements java.lang.Iterable {}\n\nA quick-fix that renames such classes is available only in the editor." - }, - { - "shortName": "ClassNamePrefixedWithPackageName", - "displayName": "Class name prefixed with package name", - "enabled": false, - "description": "Reports classes whose names are prefixed with their package names, ignoring differences in capitalization.\n\nWhile occasionally having such names is reasonable, they are often used due to a poor naming scheme, may be redundant and\nannoying.\n\n**Example:**\n\n\n package byteCode;\n class ByteCodeAnalyzer {}\n\nA quick-fix that renames such classes is available only in the editor." - } - ] - }, { "name": "HTTP Client", "inspections": [ @@ -9773,6 +9738,41 @@ } ] }, + { + "name": "Class", + "inspections": [ + { + "shortName": "ExceptionNameDoesntEndWithException", + "displayName": "Exception class name does not end with 'Exception'", + "enabled": false, + "description": "Reports exception classes whose names don't end with `Exception`.\n\n**Example:** `class NotStartedEx extends Exception {}`\n\nA quick-fix that renames such classes is available only in the editor." + }, + { + "shortName": "NewClassNamingConvention", + "displayName": "Class naming convention", + "enabled": false, + "description": "Reports classes whose names are too short, too long, or do not follow the specified regular expression pattern.\n\n**Example:** if the inspection is enabled for tests, and the specified length for the minimum class name is 8 (the default), the following test class\nproduces a warning because the length of its name is 6, which is less than 8: `public class MyTest{}`.\n\nA quick-fix that renames such classes is available only in the editor.\n\nConfigure the inspection:\n\n\nUse the list in the **Options** section to specify which classes should be checked. Deselect the checkboxes for the classes for which\nyou want to skip the check.\n\nFor each class type, specify the minimum length, maximum length, and the regular expression expected for class names using the\nprovided input fields. Specify **0** in the length fields to skip corresponding checks.\n\nRegular expressions should be specified in the standard `java.util.regex` format." + }, + { + "shortName": "NonExceptionNameEndsWithException", + "displayName": "Non-exception class name ends with 'Exception'", + "enabled": false, + "description": "Reports non-`exception` classes whose names end with `Exception`.\n\nSuch classes may cause confusion by breaking a common naming convention and\noften indicate that the `extends Exception` clause is missing.\n\n**Example:**\n\n public class NotStartedException {}\n\nA quick-fix that renames such classes is available only in the editor." + }, + { + "shortName": "ClassNameSameAsAncestorName", + "displayName": "Class name same as ancestor name", + "enabled": false, + "description": "Reports classes that have the same name as one of their superclasses, while their fully qualified names remain different. Such class names may be very confusing.\n\n**Example:**\n\n\n package util;\n abstract class Iterable implements java.lang.Iterable {}\n\nA quick-fix that renames such classes is available only in the editor." + }, + { + "shortName": "ClassNamePrefixedWithPackageName", + "displayName": "Class name prefixed with package name", + "enabled": false, + "description": "Reports classes whose names are prefixed with their package names, ignoring differences in capitalization.\n\nWhile occasionally having such names is reasonable, they are often used due to a poor naming scheme, may be redundant and\nannoying.\n\n**Example:**\n\n\n package byteCode;\n class ByteCodeAnalyzer {}\n\nA quick-fix that renames such classes is available only in the editor." + } + ] + }, { "name": "Hibernate", "inspections": [ @@ -13189,47 +13189,6 @@ } ] }, - { - "name": "Imports and dependencies", - "inspections": [ - { - "shortName": "JSUrlImportUsage", - "displayName": "URL import is used", - "enabled": false, - "description": "Checks used URL imports in the JavaScript language. Suggests downloading the module for the specified remote URL. Such association enables the IDE to provide proper code completion and navigation. \n\nURLs in import specifiers are supported only for ECMAScript modules in the JavaScript language." - }, - { - "shortName": "JSXNamespaceValidation", - "displayName": "Missing JSX namespace", - "enabled": false, - "description": "Reports a usage of a JSX construction without importing namespace. Having the namespace in the file scope ensures proper code compilation." - }, - { - "shortName": "ES6UnusedImports", - "displayName": "Unused import", - "enabled": false, - "description": "Reports a redundant `import` statement. This is usually the case if the imported symbols are not used in the source file. To avoid side-effects, consider using bare import `import 'packageName'` instead of the regular one." - }, - { - "shortName": "NpmUsedModulesInstalled", - "displayName": "Missing module dependency", - "enabled": false, - "description": "Reports a module from a `require()` call or an `import` statement that is not installed or is not listed in package.json dependencies.\n\nSuggests installing the module and/or including it into package.json.\n\nFor `require()` calls, works only in the files from the scope of *Node.js Core* JavaScript library." - }, - { - "shortName": "PackageJsonMismatchedDependency", - "displayName": "Mismatched dependencies in package.json", - "enabled": false, - "description": "Reports a dependency from package.json that is not installed or doesn't match the specified [version range](https://docs.npmjs.com/about-semantic-versioning)." - }, - { - "shortName": "UpdateDependencyToLatestVersion", - "displayName": "Update package.json dependencies to latest versions", - "enabled": false, - "description": "Suggests to upgrade your package.json dependencies to the latest versions, ignoring specified versions." - } - ] - }, { "name": "Nullability problems", "inspections": [ @@ -13294,6 +13253,47 @@ } ] }, + { + "name": "Imports and dependencies", + "inspections": [ + { + "shortName": "JSUrlImportUsage", + "displayName": "URL import is used", + "enabled": false, + "description": "Checks used URL imports in the JavaScript language. Suggests downloading the module for the specified remote URL. Such association enables the IDE to provide proper code completion and navigation. \n\nURLs in import specifiers are supported only for ECMAScript modules in the JavaScript language." + }, + { + "shortName": "JSXNamespaceValidation", + "displayName": "Missing JSX namespace", + "enabled": false, + "description": "Reports a usage of a JSX construction without importing namespace. Having the namespace in the file scope ensures proper code compilation." + }, + { + "shortName": "ES6UnusedImports", + "displayName": "Unused import", + "enabled": false, + "description": "Reports a redundant `import` statement. This is usually the case if the imported symbols are not used in the source file. To avoid side-effects, consider using bare import `import 'packageName'` instead of the regular one." + }, + { + "shortName": "NpmUsedModulesInstalled", + "displayName": "Missing module dependency", + "enabled": false, + "description": "Reports a module from a `require()` call or an `import` statement that is not installed or is not listed in package.json dependencies.\n\nSuggests installing the module and/or including it into package.json.\n\nFor `require()` calls, works only in the files from the scope of *Node.js Core* JavaScript library." + }, + { + "shortName": "PackageJsonMismatchedDependency", + "displayName": "Mismatched dependencies in package.json", + "enabled": false, + "description": "Reports a dependency from package.json that is not installed or doesn't match the specified [version range](https://docs.npmjs.com/about-semantic-versioning)." + }, + { + "shortName": "UpdateDependencyToLatestVersion", + "displayName": "Update package.json dependencies to latest versions", + "enabled": false, + "description": "Suggests to upgrade your package.json dependencies to the latest versions, ignoring specified versions." + } + ] + }, { "name": "RELAX NG", "inspections": [ diff --git a/qodana/results/metaInformation.json b/qodana/results/metaInformation.json index 6e95be9b103..410b00b5c76 100644 --- a/qodana/results/metaInformation.json +++ b/qodana/results/metaInformation.json @@ -7,11 +7,11 @@ "linter": "QDJVM", "attributes": { "deviceId": "200820300000000-b1a5-d275-f8e7-faf9fd093ee8", - "jobUrl": "https://github.com/1c-syntax/bsl-language-server/actions/runs/12539319945", + "jobUrl": "https://github.com/1c-syntax/bsl-language-server/actions/runs/12539328004", "vcs": { "sarifIdea": { "repositoryUri": "https://github.com/1c-syntax/bsl-language-server.git", - "revisionId": "7f21ea3669a40590840d27cc811307d9322a538f", + "revisionId": "ec574967c6cfbf703e85079ac04a42159a790923", "branch": "develop" } }, diff --git a/qodana/results/projectStructure/qodana.spdx.json b/qodana/results/projectStructure/qodana.spdx.json index bdc8a15b698..0fe4c2ae0f4 100644 --- a/qodana/results/projectStructure/qodana.spdx.json +++ b/qodana/results/projectStructure/qodana.spdx.json @@ -9,7 +9,7 @@ "Tool: Qodana", "Organization: JetBrains s.r.o." ], - "created": "2024-12-29T23:02:50Z" + "created": "2024-12-29T23:05:38Z" }, "packages": [ { @@ -27,7 +27,7 @@ "checksums": [ { "algorithm": "SHA1", - "checksumValue": "7f21ea3669a40590840d27cc811307d9322a538f" + "checksumValue": "ec574967c6cfbf703e85079ac04a42159a790923" } ], "primaryPackagePurpose": "SOURCE" @@ -48,7 +48,7 @@ "checksums": [ { "algorithm": "SHA1", - "checksumValue": "7f21ea3669a40590840d27cc811307d9322a538f" + "checksumValue": "ec574967c6cfbf703e85079ac04a42159a790923" } ], "primaryPackagePurpose": "SOURCE" @@ -69,7 +69,7 @@ "checksums": [ { "algorithm": "SHA1", - "checksumValue": "7f21ea3669a40590840d27cc811307d9322a538f" + "checksumValue": "ec574967c6cfbf703e85079ac04a42159a790923" } ], "primaryPackagePurpose": "SOURCE" diff --git a/qodana/results/projectStructure/thirdPartySoftwareList.json b/qodana/results/projectStructure/thirdPartySoftwareList.json index bdc8a15b698..0fe4c2ae0f4 100644 --- a/qodana/results/projectStructure/thirdPartySoftwareList.json +++ b/qodana/results/projectStructure/thirdPartySoftwareList.json @@ -9,7 +9,7 @@ "Tool: Qodana", "Organization: JetBrains s.r.o." ], - "created": "2024-12-29T23:02:50Z" + "created": "2024-12-29T23:05:38Z" }, "packages": [ { @@ -27,7 +27,7 @@ "checksums": [ { "algorithm": "SHA1", - "checksumValue": "7f21ea3669a40590840d27cc811307d9322a538f" + "checksumValue": "ec574967c6cfbf703e85079ac04a42159a790923" } ], "primaryPackagePurpose": "SOURCE" @@ -48,7 +48,7 @@ "checksums": [ { "algorithm": "SHA1", - "checksumValue": "7f21ea3669a40590840d27cc811307d9322a538f" + "checksumValue": "ec574967c6cfbf703e85079ac04a42159a790923" } ], "primaryPackagePurpose": "SOURCE" @@ -69,7 +69,7 @@ "checksums": [ { "algorithm": "SHA1", - "checksumValue": "7f21ea3669a40590840d27cc811307d9322a538f" + "checksumValue": "ec574967c6cfbf703e85079ac04a42159a790923" } ], "primaryPackagePurpose": "SOURCE" diff --git a/qodana/results/promo.json b/qodana/results/promo.json index 31b4e97098c..84066098873 100644 --- a/qodana/results/promo.json +++ b/qodana/results/promo.json @@ -1 +1,63 @@ -{"version":"3","listProblem":[]} \ No newline at end of file +{"version":"3","listProblem":[{ + "tool": "Code Inspection", + "category": "RegExp", + "type": "Regular expression can be simplified", + "tags": [ + "RegExp" + ], + "severity": "Moderate", + "comment": "`[\\\\*]` can be simplified to '\\\\\\*'", + "detailsInfo": "Reports regular expressions that can be simplified.\n\n**Example:**\n\n\n [a] xx* [ah-hz]\n\nAfter the quick-fix is applied:\n\n\n a x+ [ahz]\n\nNew in 2022.1", + "sources": [ + { + "type": "file", + "path": "src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/UsingHardcodeSecretInformationDiagnostic.java", + "language": "JAVA", + "line": 67, + "offset": 75, + "length": 5, + "code": { + "startLine": 65, + "length": 5, + "offset": 80, + "surroundingCode": " );\n\n private static final Pattern PATTERN_CHECK_PASSWORD = Pattern.compile(\"^[\\\\*]+$\", Pattern.UNICODE_CASE);\n\n @DiagnosticParameter(" + } + } + ], + "attributes": { + "module": "bsl-language-server.main", + "inspectionName": "RegExpSimplifiable" + }, + "hash": "a96a0536e198cbff96eebc4edc9806807b12725ac46694da2501ad5bce236c55" +},{ + "tool": "Code Inspection", + "category": "Verbose or redundant code constructs", + "type": "Unnecessary 'default' for enum 'switch' statement", + "tags": [ + "JAVA" + ], + "severity": "High", + "comment": "`default` branch is unnecessary", + "detailsInfo": "Reports enum `switch` statements or expression with `default` branches which can never be taken, because all possible values are covered by a `case` branch.\n\nSuch elements are redundant, especially for `switch` expressions, because they don't compile when all\nenum constants are not covered by a `case` branch.\n\n\nThe language level needs to be configured to 14 to report `switch` expressions.\n\nThe provided quick-fix removes `default` branches.\n\nExample:\n\n\n enum E { A, B }\n int foo(E e) {\n return switch (e) {\n case A -> 1;\n case B -> 2;\n default -> 3;\n };\n }\n\nAfter the quick-fix is applied:\n\n\n enum E { A, B }\n int foo(E e) {\n return switch (e) {\n case A -> 1;\n case B -> 2;\n };\n }\n\nUse the **Only report switch expressions** option to report only redundant `default` branches in switch expressions.", + "sources": [ + { + "type": "file", + "path": "src/main/java/com/github/_1c_syntax/bsl/languageserver/utils/expressiontree/DefaultNodeEqualityComparer.java", + "language": "JAVA", + "line": 51, + "offset": 7, + "length": 7, + "code": { + "startLine": 49, + "length": 7, + "offset": 136, + "surroundingCode": " case SKIPPED_CALL_ARG -> true;\n case CALL -> callStatementsEqual((AbstractCallNode) first, (AbstractCallNode) second);\n default -> throw new IllegalStateException();\n };\n" + } + } + ], + "attributes": { + "module": "bsl-language-server.main", + "inspectionName": "UnnecessaryDefault" + }, + "hash": "2c72370b59dde2cbf1ea29e8feac3da6f729b7114f1766f8f09a515ec88ac90f" +}]} \ No newline at end of file diff --git a/qodana/results/qodana.sarif.json b/qodana/results/qodana.sarif.json index 908e9bf5468..202dc3ba633 100644 --- a/qodana/results/qodana.sarif.json +++ b/qodana/results/qodana.sarif.json @@ -362,14 +362,14 @@ } ] }, - { - "id": "Maven", - "name": "Maven" - }, { "id": "JSON and JSON5", "name": "JSON and JSON5" }, + { + "id": "Maven", + "name": "Maven" + }, { "id": "MySQL", "name": "MySQL" @@ -411,8 +411,8 @@ ] }, { - "id": "Java/Numeric issues", - "name": "Numeric issues", + "id": "Java/Control flow issues", + "name": "Control flow issues", "relationships": [ { "target": { @@ -429,8 +429,8 @@ ] }, { - "id": "Java/Control flow issues", - "name": "Control flow issues", + "id": "Java/Numeric issues", + "name": "Numeric issues", "relationships": [ { "target": { @@ -650,10 +650,6 @@ } ] }, - { - "id": "General", - "name": "General" - }, { "id": "Gradle", "name": "Gradle" @@ -665,7 +661,7 @@ { "target": { "id": "Gradle", - "index": 49, + "index": 48, "toolComponent": { "name": "QDJVM" } @@ -676,6 +672,10 @@ } ] }, + { + "id": "General", + "name": "General" + }, { "id": "FreeMarker", "name": "FreeMarker" @@ -709,7 +709,7 @@ { "target": { "id": "Gradle", - "index": 49, + "index": 48, "toolComponent": { "name": "QDJVM" } @@ -797,13 +797,13 @@ ] }, { - "id": "Groovy/Probable bugs", - "name": "Probable bugs", + "id": "Kotlin/Other problems", + "name": "Other problems", "relationships": [ { "target": { - "id": "Groovy", - "index": 22, + "id": "Kotlin", + "index": 1, "toolComponent": { "name": "QDJVM" } @@ -815,13 +815,13 @@ ] }, { - "id": "Kotlin/Other problems", - "name": "Other problems", + "id": "Groovy/Probable bugs", + "name": "Probable bugs", "relationships": [ { "target": { - "id": "Kotlin", - "index": 1, + "id": "Groovy", + "index": 22, "toolComponent": { "name": "QDJVM" } @@ -1068,6 +1068,10 @@ } ] }, + { + "id": "HTTP Client", + "name": "HTTP Client" + }, { "id": "Java/Naming conventions", "name": "Naming conventions", @@ -1093,7 +1097,7 @@ { "target": { "id": "Java/Naming conventions", - "index": 79, + "index": 80, "toolComponent": { "name": "QDJVM" } @@ -1104,10 +1108,6 @@ } ] }, - { - "id": "HTTP Client", - "name": "HTTP Client" - }, { "id": "Hibernate", "name": "Hibernate" @@ -1385,13 +1385,13 @@ "name": "JUnit" }, { - "id": "CSS/Probable bugs", - "name": "Probable bugs", + "id": "JavaScript and TypeScript/TypeScript", + "name": "TypeScript", "relationships": [ { "target": { - "id": "CSS", - "index": 72, + "id": "JavaScript and TypeScript", + "index": 18, "toolComponent": { "name": "QDJVM" } @@ -1403,13 +1403,13 @@ ] }, { - "id": "JavaScript and TypeScript/TypeScript", - "name": "TypeScript", + "id": "CSS/Probable bugs", + "name": "Probable bugs", "relationships": [ { "target": { - "id": "JavaScript and TypeScript", - "index": 18, + "id": "CSS", + "index": 72, "toolComponent": { "name": "QDJVM" } @@ -1485,7 +1485,7 @@ { "target": { "id": "Java/Naming conventions", - "index": 79, + "index": 80, "toolComponent": { "name": "QDJVM" } @@ -1959,7 +1959,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -2345,7 +2345,7 @@ { "target": { "id": "Gradle", - "index": 49, + "index": 48, "toolComponent": { "name": "QDJVM" } @@ -2379,13 +2379,13 @@ ] }, { - "id": "JavaScript and TypeScript/Imports and dependencies", - "name": "Imports and dependencies", + "id": "Java/Probable bugs/Nullability problems", + "name": "Nullability problems", "relationships": [ { "target": { - "id": "JavaScript and TypeScript", - "index": 18, + "id": "Java/Probable bugs", + "index": 15, "toolComponent": { "name": "QDJVM" } @@ -2397,13 +2397,13 @@ ] }, { - "id": "Java/Probable bugs/Nullability problems", - "name": "Nullability problems", + "id": "Spring/Spring Boot", + "name": "Spring Boot", "relationships": [ { "target": { - "id": "Java/Probable bugs", - "index": 15, + "id": "Spring", + "index": 8, "toolComponent": { "name": "QDJVM" } @@ -2415,13 +2415,13 @@ ] }, { - "id": "Spring/Spring Boot", - "name": "Spring Boot", + "id": "JavaScript and TypeScript/Imports and dependencies", + "name": "Imports and dependencies", "relationships": [ { "target": { - "id": "Spring", - "index": 8, + "id": "JavaScript and TypeScript", + "index": 18, "toolComponent": { "name": "QDJVM" } @@ -2893,7 +2893,7 @@ { "target": { "id": "Gradle", - "index": 49, + "index": 48, "toolComponent": { "name": "QDJVM" } @@ -3041,7 +3041,7 @@ { "target": { "id": "General", - "index": 48, + "index": 50, "toolComponent": { "name": "QDJVM" } @@ -3515,7 +3515,7 @@ { "target": { "id": "Kotlin/Other problems", - "index": 61, + "index": 60, "toolComponent": { "name": "QDJVM" } @@ -4088,21 +4088,21 @@ ] }, { - "id": "ReplaceNotNullAssertionWithElvisReturn", + "id": "ReplaceStringFormatWithLiteral", "shortDescription": { - "text": "Not-null assertion can be replaced with 'return'" + "text": "'String.format' call can be replaced with string templates" }, "fullDescription": { - "text": "Reports not-null assertion ('!!') calls that can be replaced with the elvis operator and return ('?: return'). A not-null assertion can lead to NPE (NullPointerException) that is not expected. Avoiding the use of '!!' is good practice. The quick-fix replaces the not-null assertion with 'return' or 'return null'. Example: 'fun test(number: Int?) {\n val x = number!!\n }' After the quick-fix is applied: 'fun test(number: Int?) {\n val x = number ?: return\n }'", - "markdown": "Reports not-null assertion (`!!`) calls that can be replaced with the elvis operator and return (`?: return`).\n\nA not-null assertion can lead to NPE (NullPointerException) that is not expected. Avoiding the use of `!!` is good practice.\n\nThe quick-fix replaces the not-null assertion with `return` or `return null`.\n\n**Example:**\n\n\n fun test(number: Int?) {\n val x = number!!\n }\n\nAfter the quick-fix is applied:\n\n\n fun test(number: Int?) {\n val x = number ?: return\n }\n" + "text": "Reports 'String.format' calls that can be replaced with string templates. Using string templates makes your code simpler. The quick-fix replaces the call with a string template. Example: 'fun main() {\n val id = \"abc\"\n val date = \"123\"\n val s = String.format(\"%s_%s_%s\", id, date, id)\n }' After the quick-fix is applied: 'fun main() {\n val id = \"abc\"\n val date = \"123\"\n val s = \"${id}_${date}_$id\"\n }'", + "markdown": "Reports `String.format` calls that can be replaced with string templates.\n\nUsing string templates makes your code simpler.\n\nThe quick-fix replaces the call with a string template.\n\n**Example:**\n\n\n fun main() {\n val id = \"abc\"\n val date = \"123\"\n val s = String.format(\"%s_%s_%s\", id, date, id)\n }\n\nAfter the quick-fix is applied:\n\n\n fun main() {\n val id = \"abc\"\n val date = \"123\"\n val s = \"${id}_${date}_$id\"\n }\n" }, "defaultConfiguration": { "enabled": false, "level": "note", "parameters": { - "suppressToolId": "ReplaceNotNullAssertionWithElvisReturn", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" + "suppressToolId": "ReplaceStringFormatWithLiteral", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" } }, "relationships": [ @@ -4121,21 +4121,21 @@ ] }, { - "id": "ReplaceStringFormatWithLiteral", + "id": "ReplaceNotNullAssertionWithElvisReturn", "shortDescription": { - "text": "'String.format' call can be replaced with string templates" + "text": "Not-null assertion can be replaced with 'return'" }, "fullDescription": { - "text": "Reports 'String.format' calls that can be replaced with string templates. Using string templates makes your code simpler. The quick-fix replaces the call with a string template. Example: 'fun main() {\n val id = \"abc\"\n val date = \"123\"\n val s = String.format(\"%s_%s_%s\", id, date, id)\n }' After the quick-fix is applied: 'fun main() {\n val id = \"abc\"\n val date = \"123\"\n val s = \"${id}_${date}_$id\"\n }'", - "markdown": "Reports `String.format` calls that can be replaced with string templates.\n\nUsing string templates makes your code simpler.\n\nThe quick-fix replaces the call with a string template.\n\n**Example:**\n\n\n fun main() {\n val id = \"abc\"\n val date = \"123\"\n val s = String.format(\"%s_%s_%s\", id, date, id)\n }\n\nAfter the quick-fix is applied:\n\n\n fun main() {\n val id = \"abc\"\n val date = \"123\"\n val s = \"${id}_${date}_$id\"\n }\n" + "text": "Reports not-null assertion ('!!') calls that can be replaced with the elvis operator and return ('?: return'). A not-null assertion can lead to NPE (NullPointerException) that is not expected. Avoiding the use of '!!' is good practice. The quick-fix replaces the not-null assertion with 'return' or 'return null'. Example: 'fun test(number: Int?) {\n val x = number!!\n }' After the quick-fix is applied: 'fun test(number: Int?) {\n val x = number ?: return\n }'", + "markdown": "Reports not-null assertion (`!!`) calls that can be replaced with the elvis operator and return (`?: return`).\n\nA not-null assertion can lead to NPE (NullPointerException) that is not expected. Avoiding the use of `!!` is good practice.\n\nThe quick-fix replaces the not-null assertion with `return` or `return null`.\n\n**Example:**\n\n\n fun test(number: Int?) {\n val x = number!!\n }\n\nAfter the quick-fix is applied:\n\n\n fun test(number: Int?) {\n val x = number ?: return\n }\n" }, "defaultConfiguration": { "enabled": false, "level": "note", "parameters": { - "suppressToolId": "ReplaceStringFormatWithLiteral", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" + "suppressToolId": "ReplaceNotNullAssertionWithElvisReturn", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" } }, "relationships": [ @@ -4583,28 +4583,28 @@ ] }, { - "id": "JoinDeclarationAndAssignment", + "id": "KotlinEqualsBetweenInconvertibleTypes", "shortDescription": { - "text": "Join declaration and assignment" + "text": "'equals()' between objects of inconvertible types" }, "fullDescription": { - "text": "Reports property declarations that can be joined with the following assignment. Example: 'val x: String\n x = System.getProperty(\"\")' The quick fix joins the declaration with the assignment: 'val x = System.getProperty(\"\")' Configure the inspection: You can disable the option Report with complex initialization of member properties to skip properties with complex initialization. This covers two cases: The property initializer is complex (it is a multiline or a compound/control-flow expression) The property is first initialized and then immediately used in subsequent code (for example, to call additional initialization methods)", - "markdown": "Reports property declarations that can be joined with the following assignment.\n\n**Example:**\n\n\n val x: String\n x = System.getProperty(\"\")\n\nThe quick fix joins the declaration with the assignment:\n\n\n val x = System.getProperty(\"\")\n\nConfigure the inspection:\n\nYou can disable the option **Report with complex initialization of member properties** to skip properties with complex initialization. This covers two cases:\n\n1. The property initializer is complex (it is a multiline or a compound/control-flow expression)\n2. The property is first initialized and then immediately used in subsequent code (for example, to call additional initialization methods)" + "text": "Reports calls to 'equals()' where the receiver and the argument are of incompatible primitive, enum, or string types. While such a call might theoretically be useful, most likely it represents a bug. Example: '5.equals(\"\");'", + "markdown": "Reports calls to `equals()` where the receiver and the argument are of incompatible primitive, enum, or string types.\n\nWhile such a call might theoretically be useful, most likely it represents a bug.\n\n**Example:**\n\n 5.equals(\"\");\n" }, "defaultConfiguration": { - "enabled": false, - "level": "note", + "enabled": true, + "level": "warning", "parameters": { - "suppressToolId": "JoinDeclarationAndAssignment", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" + "suppressToolId": "EqualsBetweenInconvertibleTypes", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { - "id": "Kotlin/Style issues", - "index": 2, + "id": "Kotlin/Probable bugs", + "index": 28, "toolComponent": { "name": "QDJVM" } @@ -4616,28 +4616,28 @@ ] }, { - "id": "KotlinEqualsBetweenInconvertibleTypes", + "id": "JoinDeclarationAndAssignment", "shortDescription": { - "text": "'equals()' between objects of inconvertible types" + "text": "Join declaration and assignment" }, "fullDescription": { - "text": "Reports calls to 'equals()' where the receiver and the argument are of incompatible primitive, enum, or string types. While such a call might theoretically be useful, most likely it represents a bug. Example: '5.equals(\"\");'", - "markdown": "Reports calls to `equals()` where the receiver and the argument are of incompatible primitive, enum, or string types.\n\nWhile such a call might theoretically be useful, most likely it represents a bug.\n\n**Example:**\n\n 5.equals(\"\");\n" + "text": "Reports property declarations that can be joined with the following assignment. Example: 'val x: String\n x = System.getProperty(\"\")' The quick fix joins the declaration with the assignment: 'val x = System.getProperty(\"\")' Configure the inspection: You can disable the option Report with complex initialization of member properties to skip properties with complex initialization. This covers two cases: The property initializer is complex (it is a multiline or a compound/control-flow expression) The property is first initialized and then immediately used in subsequent code (for example, to call additional initialization methods)", + "markdown": "Reports property declarations that can be joined with the following assignment.\n\n**Example:**\n\n\n val x: String\n x = System.getProperty(\"\")\n\nThe quick fix joins the declaration with the assignment:\n\n\n val x = System.getProperty(\"\")\n\nConfigure the inspection:\n\nYou can disable the option **Report with complex initialization of member properties** to skip properties with complex initialization. This covers two cases:\n\n1. The property initializer is complex (it is a multiline or a compound/control-flow expression)\n2. The property is first initialized and then immediately used in subsequent code (for example, to call additional initialization methods)" }, "defaultConfiguration": { - "enabled": true, - "level": "warning", + "enabled": false, + "level": "note", "parameters": { - "suppressToolId": "EqualsBetweenInconvertibleTypes", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "JoinDeclarationAndAssignment", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" } }, "relationships": [ { "target": { - "id": "Kotlin/Probable bugs", - "index": 28, + "id": "Kotlin/Style issues", + "index": 2, "toolComponent": { "name": "QDJVM" } @@ -4847,28 +4847,28 @@ ] }, { - "id": "UnnecessaryVariable", + "id": "DeprecatedMavenDependency", "shortDescription": { - "text": "Unnecessary local variable" + "text": "Deprecated library is used in Maven" }, "fullDescription": { - "text": "Reports local variables that are used only in the very next 'return' statement or are exact copies of other variables. Such variables can be safely inlined to make the code more clear. Example: 'fun sum(a: Int, b: Int): Int {\n val c = a + b\n return c\n }' After the quick-fix is applied: 'fun sum(a: Int, b: Int): Int {\n return a + b\n }' Configure the inspection: Use the Report immediately returned variables option to report immediately returned variables. When given descriptive names, such variables may improve the code readability in some cases, that's why this option is disabled by default.", - "markdown": "Reports local variables that are used only in the very next `return` statement or are exact copies of other variables.\n\nSuch variables can be safely inlined to make the code more clear.\n\n**Example:**\n\n\n fun sum(a: Int, b: Int): Int {\n val c = a + b\n return c\n }\n\nAfter the quick-fix is applied:\n\n\n fun sum(a: Int, b: Int): Int {\n return a + b\n }\n\nConfigure the inspection:\n\nUse the **Report immediately returned variables** option to report immediately returned variables.\nWhen given descriptive names, such variables may improve the code readability in some cases, that's why this option is disabled by default." + "text": "Reports deprecated maven dependency. Example: '\n \n org.jetbrains.kotlin\n kotlin-stdlib-jre7\n ${kotlin.version}\n \n ' The quick fix changes the deprecated dependency to a maintained one: '\n \n org.jetbrains.kotlin\n kotlin-stdlib-jdk7\n ${kotlin.version}\n \n '", + "markdown": "Reports deprecated maven dependency.\n\n**Example:**\n\n\n \n \n org.jetbrains.kotlin\n kotlin-stdlib-jre7\n ${kotlin.version}\n \n \n\nThe quick fix changes the deprecated dependency to a maintained one:\n\n\n \n \n org.jetbrains.kotlin\n kotlin-stdlib-jdk7\n ${kotlin.version}\n \n \n" }, "defaultConfiguration": { - "enabled": false, - "level": "note", + "enabled": true, + "level": "warning", "parameters": { - "suppressToolId": "UnnecessaryVariable", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" + "suppressToolId": "DeprecatedMavenDependency", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { - "id": "Kotlin/Redundant constructs", - "index": 4, + "id": "Kotlin", + "index": 1, "toolComponent": { "name": "QDJVM" } @@ -4880,28 +4880,28 @@ ] }, { - "id": "DeprecatedMavenDependency", + "id": "UnnecessaryVariable", "shortDescription": { - "text": "Deprecated library is used in Maven" + "text": "Unnecessary local variable" }, "fullDescription": { - "text": "Reports deprecated maven dependency. Example: '\n \n org.jetbrains.kotlin\n kotlin-stdlib-jre7\n ${kotlin.version}\n \n ' The quick fix changes the deprecated dependency to a maintained one: '\n \n org.jetbrains.kotlin\n kotlin-stdlib-jdk7\n ${kotlin.version}\n \n '", - "markdown": "Reports deprecated maven dependency.\n\n**Example:**\n\n\n \n \n org.jetbrains.kotlin\n kotlin-stdlib-jre7\n ${kotlin.version}\n \n \n\nThe quick fix changes the deprecated dependency to a maintained one:\n\n\n \n \n org.jetbrains.kotlin\n kotlin-stdlib-jdk7\n ${kotlin.version}\n \n \n" + "text": "Reports local variables that are used only in the very next 'return' statement or are exact copies of other variables. Such variables can be safely inlined to make the code more clear. Example: 'fun sum(a: Int, b: Int): Int {\n val c = a + b\n return c\n }' After the quick-fix is applied: 'fun sum(a: Int, b: Int): Int {\n return a + b\n }' Configure the inspection: Use the Report immediately returned variables option to report immediately returned variables. When given descriptive names, such variables may improve the code readability in some cases, that's why this option is disabled by default.", + "markdown": "Reports local variables that are used only in the very next `return` statement or are exact copies of other variables.\n\nSuch variables can be safely inlined to make the code more clear.\n\n**Example:**\n\n\n fun sum(a: Int, b: Int): Int {\n val c = a + b\n return c\n }\n\nAfter the quick-fix is applied:\n\n\n fun sum(a: Int, b: Int): Int {\n return a + b\n }\n\nConfigure the inspection:\n\nUse the **Report immediately returned variables** option to report immediately returned variables.\nWhen given descriptive names, such variables may improve the code readability in some cases, that's why this option is disabled by default." }, "defaultConfiguration": { - "enabled": true, - "level": "warning", + "enabled": false, + "level": "note", "parameters": { - "suppressToolId": "DeprecatedMavenDependency", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "UnnecessaryVariable", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" } }, "relationships": [ { "target": { - "id": "Kotlin", - "index": 1, + "id": "Kotlin/Redundant constructs", + "index": 4, "toolComponent": { "name": "QDJVM" } @@ -4934,7 +4934,7 @@ { "target": { "id": "Kotlin/Other problems", - "index": 61, + "index": 60, "toolComponent": { "name": "QDJVM" } @@ -6662,28 +6662,28 @@ ] }, { - "id": "JavaIoSerializableObjectMustHaveReadResolve", + "id": "ReplacePutWithAssignment", "shortDescription": { - "text": "Serializable object must implement 'readResolve'" + "text": "'map.put()' can be converted to assignment" }, "fullDescription": { - "text": "Reports 'object's ('data object' including) that implement 'java.io.Serializable' but don't implement readResolve Example: 'import java.io.Serializable\n\n object Foo : Serializable' The quick fix implements 'readResolve' method: 'import java.io.Serializable\n\n object Foo : Serializable {\n private fun readResolve() = Foo\n }'", - "markdown": "Reports `object`s (`data object` including) that implement `java.io.Serializable` but don't implement\n[readResolve](https://docs.oracle.com/en/java/javase/11/docs/specs/serialization/input.html#the-readresolve-method)\n\n**Example:**\n\n\n import java.io.Serializable\n\n object Foo : Serializable\n\nThe quick fix implements `readResolve` method:\n\n\n import java.io.Serializable\n\n object Foo : Serializable {\n private fun readResolve() = Foo\n }\n" + "text": "Reports 'map.put' function calls that can be replaced with indexing operator ('[]'). Using syntactic sugar makes your code simpler. The quick-fix replaces 'put' call with the assignment. Example: 'fun foo(map: MutableMap) {\n map.put(42, \"foo\")\n }' After the quick-fix is applied: 'fun foo(map: MutableMap) {\n map[42] = \"foo\"\n }'", + "markdown": "Reports `map.put` function calls that can be replaced with indexing operator (`[]`).\n\nUsing syntactic sugar makes your code simpler.\n\nThe quick-fix replaces `put` call with the assignment.\n\n**Example:**\n\n\n fun foo(map: MutableMap) {\n map.put(42, \"foo\")\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(map: MutableMap) {\n map[42] = \"foo\"\n }\n" }, "defaultConfiguration": { - "enabled": true, - "level": "warning", + "enabled": false, + "level": "note", "parameters": { - "suppressToolId": "JavaIoSerializableObjectMustHaveReadResolve", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "ReplacePutWithAssignment", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" } }, "relationships": [ { "target": { - "id": "Kotlin/Probable bugs", - "index": 28, + "id": "Kotlin/Style issues", + "index": 2, "toolComponent": { "name": "QDJVM" } @@ -6695,28 +6695,28 @@ ] }, { - "id": "ReplacePutWithAssignment", + "id": "JavaIoSerializableObjectMustHaveReadResolve", "shortDescription": { - "text": "'map.put()' can be converted to assignment" + "text": "Serializable object must implement 'readResolve'" }, "fullDescription": { - "text": "Reports 'map.put' function calls that can be replaced with indexing operator ('[]'). Using syntactic sugar makes your code simpler. The quick-fix replaces 'put' call with the assignment. Example: 'fun foo(map: MutableMap) {\n map.put(42, \"foo\")\n }' After the quick-fix is applied: 'fun foo(map: MutableMap) {\n map[42] = \"foo\"\n }'", - "markdown": "Reports `map.put` function calls that can be replaced with indexing operator (`[]`).\n\nUsing syntactic sugar makes your code simpler.\n\nThe quick-fix replaces `put` call with the assignment.\n\n**Example:**\n\n\n fun foo(map: MutableMap) {\n map.put(42, \"foo\")\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(map: MutableMap) {\n map[42] = \"foo\"\n }\n" + "text": "Reports 'object's ('data object' including) that implement 'java.io.Serializable' but don't implement readResolve Example: 'import java.io.Serializable\n\n object Foo : Serializable' The quick fix implements 'readResolve' method: 'import java.io.Serializable\n\n object Foo : Serializable {\n private fun readResolve() = Foo\n }'", + "markdown": "Reports `object`s (`data object` including) that implement `java.io.Serializable` but don't implement\n[readResolve](https://docs.oracle.com/en/java/javase/11/docs/specs/serialization/input.html#the-readresolve-method)\n\n**Example:**\n\n\n import java.io.Serializable\n\n object Foo : Serializable\n\nThe quick fix implements `readResolve` method:\n\n\n import java.io.Serializable\n\n object Foo : Serializable {\n private fun readResolve() = Foo\n }\n" }, "defaultConfiguration": { - "enabled": false, - "level": "note", + "enabled": true, + "level": "warning", "parameters": { - "suppressToolId": "ReplacePutWithAssignment", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" + "suppressToolId": "JavaIoSerializableObjectMustHaveReadResolve", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { - "id": "Kotlin/Style issues", - "index": 2, + "id": "Kotlin/Probable bugs", + "index": 28, "toolComponent": { "name": "QDJVM" } @@ -7091,28 +7091,28 @@ ] }, { - "id": "PropertyName", + "id": "InlineClassDeprecatedMigration", "shortDescription": { - "text": "Property naming convention" + "text": "Inline classes are deprecated since 1.5" }, "fullDescription": { - "text": "Reports property names that do not follow the recommended naming conventions. Consistent naming allows for easier code reading and understanding. According to the Kotlin official style guide, property names should start with a lowercase letter and use camel case. It is possible to introduce other naming rules by changing the \"Pattern\" regular expression. Example: 'val My_Cool_Property = \"\"' The quick-fix renames the class according to the Kotlin naming conventions: 'val myCoolProperty = \"\"'", - "markdown": "Reports property names that do not follow the recommended naming conventions.\n\n\nConsistent naming allows for easier code reading and understanding.\nAccording to the [Kotlin official style guide](https://kotlinlang.org/docs/coding-conventions.html#naming-rules),\nproperty names should start with a lowercase letter and use camel case.\n\nIt is possible to introduce other naming rules by changing the \"Pattern\" regular expression.\n\n**Example:**\n\n\n val My_Cool_Property = \"\"\n\nThe quick-fix renames the class according to the Kotlin naming conventions:\n\n\n val myCoolProperty = \"\"\n" + "text": "Reports inline classes that are deprecated and cause compilation warnings in Kotlin 1.5 and later. See What's new in Kotlin 1.5.0 Example: 'inline class Password(val s: String)' After the quick-fix is applied: '@JvmInline\n value class Password(val s: String)' Inspection is available for Kotlin language level starting from 1.5.", + "markdown": "Reports inline classes that are deprecated and cause compilation warnings in Kotlin 1.5 and later.\nSee [What's new in Kotlin 1.5.0](https://kotlinlang.org/docs/whatsnew15.html#inline-classes)\n\nExample:\n\n\n inline class Password(val s: String)\n\nAfter the quick-fix is applied:\n\n\n @JvmInline\n value class Password(val s: String)\n\nInspection is available for Kotlin language level starting from 1.5." }, "defaultConfiguration": { "enabled": false, - "level": "note", + "level": "warning", "parameters": { - "suppressToolId": "PropertyName", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" + "suppressToolId": "InlineClassDeprecatedMigration", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { - "id": "Kotlin/Naming conventions", - "index": 71, + "id": "Kotlin/Migration", + "index": 16, "toolComponent": { "name": "QDJVM" } @@ -7124,28 +7124,28 @@ ] }, { - "id": "InlineClassDeprecatedMigration", + "id": "PropertyName", "shortDescription": { - "text": "Inline classes are deprecated since 1.5" + "text": "Property naming convention" }, "fullDescription": { - "text": "Reports inline classes that are deprecated and cause compilation warnings in Kotlin 1.5 and later. See What's new in Kotlin 1.5.0 Example: 'inline class Password(val s: String)' After the quick-fix is applied: '@JvmInline\n value class Password(val s: String)' Inspection is available for Kotlin language level starting from 1.5.", - "markdown": "Reports inline classes that are deprecated and cause compilation warnings in Kotlin 1.5 and later.\nSee [What's new in Kotlin 1.5.0](https://kotlinlang.org/docs/whatsnew15.html#inline-classes)\n\nExample:\n\n\n inline class Password(val s: String)\n\nAfter the quick-fix is applied:\n\n\n @JvmInline\n value class Password(val s: String)\n\nInspection is available for Kotlin language level starting from 1.5." + "text": "Reports property names that do not follow the recommended naming conventions. Consistent naming allows for easier code reading and understanding. According to the Kotlin official style guide, property names should start with a lowercase letter and use camel case. It is possible to introduce other naming rules by changing the \"Pattern\" regular expression. Example: 'val My_Cool_Property = \"\"' The quick-fix renames the class according to the Kotlin naming conventions: 'val myCoolProperty = \"\"'", + "markdown": "Reports property names that do not follow the recommended naming conventions.\n\n\nConsistent naming allows for easier code reading and understanding.\nAccording to the [Kotlin official style guide](https://kotlinlang.org/docs/coding-conventions.html#naming-rules),\nproperty names should start with a lowercase letter and use camel case.\n\nIt is possible to introduce other naming rules by changing the \"Pattern\" regular expression.\n\n**Example:**\n\n\n val My_Cool_Property = \"\"\n\nThe quick-fix renames the class according to the Kotlin naming conventions:\n\n\n val myCoolProperty = \"\"\n" }, "defaultConfiguration": { "enabled": false, - "level": "warning", + "level": "note", "parameters": { - "suppressToolId": "InlineClassDeprecatedMigration", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "PropertyName", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" } }, "relationships": [ { "target": { - "id": "Kotlin/Migration", - "index": 16, + "id": "Kotlin/Naming conventions", + "index": 71, "toolComponent": { "name": "QDJVM" } @@ -7409,7 +7409,7 @@ { "target": { "id": "Kotlin/Other problems", - "index": 61, + "index": 60, "toolComponent": { "name": "QDJVM" } @@ -7673,7 +7673,7 @@ { "target": { "id": "Kotlin/Other problems", - "index": 61, + "index": 60, "toolComponent": { "name": "QDJVM" } @@ -7817,19 +7817,19 @@ ] }, { - "id": "ObjectPrivatePropertyName", + "id": "IfThenToElvis", "shortDescription": { - "text": "Object private property naming convention" + "text": "If-Then foldable to '?:'" }, "fullDescription": { - "text": "Reports properties that do not follow the naming conventions. The following properties are reported: Private properties in objects and companion objects You can specify the required pattern in the inspection options. Recommended naming conventions: it has to start with an underscore or an uppercase letter, use camel case. Example: 'class Person {\n companion object {\n // property in companion object\n private val NO_NAME = Person()\n }\n }'", - "markdown": "Reports properties that do not follow the naming conventions.\n\nThe following properties are reported:\n\n* Private properties in objects and companion objects\n\nYou can specify the required pattern in the inspection options.\n\n[Recommended naming conventions](https://kotlinlang.org/docs/coding-conventions.html#naming-rules): it has to start with an underscore or an uppercase letter, use camel case.\n\n**Example:**\n\n\n class Person {\n companion object {\n // property in companion object\n private val NO_NAME = Person()\n }\n }\n" + "text": "Reports 'if-then' expressions that can be folded into elvis ('?:') expressions. Example: 'fun maybeFoo(): String? = \"foo\"\n\n var foo = maybeFoo()\n val bar = if (foo == null) \"hello\" else foo' The quick fix converts the 'if-then' expression into an elvis ('?:') expression: 'fun maybeFoo(): String? = \"foo\"\n\n var foo = maybeFoo()\n val bar = foo ?: \"hello\"'", + "markdown": "Reports `if-then` expressions that can be folded into elvis (`?:`) expressions.\n\n**Example:**\n\n\n fun maybeFoo(): String? = \"foo\"\n\n var foo = maybeFoo()\n val bar = if (foo == null) \"hello\" else foo\n\nThe quick fix converts the `if-then` expression into an elvis (`?:`) expression:\n\n\n fun maybeFoo(): String? = \"foo\"\n\n var foo = maybeFoo()\n val bar = foo ?: \"hello\"\n" }, "defaultConfiguration": { "enabled": false, "level": "note", "parameters": { - "suppressToolId": "ObjectPrivatePropertyName", + "suppressToolId": "IfThenToElvis", "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate" } @@ -7837,8 +7837,8 @@ "relationships": [ { "target": { - "id": "Kotlin/Naming conventions", - "index": 71, + "id": "Kotlin/Style issues", + "index": 2, "toolComponent": { "name": "QDJVM" } @@ -7850,19 +7850,19 @@ ] }, { - "id": "IfThenToElvis", + "id": "ObjectPrivatePropertyName", "shortDescription": { - "text": "If-Then foldable to '?:'" + "text": "Object private property naming convention" }, "fullDescription": { - "text": "Reports 'if-then' expressions that can be folded into elvis ('?:') expressions. Example: 'fun maybeFoo(): String? = \"foo\"\n\n var foo = maybeFoo()\n val bar = if (foo == null) \"hello\" else foo' The quick fix converts the 'if-then' expression into an elvis ('?:') expression: 'fun maybeFoo(): String? = \"foo\"\n\n var foo = maybeFoo()\n val bar = foo ?: \"hello\"'", - "markdown": "Reports `if-then` expressions that can be folded into elvis (`?:`) expressions.\n\n**Example:**\n\n\n fun maybeFoo(): String? = \"foo\"\n\n var foo = maybeFoo()\n val bar = if (foo == null) \"hello\" else foo\n\nThe quick fix converts the `if-then` expression into an elvis (`?:`) expression:\n\n\n fun maybeFoo(): String? = \"foo\"\n\n var foo = maybeFoo()\n val bar = foo ?: \"hello\"\n" + "text": "Reports properties that do not follow the naming conventions. The following properties are reported: Private properties in objects and companion objects You can specify the required pattern in the inspection options. Recommended naming conventions: it has to start with an underscore or an uppercase letter, use camel case. Example: 'class Person {\n companion object {\n // property in companion object\n private val NO_NAME = Person()\n }\n }'", + "markdown": "Reports properties that do not follow the naming conventions.\n\nThe following properties are reported:\n\n* Private properties in objects and companion objects\n\nYou can specify the required pattern in the inspection options.\n\n[Recommended naming conventions](https://kotlinlang.org/docs/coding-conventions.html#naming-rules): it has to start with an underscore or an uppercase letter, use camel case.\n\n**Example:**\n\n\n class Person {\n companion object {\n // property in companion object\n private val NO_NAME = Person()\n }\n }\n" }, "defaultConfiguration": { "enabled": false, "level": "note", "parameters": { - "suppressToolId": "IfThenToElvis", + "suppressToolId": "ObjectPrivatePropertyName", "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate" } @@ -7870,8 +7870,8 @@ "relationships": [ { "target": { - "id": "Kotlin/Style issues", - "index": 2, + "id": "Kotlin/Naming conventions", + "index": 71, "toolComponent": { "name": "QDJVM" } @@ -8300,7 +8300,7 @@ { "target": { "id": "Kotlin/Other problems", - "index": 61, + "index": 60, "toolComponent": { "name": "QDJVM" } @@ -8465,7 +8465,7 @@ { "target": { "id": "Kotlin/Other problems", - "index": 61, + "index": 60, "toolComponent": { "name": "QDJVM" } @@ -8597,7 +8597,7 @@ { "target": { "id": "Kotlin/Other problems", - "index": 61, + "index": 60, "toolComponent": { "name": "QDJVM" } @@ -8696,7 +8696,7 @@ { "target": { "id": "Kotlin/Other problems", - "index": 61, + "index": 60, "toolComponent": { "name": "QDJVM" } @@ -9500,19 +9500,19 @@ ] }, { - "id": "RedundantAsSequence", + "id": "RemoveToStringInStringTemplate", "shortDescription": { - "text": "Redundant 'asSequence' call" + "text": "Redundant call to 'toString()' in string template" }, "fullDescription": { - "text": "Reports redundant 'asSequence()' call that can never have a positive performance effect. 'asSequence()' speeds up collection processing that includes multiple operations because it performs operations lazily and doesn't create intermediate collections. However, if a terminal operation (such as 'toList()') is used right after 'asSequence()', this doesn't give you any positive performance effect. Example: 'fun test(list: List) {\n list.asSequence().last()\n }' After the quick-fix is applied: 'fun test(list: List) {\n list.last()\n }'", - "markdown": "Reports redundant `asSequence()` call that can never have a positive performance effect.\n\n\n`asSequence()` speeds up collection processing that includes multiple operations because it performs operations lazily\nand doesn't create intermediate collections.\n\n\nHowever, if a terminal operation (such as `toList()`) is used right after `asSequence()`, this doesn't give\nyou any positive performance effect.\n\n**Example:**\n\n\n fun test(list: List) {\n list.asSequence().last()\n }\n\nAfter the quick-fix is applied:\n\n\n fun test(list: List) {\n list.last()\n }\n" + "text": "Reports calls to 'toString()' in string templates that can be safely removed. Example: 'fun foo(a: Int, b: Int) = a + b\n\n fun test(): String {\n return \"Foo: ${foo(0, 4).toString()}\" // 'toString()' is redundant\n }' After the quick-fix is applied: 'fun foo(a: Int, b: Int) = a + b\n\n fun test(): String {\n return \"Foo: ${foo(0, 4)}\"\n }'", + "markdown": "Reports calls to `toString()` in string templates that can be safely removed.\n\n**Example:**\n\n fun foo(a: Int, b: Int) = a + b\n\n fun test(): String {\n return \"Foo: ${foo(0, 4).toString()}\" // 'toString()' is redundant\n }\n\nAfter the quick-fix is applied:\n\n fun foo(a: Int, b: Int) = a + b\n\n fun test(): String {\n return \"Foo: ${foo(0, 4)}\"\n }\n" }, "defaultConfiguration": { "enabled": false, "level": "note", "parameters": { - "suppressToolId": "RedundantAsSequence", + "suppressToolId": "RemoveToStringInStringTemplate", "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate" } @@ -9520,8 +9520,8 @@ "relationships": [ { "target": { - "id": "Kotlin/Style issues", - "index": 2, + "id": "Kotlin/Redundant constructs", + "index": 4, "toolComponent": { "name": "QDJVM" } @@ -9533,19 +9533,19 @@ ] }, { - "id": "RemoveToStringInStringTemplate", + "id": "RedundantAsSequence", "shortDescription": { - "text": "Redundant call to 'toString()' in string template" + "text": "Redundant 'asSequence' call" }, "fullDescription": { - "text": "Reports calls to 'toString()' in string templates that can be safely removed. Example: 'fun foo(a: Int, b: Int) = a + b\n\n fun test(): String {\n return \"Foo: ${foo(0, 4).toString()}\" // 'toString()' is redundant\n }' After the quick-fix is applied: 'fun foo(a: Int, b: Int) = a + b\n\n fun test(): String {\n return \"Foo: ${foo(0, 4)}\"\n }'", - "markdown": "Reports calls to `toString()` in string templates that can be safely removed.\n\n**Example:**\n\n fun foo(a: Int, b: Int) = a + b\n\n fun test(): String {\n return \"Foo: ${foo(0, 4).toString()}\" // 'toString()' is redundant\n }\n\nAfter the quick-fix is applied:\n\n fun foo(a: Int, b: Int) = a + b\n\n fun test(): String {\n return \"Foo: ${foo(0, 4)}\"\n }\n" + "text": "Reports redundant 'asSequence()' call that can never have a positive performance effect. 'asSequence()' speeds up collection processing that includes multiple operations because it performs operations lazily and doesn't create intermediate collections. However, if a terminal operation (such as 'toList()') is used right after 'asSequence()', this doesn't give you any positive performance effect. Example: 'fun test(list: List) {\n list.asSequence().last()\n }' After the quick-fix is applied: 'fun test(list: List) {\n list.last()\n }'", + "markdown": "Reports redundant `asSequence()` call that can never have a positive performance effect.\n\n\n`asSequence()` speeds up collection processing that includes multiple operations because it performs operations lazily\nand doesn't create intermediate collections.\n\n\nHowever, if a terminal operation (such as `toList()`) is used right after `asSequence()`, this doesn't give\nyou any positive performance effect.\n\n**Example:**\n\n\n fun test(list: List) {\n list.asSequence().last()\n }\n\nAfter the quick-fix is applied:\n\n\n fun test(list: List) {\n list.last()\n }\n" }, "defaultConfiguration": { "enabled": false, "level": "note", "parameters": { - "suppressToolId": "RemoveToStringInStringTemplate", + "suppressToolId": "RedundantAsSequence", "ideaSeverity": "WEAK WARNING", "qodanaSeverity": "Moderate" } @@ -9553,8 +9553,8 @@ "relationships": [ { "target": { - "id": "Kotlin/Redundant constructs", - "index": 4, + "id": "Kotlin/Style issues", + "index": 2, "toolComponent": { "name": "QDJVM" } @@ -10379,7 +10379,7 @@ { "target": { "id": "Kotlin/Other problems", - "index": 61, + "index": 60, "toolComponent": { "name": "QDJVM" } @@ -10709,7 +10709,7 @@ { "target": { "id": "Kotlin/Other problems", - "index": 61, + "index": 60, "toolComponent": { "name": "QDJVM" } @@ -10742,7 +10742,7 @@ { "target": { "id": "Kotlin/Other problems", - "index": 61, + "index": 60, "toolComponent": { "name": "QDJVM" } @@ -10886,28 +10886,28 @@ ] }, { - "id": "KotlinJvmAnnotationInJava", + "id": "ObsoleteKotlinJsPackages", "shortDescription": { - "text": "Kotlin JVM annotation in Java" + "text": "'kotlin.browser' and 'kotlin.dom' packages are deprecated since 1.4" }, "fullDescription": { - "text": "Reports useless Kotlin JVM annotations in Java code. Example: 'import kotlin.jvm.Volatile;\n\n public class Test {\n @Volatile\n public int i;\n }'", - "markdown": "Reports useless Kotlin JVM annotations in Java code.\n\n**Example:**\n\n\n import kotlin.jvm.Volatile;\n\n public class Test {\n @Volatile\n public int i;\n }\n" + "text": "Reports usages of 'kotlin.dom' and 'kotlin.browser' packages. These packages were moved to 'kotlinx.dom' and 'kotlinx.browser' respectively in Kotlin 1.4+.", + "markdown": "Reports usages of `kotlin.dom` and `kotlin.browser` packages.\n\nThese packages were moved to `kotlinx.dom` and `kotlinx.browser`\nrespectively in Kotlin 1.4+." }, "defaultConfiguration": { - "enabled": true, - "level": "warning", + "enabled": false, + "level": "error", "parameters": { - "suppressToolId": "KotlinJvmAnnotationInJava", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "ObsoleteKotlinJsPackages", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" } }, "relationships": [ { "target": { - "id": "Kotlin/Java interop issues", - "index": 78, + "id": "Kotlin/Migration", + "index": 16, "toolComponent": { "name": "QDJVM" } @@ -10919,28 +10919,28 @@ ] }, { - "id": "ObsoleteKotlinJsPackages", + "id": "KotlinJvmAnnotationInJava", "shortDescription": { - "text": "'kotlin.browser' and 'kotlin.dom' packages are deprecated since 1.4" + "text": "Kotlin JVM annotation in Java" }, "fullDescription": { - "text": "Reports usages of 'kotlin.dom' and 'kotlin.browser' packages. These packages were moved to 'kotlinx.dom' and 'kotlinx.browser' respectively in Kotlin 1.4+.", - "markdown": "Reports usages of `kotlin.dom` and `kotlin.browser` packages.\n\nThese packages were moved to `kotlinx.dom` and `kotlinx.browser`\nrespectively in Kotlin 1.4+." + "text": "Reports useless Kotlin JVM annotations in Java code. Example: 'import kotlin.jvm.Volatile;\n\n public class Test {\n @Volatile\n public int i;\n }'", + "markdown": "Reports useless Kotlin JVM annotations in Java code.\n\n**Example:**\n\n\n import kotlin.jvm.Volatile;\n\n public class Test {\n @Volatile\n public int i;\n }\n" }, "defaultConfiguration": { - "enabled": false, - "level": "error", + "enabled": true, + "level": "warning", "parameters": { - "suppressToolId": "ObsoleteKotlinJsPackages", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" + "suppressToolId": "KotlinJvmAnnotationInJava", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { - "id": "Kotlin/Migration", - "index": 16, + "id": "Kotlin/Java interop issues", + "index": 78, "toolComponent": { "name": "QDJVM" } @@ -11204,7 +11204,7 @@ { "target": { "id": "Kotlin/Other problems", - "index": 61, + "index": 60, "toolComponent": { "name": "QDJVM" } @@ -12290,27 +12290,27 @@ ] }, { - "id": "RemoveLiteralUnderscores", + "id": "NegatedEqualityExpression", "shortDescription": { - "text": "Underscores in numeric literal" + "text": "Negated equality expression" }, "fullDescription": { - "text": "Reports numeric literals with underscores and suggests removing them with a quick-fix. This may be useful if you need to lower the language level. The quick-fix removes underscores from numeric literals. For example '1_000_000' will be converted to '1000000'. Numeric literals with underscores appeared in Java 7. This inspection can help to downgrade for backward compatibility with earlier Java versions. New in 2020.2", - "markdown": "Reports numeric literals with underscores and suggests removing them with a quick-fix. This may be useful if you need to lower the language level.\n\nThe quick-fix removes underscores from numeric literals. For example `1_000_000` will be converted to `1000000`.\n\n\n*Numeric literals with underscores* appeared in Java 7.\nThis inspection can help to downgrade for backward compatibility with earlier Java versions.\n\nNew in 2020.2" + "text": "Reports equality expressions which are negated by a prefix expression. Such expressions can be simplified using the '!=' operator. Example: '!(i == 1)' After the quick-fix is applied: 'i != 1'", + "markdown": "Reports equality expressions which are negated by a prefix expression.\n\nSuch expressions can be simplified using the `!=` operator.\n\nExample:\n\n\n !(i == 1)\n\nAfter the quick-fix is applied:\n\n\n i != 1\n" }, "defaultConfiguration": { "enabled": false, - "level": "note", + "level": "warning", "parameters": { - "suppressToolId": "RemoveLiteralUnderscores", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" + "suppressToolId": "NegatedEqualityExpression", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { - "id": "Java/Numeric issues", + "id": "Java/Control flow issues", "index": 30, "toolComponent": { "name": "QDJVM" @@ -12323,27 +12323,27 @@ ] }, { - "id": "NegatedEqualityExpression", + "id": "RemoveLiteralUnderscores", "shortDescription": { - "text": "Negated equality expression" + "text": "Underscores in numeric literal" }, "fullDescription": { - "text": "Reports equality expressions which are negated by a prefix expression. Such expressions can be simplified using the '!=' operator. Example: '!(i == 1)' After the quick-fix is applied: 'i != 1'", - "markdown": "Reports equality expressions which are negated by a prefix expression.\n\nSuch expressions can be simplified using the `!=` operator.\n\nExample:\n\n\n !(i == 1)\n\nAfter the quick-fix is applied:\n\n\n i != 1\n" + "text": "Reports numeric literals with underscores and suggests removing them with a quick-fix. This may be useful if you need to lower the language level. The quick-fix removes underscores from numeric literals. For example '1_000_000' will be converted to '1000000'. Numeric literals with underscores appeared in Java 7. This inspection can help to downgrade for backward compatibility with earlier Java versions. New in 2020.2", + "markdown": "Reports numeric literals with underscores and suggests removing them with a quick-fix. This may be useful if you need to lower the language level.\n\nThe quick-fix removes underscores from numeric literals. For example `1_000_000` will be converted to `1000000`.\n\n\n*Numeric literals with underscores* appeared in Java 7.\nThis inspection can help to downgrade for backward compatibility with earlier Java versions.\n\nNew in 2020.2" }, "defaultConfiguration": { "enabled": false, - "level": "warning", + "level": "note", "parameters": { - "suppressToolId": "NegatedEqualityExpression", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "RemoveLiteralUnderscores", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" } }, "relationships": [ { "target": { - "id": "Java/Control flow issues", + "id": "Java/Numeric issues", "index": 31, "toolComponent": { "name": "QDJVM" @@ -12549,7 +12549,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -12582,7 +12582,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -12693,19 +12693,19 @@ ] }, { - "id": "LoggingConditionDisagreesWithLogLevelStatement", + "id": "BadOddness", "shortDescription": { - "text": "Log condition does not match logging call" + "text": "Suspicious oddness check" }, "fullDescription": { - "text": "Reports is log enabled for conditions of 'if' statements that do not match the log level of the contained logging call. For example: 'if (LOG.isTraceEnabled()) {\n // debug level logged, but checked for trace level\n LOG.debug(\"some log message\");\n }' This inspection understands the java.util.logging, Log4j, Log4j2, Apache Commons Logging and the SLF4J logging frameworks.", - "markdown": "Reports *is log enabled for* conditions of `if` statements that do not match the log level of the contained logging call.\n\n\nFor example:\n\n\n if (LOG.isTraceEnabled()) {\n // debug level logged, but checked for trace level\n LOG.debug(\"some log message\");\n }\n\nThis inspection understands the *java.util.logging* , *Log4j* , *Log4j2* , *Apache Commons Logging*\nand the *SLF4J* logging frameworks." + "text": "Reports odd-even checks of the following form: 'x % 2 == 1'. Such checks fail when used with negative odd values. Consider using 'x % 2 != 0' or '(x & 1) == 1' instead.", + "markdown": "Reports odd-even checks of the following form: `x % 2 == 1`. Such checks fail when used with negative odd values. Consider using `x % 2 != 0` or `(x & 1) == 1` instead." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "LoggingConditionDisagreesWithLogLevelStatement", + "suppressToolId": "BadOddness", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -12713,8 +12713,8 @@ "relationships": [ { "target": { - "id": "JVM languages/Logging", - "index": 52, + "id": "Java/Numeric issues", + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -12726,19 +12726,19 @@ ] }, { - "id": "BadOddness", + "id": "LoggingConditionDisagreesWithLogLevelStatement", "shortDescription": { - "text": "Suspicious oddness check" + "text": "Log condition does not match logging call" }, "fullDescription": { - "text": "Reports odd-even checks of the following form: 'x % 2 == 1'. Such checks fail when used with negative odd values. Consider using 'x % 2 != 0' or '(x & 1) == 1' instead.", - "markdown": "Reports odd-even checks of the following form: `x % 2 == 1`. Such checks fail when used with negative odd values. Consider using `x % 2 != 0` or `(x & 1) == 1` instead." + "text": "Reports is log enabled for conditions of 'if' statements that do not match the log level of the contained logging call. For example: 'if (LOG.isTraceEnabled()) {\n // debug level logged, but checked for trace level\n LOG.debug(\"some log message\");\n }' This inspection understands the java.util.logging, Log4j, Log4j2, Apache Commons Logging and the SLF4J logging frameworks.", + "markdown": "Reports *is log enabled for* conditions of `if` statements that do not match the log level of the contained logging call.\n\n\nFor example:\n\n\n if (LOG.isTraceEnabled()) {\n // debug level logged, but checked for trace level\n LOG.debug(\"some log message\");\n }\n\nThis inspection understands the *java.util.logging* , *Log4j* , *Log4j2* , *Apache Commons Logging*\nand the *SLF4J* logging frameworks." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "BadOddness", + "suppressToolId": "LoggingConditionDisagreesWithLogLevelStatement", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -12746,8 +12746,8 @@ "relationships": [ { "target": { - "id": "Java/Numeric issues", - "index": 30, + "id": "JVM languages/Logging", + "index": 52, "toolComponent": { "name": "QDJVM" } @@ -12879,7 +12879,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -12912,7 +12912,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -13031,19 +13031,19 @@ ] }, { - "id": "ResultOfObjectAllocationIgnored", + "id": "ClassGetClass", "shortDescription": { - "text": "Result of object allocation ignored" + "text": "Suspicious 'Class.getClass()' call" }, "fullDescription": { - "text": "Reports object allocations where the allocated object is ignored and neither assigned to a variable nor used in another way. Such allocation expressions are legal in Java, but are usually either unintended, or evidence of a very odd object initialization strategy. Use the options to list classes whose allocations should be ignored by this inspection.", - "markdown": "Reports object allocations where the allocated object is ignored and neither assigned to a variable nor used in another way.\n\n\nSuch allocation expressions are legal in Java, but are usually either unintended, or\nevidence of a very odd object initialization strategy.\n\n\nUse the options to list classes whose allocations should be ignored by this inspection." + "text": "Reports 'getClass()' methods that are called on a 'java.lang.Class' instance. This is usually a mistake as the result is always equivalent to 'Class.class'. If it's a mistake, then it's better to remove the 'getClass()' call and use the qualifier directly. If the behavior is intended, then it's better to write 'Class.class' explicitly to avoid confusion. Example: 'void test(Class clazz) {\n String name = clazz.getClass().getName();\n }' After one of the possible quick-fixes is applied: 'void test(Class clazz) {\n String name = clazz.getName();\n }' New in 2018.2", + "markdown": "Reports `getClass()` methods that are called on a `java.lang.Class` instance.\n\nThis is usually a mistake as the result is always equivalent to `Class.class`.\nIf it's a mistake, then it's better to remove the `getClass()` call and use the qualifier directly.\nIf the behavior is intended, then it's better to write `Class.class` explicitly to avoid confusion.\n\nExample:\n\n\n void test(Class clazz) {\n String name = clazz.getClass().getName();\n }\n\nAfter one of the possible quick-fixes is applied:\n\n\n void test(Class clazz) {\n String name = clazz.getName();\n }\n\nNew in 2018.2" }, "defaultConfiguration": { - "enabled": false, + "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "ResultOfObjectAllocationIgnored", + "suppressToolId": "ClassGetClass", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -13064,19 +13064,19 @@ ] }, { - "id": "ClassGetClass", + "id": "ResultOfObjectAllocationIgnored", "shortDescription": { - "text": "Suspicious 'Class.getClass()' call" + "text": "Result of object allocation ignored" }, "fullDescription": { - "text": "Reports 'getClass()' methods that are called on a 'java.lang.Class' instance. This is usually a mistake as the result is always equivalent to 'Class.class'. If it's a mistake, then it's better to remove the 'getClass()' call and use the qualifier directly. If the behavior is intended, then it's better to write 'Class.class' explicitly to avoid confusion. Example: 'void test(Class clazz) {\n String name = clazz.getClass().getName();\n }' After one of the possible quick-fixes is applied: 'void test(Class clazz) {\n String name = clazz.getName();\n }' New in 2018.2", - "markdown": "Reports `getClass()` methods that are called on a `java.lang.Class` instance.\n\nThis is usually a mistake as the result is always equivalent to `Class.class`.\nIf it's a mistake, then it's better to remove the `getClass()` call and use the qualifier directly.\nIf the behavior is intended, then it's better to write `Class.class` explicitly to avoid confusion.\n\nExample:\n\n\n void test(Class clazz) {\n String name = clazz.getClass().getName();\n }\n\nAfter one of the possible quick-fixes is applied:\n\n\n void test(Class clazz) {\n String name = clazz.getName();\n }\n\nNew in 2018.2" + "text": "Reports object allocations where the allocated object is ignored and neither assigned to a variable nor used in another way. Such allocation expressions are legal in Java, but are usually either unintended, or evidence of a very odd object initialization strategy. Use the options to list classes whose allocations should be ignored by this inspection.", + "markdown": "Reports object allocations where the allocated object is ignored and neither assigned to a variable nor used in another way.\n\n\nSuch allocation expressions are legal in Java, but are usually either unintended, or\nevidence of a very odd object initialization strategy.\n\n\nUse the options to list classes whose allocations should be ignored by this inspection." }, "defaultConfiguration": { - "enabled": true, + "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "ClassGetClass", + "suppressToolId": "ResultOfObjectAllocationIgnored", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -13320,7 +13320,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -13419,7 +13419,7 @@ { "target": { "id": "Java/Naming conventions/Class", - "index": 80, + "index": 81, "toolComponent": { "name": "QDJVM" } @@ -14127,19 +14127,23 @@ ] }, { - "id": "NonFinalFieldInImmutable", + "id": "StringConcatenationInMessageFormatCall", "shortDescription": { - "text": "Non-final field in '@Immutable' class" + "text": "String concatenation as argument to 'MessageFormat.format()' call" }, "fullDescription": { - "text": "Reports any non-final field in a class with the '@Immutable' annotation. This violates the contract of the '@Immutable' annotation. Example: 'import javax.annotation.concurrent.Immutable;\n @Immutable\n class Foo {\n String bar = \"foo\";\n }' Supported '@GuardedBy' annotations are: 'net.jcip.annotations.GuardedBy' 'javax.annotation.concurrent.GuardedBy' 'org.apache.http.annotation.GuardedBy' 'com.android.annotations.concurrency.GuardedBy' 'androidx.annotation.GuardedBy' 'com.google.errorprone.annotations.concurrent.GuardedBy'", - "markdown": "Reports any non-final field in a class with the `@Immutable` annotation. This violates the contract of the `@Immutable` annotation.\n\nExample:\n\n\n import javax.annotation.concurrent.Immutable;\n @Immutable\n class Foo {\n String bar = \"foo\";\n }\n\nSupported `@GuardedBy` annotations are:\n\n* `net.jcip.annotations.GuardedBy`\n* `javax.annotation.concurrent.GuardedBy`\n* `org.apache.http.annotation.GuardedBy`\n* `com.android.annotations.concurrency.GuardedBy`\n* `androidx.annotation.GuardedBy`\n* `com.google.errorprone.annotations.concurrent.GuardedBy`" + "text": "Reports non-constant string concatenations used as an argument to a call to 'MessageFormat.format()'. While occasionally intended, this is usually a misuse of the formatting method and may even cause unexpected exceptions if the variables used in the concatenated string contain special characters like '{'. Also, sometimes this could be the result of mistakenly concatenating a string format argument by typing a '+' when a ',' was meant. Example: 'String formatGreeting(String userName, int balance) {\n return MessageFormat.format(\"Hello, \" + userName + \"! Your balance is {0}.\", balance);\n }' Here, the 'userName' will be interpreted as a part of the format string, which may result in 'IllegalArgumentException' (for example, if 'userName' is '\"{\"'). This call should be probably replaced with 'MessageFormat.format(\"Hello, {0}! Your balance is {1}.\", userName, balance)'.", + "markdown": "Reports non-constant string concatenations used as an argument to a call to `MessageFormat.format()`.\n\n\nWhile occasionally intended, this is usually a misuse of the formatting method\nand may even cause unexpected exceptions if the variables used in the concatenated string contain\nspecial characters like `{`.\n\n\nAlso, sometimes this could be the result\nof mistakenly concatenating a string format argument by typing a `+` when a `,` was meant.\n\n**Example:**\n\n\n String formatGreeting(String userName, int balance) {\n return MessageFormat.format(\"Hello, \" + userName + \"! Your balance is {0}.\", balance);\n }\n\n\nHere, the `userName` will be interpreted as a part of the format string, which may result\nin `IllegalArgumentException` (for example, if `userName` is `\"{\"`).\nThis call should be probably replaced with `MessageFormat.format(\"Hello, {0}! Your balance is {1}.\", userName, balance)`." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "NonFinalFieldInImmutable", + "suppressToolId": "StringConcatenationInMessageFormatCall", + "cweIds": [ + 116, + 134 + ], "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -14147,8 +14151,8 @@ "relationships": [ { "target": { - "id": "Java/Concurrency annotation issues", - "index": 100, + "id": "Java/Probable bugs", + "index": 15, "toolComponent": { "name": "QDJVM" } @@ -14160,23 +14164,19 @@ ] }, { - "id": "StringConcatenationInMessageFormatCall", + "id": "NonFinalFieldInImmutable", "shortDescription": { - "text": "String concatenation as argument to 'MessageFormat.format()' call" + "text": "Non-final field in '@Immutable' class" }, "fullDescription": { - "text": "Reports non-constant string concatenations used as an argument to a call to 'MessageFormat.format()'. While occasionally intended, this is usually a misuse of the formatting method and may even cause unexpected exceptions if the variables used in the concatenated string contain special characters like '{'. Also, sometimes this could be the result of mistakenly concatenating a string format argument by typing a '+' when a ',' was meant. Example: 'String formatGreeting(String userName, int balance) {\n return MessageFormat.format(\"Hello, \" + userName + \"! Your balance is {0}.\", balance);\n }' Here, the 'userName' will be interpreted as a part of the format string, which may result in 'IllegalArgumentException' (for example, if 'userName' is '\"{\"'). This call should be probably replaced with 'MessageFormat.format(\"Hello, {0}! Your balance is {1}.\", userName, balance)'.", - "markdown": "Reports non-constant string concatenations used as an argument to a call to `MessageFormat.format()`.\n\n\nWhile occasionally intended, this is usually a misuse of the formatting method\nand may even cause unexpected exceptions if the variables used in the concatenated string contain\nspecial characters like `{`.\n\n\nAlso, sometimes this could be the result\nof mistakenly concatenating a string format argument by typing a `+` when a `,` was meant.\n\n**Example:**\n\n\n String formatGreeting(String userName, int balance) {\n return MessageFormat.format(\"Hello, \" + userName + \"! Your balance is {0}.\", balance);\n }\n\n\nHere, the `userName` will be interpreted as a part of the format string, which may result\nin `IllegalArgumentException` (for example, if `userName` is `\"{\"`).\nThis call should be probably replaced with `MessageFormat.format(\"Hello, {0}! Your balance is {1}.\", userName, balance)`." + "text": "Reports any non-final field in a class with the '@Immutable' annotation. This violates the contract of the '@Immutable' annotation. Example: 'import javax.annotation.concurrent.Immutable;\n @Immutable\n class Foo {\n String bar = \"foo\";\n }' Supported '@GuardedBy' annotations are: 'net.jcip.annotations.GuardedBy' 'javax.annotation.concurrent.GuardedBy' 'org.apache.http.annotation.GuardedBy' 'com.android.annotations.concurrency.GuardedBy' 'androidx.annotation.GuardedBy' 'com.google.errorprone.annotations.concurrent.GuardedBy'", + "markdown": "Reports any non-final field in a class with the `@Immutable` annotation. This violates the contract of the `@Immutable` annotation.\n\nExample:\n\n\n import javax.annotation.concurrent.Immutable;\n @Immutable\n class Foo {\n String bar = \"foo\";\n }\n\nSupported `@GuardedBy` annotations are:\n\n* `net.jcip.annotations.GuardedBy`\n* `javax.annotation.concurrent.GuardedBy`\n* `org.apache.http.annotation.GuardedBy`\n* `com.android.annotations.concurrency.GuardedBy`\n* `androidx.annotation.GuardedBy`\n* `com.google.errorprone.annotations.concurrent.GuardedBy`" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "StringConcatenationInMessageFormatCall", - "cweIds": [ - 116, - 134 - ], + "suppressToolId": "NonFinalFieldInImmutable", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -14184,8 +14184,8 @@ "relationships": [ { "target": { - "id": "Java/Probable bugs", - "index": 15, + "id": "Java/Concurrency annotation issues", + "index": 100, "toolComponent": { "name": "QDJVM" } @@ -14284,7 +14284,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -14494,19 +14494,19 @@ ] }, { - "id": "NegatedConditionalExpression", + "id": "FinalMethod", "shortDescription": { - "text": "Negated conditional expression" + "text": "Method can't be overridden" }, "fullDescription": { - "text": "Reports conditional expressions which are negated with a prefix expression, as such constructions may be confusing. There is a fix that propagates the outer negation to both branches. Example: '!(i == 1 ? a : b)' After the quick-fix is applied: 'i == 1 ? !a : !b'", - "markdown": "Reports conditional expressions which are negated with a prefix expression, as such constructions may be confusing.\n\nThere is a fix that propagates the outer negation to both branches.\n\nExample:\n\n\n !(i == 1 ? a : b)\n\nAfter the quick-fix is applied:\n\n\n i == 1 ? !a : !b\n" + "text": "Reports methods that are declared 'final'. Such methods can't be overridden and may indicate a lack of object-oriented design. Some coding standards discourage 'final' methods.", + "markdown": "Reports methods that are declared `final`. Such methods can't be overridden and may indicate a lack of object-oriented design. Some coding standards discourage `final` methods." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "NegatedConditionalExpression", + "suppressToolId": "FinalMethod", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -14514,8 +14514,8 @@ "relationships": [ { "target": { - "id": "Java/Control flow issues", - "index": 31, + "id": "Java/Class structure", + "index": 21, "toolComponent": { "name": "QDJVM" } @@ -14527,19 +14527,19 @@ ] }, { - "id": "FinalMethod", + "id": "NegatedConditionalExpression", "shortDescription": { - "text": "Method can't be overridden" + "text": "Negated conditional expression" }, "fullDescription": { - "text": "Reports methods that are declared 'final'. Such methods can't be overridden and may indicate a lack of object-oriented design. Some coding standards discourage 'final' methods.", - "markdown": "Reports methods that are declared `final`. Such methods can't be overridden and may indicate a lack of object-oriented design. Some coding standards discourage `final` methods." + "text": "Reports conditional expressions which are negated with a prefix expression, as such constructions may be confusing. There is a fix that propagates the outer negation to both branches. Example: '!(i == 1 ? a : b)' After the quick-fix is applied: 'i == 1 ? !a : !b'", + "markdown": "Reports conditional expressions which are negated with a prefix expression, as such constructions may be confusing.\n\nThere is a fix that propagates the outer negation to both branches.\n\nExample:\n\n\n !(i == 1 ? a : b)\n\nAfter the quick-fix is applied:\n\n\n i == 1 ? !a : !b\n" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "FinalMethod", + "suppressToolId": "NegatedConditionalExpression", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -14547,8 +14547,8 @@ "relationships": [ { "target": { - "id": "Java/Class structure", - "index": 21, + "id": "Java/Control flow issues", + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -14659,28 +14659,28 @@ ] }, { - "id": "SuspiciousReturnByteInputStream", + "id": "ConditionalExpression", "shortDescription": { - "text": "Suspicious byte value returned from 'InputStream.read()'" + "text": "Conditional expression" }, "fullDescription": { - "text": "Reports expressions of 'byte' type returned from a method implementing the 'InputStream.read()' method. This is suspicious because 'InputStream.read()' should return a value in the range from '0' to '255', while an expression of byte type contains a value from '-128' to '127'. The quick-fix converts the expression into an unsigned 'byte' by applying the bitmask '0xFF'. Example: 'class MyInputStream extends InputStream {\n int pos = 0;\n byte[] data;\n\n MyInputStream(byte[] input) {\n data = input;\n }\n\n @Override\n public int read() {\n if (pos == data.length) {\n return -1;\n }\n return data[pos++]; // problem\n }\n}' After applying the quick-fix: 'class MyInputStream extends InputStream {\n int pos = 0;\n byte[] data;\n\n MyInputStream(byte[] input) {\n data = input;\n }\n\n @Override\n public int read() {\n if (pos == data.length) {\n return -1;\n }\n return data[pos++] & 0xFF;\n }\n}' New in 2023.2", - "markdown": "Reports expressions of `byte` type returned from a method implementing the `InputStream.read()` method.\n\n\nThis is suspicious because `InputStream.read()` should return a value in the range from `0` to `255`,\nwhile an expression of byte type contains a value from `-128` to `127`.\nThe quick-fix converts the expression into an unsigned `byte` by applying the bitmask `0xFF`.\n\n**Example:**\n\n\n class MyInputStream extends InputStream {\n int pos = 0;\n byte[] data;\n\n MyInputStream(byte[] input) {\n data = input;\n }\n\n @Override\n public int read() {\n if (pos == data.length) {\n return -1;\n }\n return data[pos++]; // problem\n }\n }\n\nAfter applying the quick-fix:\n\n\n class MyInputStream extends InputStream {\n int pos = 0;\n byte[] data;\n\n MyInputStream(byte[] input) {\n data = input;\n }\n\n @Override\n public int read() {\n if (pos == data.length) {\n return -1;\n }\n return data[pos++] & 0xFF;\n }\n }\n\nNew in 2023.2" + "text": "Reports usages of the ternary condition operator and suggests converting them to 'if'/'else' statements. Some code standards prohibit the use of the condition operator. Example: 'Object result = (condition) ? foo() : bar();' After the quick-fix is applied: 'Object result;\n if (condition) {\n comp = foo();\n }\n else {\n comp = bar();\n }' Configure the inspection: Use the Ignore for simple assignments and returns option to ignore simple assignments and returns and allow the following constructs: 'String s = (foo == null) ? \"\" : foo.toString();' Use the Ignore places where an if statement is not possible option to ignore conditional expressions in contexts in which automatic replacement with an if statement is not possible (for example, when the conditional expression is used as an argument to a 'super()' constructor call).", + "markdown": "Reports usages of the ternary condition operator and suggests converting them to `if`/`else` statements.\n\nSome code standards prohibit the use of the condition operator.\n\nExample:\n\n\n Object result = (condition) ? foo() : bar();\n\nAfter the quick-fix is applied:\n\n\n Object result;\n if (condition) {\n comp = foo();\n }\n else {\n comp = bar();\n }\n\nConfigure the inspection:\n\nUse the **Ignore for simple assignments and returns** option to ignore simple assignments and returns and allow the following constructs:\n\n\n String s = (foo == null) ? \"\" : foo.toString();\n\n\nUse the **Ignore places where an if statement is not possible** option to ignore conditional expressions in contexts in which automatic\nreplacement with an if statement is not possible (for example, when the conditional expression is used as an argument to a\n`super()` constructor call)." }, "defaultConfiguration": { - "enabled": true, - "level": "warning", + "enabled": false, + "level": "note", "parameters": { - "suppressToolId": "SuspiciousReturnByteInputStream", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "ConditionalExpression", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" } }, "relationships": [ { "target": { - "id": "Java/Probable bugs", - "index": 15, + "id": "Java/Control flow issues", + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -14692,28 +14692,28 @@ ] }, { - "id": "ConditionalExpression", + "id": "SuspiciousReturnByteInputStream", "shortDescription": { - "text": "Conditional expression" + "text": "Suspicious byte value returned from 'InputStream.read()'" }, "fullDescription": { - "text": "Reports usages of the ternary condition operator and suggests converting them to 'if'/'else' statements. Some code standards prohibit the use of the condition operator. Example: 'Object result = (condition) ? foo() : bar();' After the quick-fix is applied: 'Object result;\n if (condition) {\n comp = foo();\n }\n else {\n comp = bar();\n }' Configure the inspection: Use the Ignore for simple assignments and returns option to ignore simple assignments and returns and allow the following constructs: 'String s = (foo == null) ? \"\" : foo.toString();' Use the Ignore places where an if statement is not possible option to ignore conditional expressions in contexts in which automatic replacement with an if statement is not possible (for example, when the conditional expression is used as an argument to a 'super()' constructor call).", - "markdown": "Reports usages of the ternary condition operator and suggests converting them to `if`/`else` statements.\n\nSome code standards prohibit the use of the condition operator.\n\nExample:\n\n\n Object result = (condition) ? foo() : bar();\n\nAfter the quick-fix is applied:\n\n\n Object result;\n if (condition) {\n comp = foo();\n }\n else {\n comp = bar();\n }\n\nConfigure the inspection:\n\nUse the **Ignore for simple assignments and returns** option to ignore simple assignments and returns and allow the following constructs:\n\n\n String s = (foo == null) ? \"\" : foo.toString();\n\n\nUse the **Ignore places where an if statement is not possible** option to ignore conditional expressions in contexts in which automatic\nreplacement with an if statement is not possible (for example, when the conditional expression is used as an argument to a\n`super()` constructor call)." + "text": "Reports expressions of 'byte' type returned from a method implementing the 'InputStream.read()' method. This is suspicious because 'InputStream.read()' should return a value in the range from '0' to '255', while an expression of byte type contains a value from '-128' to '127'. The quick-fix converts the expression into an unsigned 'byte' by applying the bitmask '0xFF'. Example: 'class MyInputStream extends InputStream {\n int pos = 0;\n byte[] data;\n\n MyInputStream(byte[] input) {\n data = input;\n }\n\n @Override\n public int read() {\n if (pos == data.length) {\n return -1;\n }\n return data[pos++]; // problem\n }\n}' After applying the quick-fix: 'class MyInputStream extends InputStream {\n int pos = 0;\n byte[] data;\n\n MyInputStream(byte[] input) {\n data = input;\n }\n\n @Override\n public int read() {\n if (pos == data.length) {\n return -1;\n }\n return data[pos++] & 0xFF;\n }\n}' New in 2023.2", + "markdown": "Reports expressions of `byte` type returned from a method implementing the `InputStream.read()` method.\n\n\nThis is suspicious because `InputStream.read()` should return a value in the range from `0` to `255`,\nwhile an expression of byte type contains a value from `-128` to `127`.\nThe quick-fix converts the expression into an unsigned `byte` by applying the bitmask `0xFF`.\n\n**Example:**\n\n\n class MyInputStream extends InputStream {\n int pos = 0;\n byte[] data;\n\n MyInputStream(byte[] input) {\n data = input;\n }\n\n @Override\n public int read() {\n if (pos == data.length) {\n return -1;\n }\n return data[pos++]; // problem\n }\n }\n\nAfter applying the quick-fix:\n\n\n class MyInputStream extends InputStream {\n int pos = 0;\n byte[] data;\n\n MyInputStream(byte[] input) {\n data = input;\n }\n\n @Override\n public int read() {\n if (pos == data.length) {\n return -1;\n }\n return data[pos++] & 0xFF;\n }\n }\n\nNew in 2023.2" }, "defaultConfiguration": { - "enabled": false, - "level": "note", + "enabled": true, + "level": "warning", "parameters": { - "suppressToolId": "ConditionalExpression", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" + "suppressToolId": "SuspiciousReturnByteInputStream", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { - "id": "Java/Control flow issues", - "index": 31, + "id": "Java/Probable bugs", + "index": 15, "toolComponent": { "name": "QDJVM" } @@ -14878,7 +14878,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -14923,19 +14923,19 @@ ] }, { - "id": "BadExceptionThrown", + "id": "UnnecessaryBoxing", "shortDescription": { - "text": "Prohibited exception thrown" + "text": "Unnecessary boxing" }, "fullDescription": { - "text": "Reports 'throw' statements that throw an inappropriate exception. For example an exception can be inappropriate because it is overly generic, such as 'java.lang.Exception' or 'java.io.IOException'. Example: 'void setup(Mode mode) {\n if (mode == null)\n throw new RuntimeException(\"Problem during setup\"); // warning: Prohibited exception 'RuntimeException' thrown\n ...\n }' Use the Prohibited exceptions list to specify which exceptions should be reported.", - "markdown": "Reports `throw` statements that throw an inappropriate exception. For example an exception can be inappropriate because it is overly generic, such as `java.lang.Exception` or `java.io.IOException`.\n\n**Example:**\n\n\n void setup(Mode mode) {\n if (mode == null)\n throw new RuntimeException(\"Problem during setup\"); // warning: Prohibited exception 'RuntimeException' thrown\n ...\n }\n\nUse the **Prohibited exceptions** list to specify which exceptions should be reported." + "text": "Reports explicit boxing, that is wrapping of primitive values in objects. Explicit manual boxing is unnecessary as of Java 5 and later, and can safely be removed. Examples: 'Integer i = new Integer(1);' → 'Integer i = Integer.valueOf(1);' 'int i = Integer.valueOf(1);' → 'int i = 1;' Use the Only report truly superfluously boxed expressions option to report only truly superfluous boxing, where a boxed value is immediately unboxed either implicitly or explicitly. In this case, the entire boxing-unboxing step can be removed. The inspection doesn't report simple explicit boxing. This inspection only reports if the language level of the project or module is 5 or higher.", + "markdown": "Reports explicit boxing, that is wrapping of primitive values in objects.\n\nExplicit manual boxing is unnecessary as of Java 5 and later, and can safely be removed.\n\n**Examples:**\n\n* `Integer i = new Integer(1);` → `Integer i = Integer.valueOf(1);`\n* `int i = Integer.valueOf(1);` → `int i = 1;`\n\n\nUse the **Only report truly superfluously boxed expressions** option to report only truly superfluous boxing,\nwhere a boxed value is immediately unboxed either implicitly or explicitly.\nIn this case, the entire boxing-unboxing step can be removed. The inspection doesn't report simple explicit boxing.\n\nThis inspection only reports if the language level of the project or module is 5 or higher." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "ProhibitedExceptionThrown", + "suppressToolId": "UnnecessaryBoxing", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -14943,8 +14943,8 @@ "relationships": [ { "target": { - "id": "Java/Error handling", - "index": 14, + "id": "Java/Java language level migration aids/Java 5", + "index": 121, "toolComponent": { "name": "QDJVM" } @@ -14956,19 +14956,19 @@ ] }, { - "id": "UnnecessaryBoxing", + "id": "BadExceptionThrown", "shortDescription": { - "text": "Unnecessary boxing" + "text": "Prohibited exception thrown" }, "fullDescription": { - "text": "Reports explicit boxing, that is wrapping of primitive values in objects. Explicit manual boxing is unnecessary as of Java 5 and later, and can safely be removed. Examples: 'Integer i = new Integer(1);' → 'Integer i = Integer.valueOf(1);' 'int i = Integer.valueOf(1);' → 'int i = 1;' Use the Only report truly superfluously boxed expressions option to report only truly superfluous boxing, where a boxed value is immediately unboxed either implicitly or explicitly. In this case, the entire boxing-unboxing step can be removed. The inspection doesn't report simple explicit boxing. This inspection only reports if the language level of the project or module is 5 or higher.", - "markdown": "Reports explicit boxing, that is wrapping of primitive values in objects.\n\nExplicit manual boxing is unnecessary as of Java 5 and later, and can safely be removed.\n\n**Examples:**\n\n* `Integer i = new Integer(1);` → `Integer i = Integer.valueOf(1);`\n* `int i = Integer.valueOf(1);` → `int i = 1;`\n\n\nUse the **Only report truly superfluously boxed expressions** option to report only truly superfluous boxing,\nwhere a boxed value is immediately unboxed either implicitly or explicitly.\nIn this case, the entire boxing-unboxing step can be removed. The inspection doesn't report simple explicit boxing.\n\nThis inspection only reports if the language level of the project or module is 5 or higher." + "text": "Reports 'throw' statements that throw an inappropriate exception. For example an exception can be inappropriate because it is overly generic, such as 'java.lang.Exception' or 'java.io.IOException'. Example: 'void setup(Mode mode) {\n if (mode == null)\n throw new RuntimeException(\"Problem during setup\"); // warning: Prohibited exception 'RuntimeException' thrown\n ...\n }' Use the Prohibited exceptions list to specify which exceptions should be reported.", + "markdown": "Reports `throw` statements that throw an inappropriate exception. For example an exception can be inappropriate because it is overly generic, such as `java.lang.Exception` or `java.io.IOException`.\n\n**Example:**\n\n\n void setup(Mode mode) {\n if (mode == null)\n throw new RuntimeException(\"Problem during setup\"); // warning: Prohibited exception 'RuntimeException' thrown\n ...\n }\n\nUse the **Prohibited exceptions** list to specify which exceptions should be reported." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "UnnecessaryBoxing", + "suppressToolId": "ProhibitedExceptionThrown", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -14976,8 +14976,8 @@ "relationships": [ { "target": { - "id": "Java/Java language level migration aids/Java 5", - "index": 121, + "id": "Java/Error handling", + "index": 14, "toolComponent": { "name": "QDJVM" } @@ -15191,19 +15191,19 @@ ] }, { - "id": "SystemGetProperty", + "id": "CollectionsMustHaveInitialCapacity", "shortDescription": { - "text": "Call to 'System.getProperty(str)' could be simplified" + "text": "Collection without initial capacity" }, "fullDescription": { - "text": "Reports the usage of method 'System.getProperty(str)' and suggests a fix in 2 cases: 'System.getProperty(\"path.separator\")' -> 'File.pathSeparator' 'System.getProperty(\"line.separator\")' -> 'System.lineSeparator()' The second one is not only less error-prone but is likely to be faster, as 'System.lineSeparator()' returns cached value, while 'System.getProperty(\"line.separator\")' each time calls to Properties (Hashtable or CHM depending on implementation).", - "markdown": "Reports the usage of method `System.getProperty(str)` and suggests a fix in 2 cases:\n\n* `System.getProperty(\"path.separator\")` -\\> `File.pathSeparator`\n* `System.getProperty(\"line.separator\")` -\\> `System.lineSeparator()`\n\nThe second one is not only less error-prone but is likely to be faster, as `System.lineSeparator()` returns cached value, while `System.getProperty(\"line.separator\")` each time calls to Properties (Hashtable or CHM depending on implementation)." + "text": "Reports attempts 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 the initial capacity is exceeded. This inspection checks allocations of classes listed in the inspection's settings. Example: 'new HashMap();' Use the following options to configure the inspection: List collection classes that should be checked. Whether to ignore field initializers.", + "markdown": "Reports attempts to instantiate a new `Collection` object without specifying an initial capacity.\n\n\nIf no initial capacity is specified, a default capacity is used, which will rarely be optimal. Failing\nto specify initial capacities for collections may result in performance issues if space needs to be reallocated and\nmemory copied when the initial capacity is exceeded.\nThis inspection checks allocations of classes listed in the inspection's settings.\n\n**Example:**\n\n\n new HashMap();\n\nUse the following options to configure the inspection:\n\n* List collection classes that should be checked.\n* Whether to ignore field initializers." }, "defaultConfiguration": { - "enabled": true, + "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "SystemGetProperty", + "suppressToolId": "CollectionWithoutInitialCapacity", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -15211,8 +15211,8 @@ "relationships": [ { "target": { - "id": "JVM languages", - "index": 3, + "id": "Java/Performance", + "index": 7, "toolComponent": { "name": "QDJVM" } @@ -15224,19 +15224,19 @@ ] }, { - "id": "CollectionsMustHaveInitialCapacity", + "id": "SystemGetProperty", "shortDescription": { - "text": "Collection without initial capacity" + "text": "Call to 'System.getProperty(str)' could be simplified" }, "fullDescription": { - "text": "Reports attempts 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 the initial capacity is exceeded. This inspection checks allocations of classes listed in the inspection's settings. Example: 'new HashMap();' Use the following options to configure the inspection: List collection classes that should be checked. Whether to ignore field initializers.", - "markdown": "Reports attempts to instantiate a new `Collection` object without specifying an initial capacity.\n\n\nIf no initial capacity is specified, a default capacity is used, which will rarely be optimal. Failing\nto specify initial capacities for collections may result in performance issues if space needs to be reallocated and\nmemory copied when the initial capacity is exceeded.\nThis inspection checks allocations of classes listed in the inspection's settings.\n\n**Example:**\n\n\n new HashMap();\n\nUse the following options to configure the inspection:\n\n* List collection classes that should be checked.\n* Whether to ignore field initializers." + "text": "Reports the usage of method 'System.getProperty(str)' and suggests a fix in 2 cases: 'System.getProperty(\"path.separator\")' -> 'File.pathSeparator' 'System.getProperty(\"line.separator\")' -> 'System.lineSeparator()' The second one is not only less error-prone but is likely to be faster, as 'System.lineSeparator()' returns cached value, while 'System.getProperty(\"line.separator\")' each time calls to Properties (Hashtable or CHM depending on implementation).", + "markdown": "Reports the usage of method `System.getProperty(str)` and suggests a fix in 2 cases:\n\n* `System.getProperty(\"path.separator\")` -\\> `File.pathSeparator`\n* `System.getProperty(\"line.separator\")` -\\> `System.lineSeparator()`\n\nThe second one is not only less error-prone but is likely to be faster, as `System.lineSeparator()` returns cached value, while `System.getProperty(\"line.separator\")` each time calls to Properties (Hashtable or CHM depending on implementation)." }, "defaultConfiguration": { - "enabled": false, + "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "CollectionWithoutInitialCapacity", + "suppressToolId": "SystemGetProperty", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -15244,8 +15244,8 @@ "relationships": [ { "target": { - "id": "Java/Performance", - "index": 7, + "id": "JVM languages", + "index": 3, "toolComponent": { "name": "QDJVM" } @@ -15410,7 +15410,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -15674,7 +15674,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -15806,7 +15806,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -16419,19 +16419,19 @@ ] }, { - "id": "NonFinalClone", + "id": "ChainedEquality", "shortDescription": { - "text": "Non-final 'clone()' in secure context" + "text": "Chained equality comparisons" }, "fullDescription": { - "text": "Reports 'clone()' methods without the 'final' modifier. Since 'clone()' can be used to instantiate objects without using a constructor, allowing the 'clone()' method to be overridden may result in corrupted objects, and even in security exploits. This may be prevented by making the 'clone()' method or the enclosing class itself 'final'. Example: 'class Main implements Cloneable {\n @Override\n protected Object clone() throws CloneNotSupportedException {\n return super.clone();\n }\n }'", - "markdown": "Reports `clone()` methods without the `final` modifier.\n\n\nSince `clone()` can be used to instantiate objects without using a constructor, allowing the `clone()`\nmethod to be overridden may result in corrupted objects, and even in security exploits. This may be prevented by making the\n`clone()` method or the enclosing class itself `final`.\n\n**Example:**\n\n\n class Main implements Cloneable {\n @Override\n protected Object clone() throws CloneNotSupportedException {\n return super.clone();\n }\n }\n" + "text": "Reports chained equality comparisons. Such comparisons may be confusing: 'a == b == c' means '(a == b) == c', but possibly 'a == b && a == c' is intended. Example: 'boolean chainedEquality(boolean a, boolean b, boolean c) {\n return a == b == c;\n }' You can use parentheses to make the comparison less confusing: 'boolean chainedEquality(boolean a, boolean b, boolean c) {\n return (a == b) == c;\n }'", + "markdown": "Reports chained equality comparisons.\n\nSuch comparisons may be confusing: `a == b == c` means `(a == b) == c`,\nbut possibly `a == b && a == c` is intended.\n\n**Example:**\n\n\n boolean chainedEquality(boolean a, boolean b, boolean c) {\n return a == b == c;\n }\n\nYou can use parentheses to make the comparison less confusing:\n\n\n boolean chainedEquality(boolean a, boolean b, boolean c) {\n return (a == b) == c;\n }\n" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "NonFinalClone", + "suppressToolId": "ChainedEqualityComparisons", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -16439,8 +16439,8 @@ "relationships": [ { "target": { - "id": "Java/Security", - "index": 38, + "id": "Java/Code style issues", + "index": 11, "toolComponent": { "name": "QDJVM" } @@ -16452,19 +16452,19 @@ ] }, { - "id": "ChainedEquality", + "id": "NonFinalClone", "shortDescription": { - "text": "Chained equality comparisons" + "text": "Non-final 'clone()' in secure context" }, "fullDescription": { - "text": "Reports chained equality comparisons. Such comparisons may be confusing: 'a == b == c' means '(a == b) == c', but possibly 'a == b && a == c' is intended. Example: 'boolean chainedEquality(boolean a, boolean b, boolean c) {\n return a == b == c;\n }' You can use parentheses to make the comparison less confusing: 'boolean chainedEquality(boolean a, boolean b, boolean c) {\n return (a == b) == c;\n }'", - "markdown": "Reports chained equality comparisons.\n\nSuch comparisons may be confusing: `a == b == c` means `(a == b) == c`,\nbut possibly `a == b && a == c` is intended.\n\n**Example:**\n\n\n boolean chainedEquality(boolean a, boolean b, boolean c) {\n return a == b == c;\n }\n\nYou can use parentheses to make the comparison less confusing:\n\n\n boolean chainedEquality(boolean a, boolean b, boolean c) {\n return (a == b) == c;\n }\n" + "text": "Reports 'clone()' methods without the 'final' modifier. Since 'clone()' can be used to instantiate objects without using a constructor, allowing the 'clone()' method to be overridden may result in corrupted objects, and even in security exploits. This may be prevented by making the 'clone()' method or the enclosing class itself 'final'. Example: 'class Main implements Cloneable {\n @Override\n protected Object clone() throws CloneNotSupportedException {\n return super.clone();\n }\n }'", + "markdown": "Reports `clone()` methods without the `final` modifier.\n\n\nSince `clone()` can be used to instantiate objects without using a constructor, allowing the `clone()`\nmethod to be overridden may result in corrupted objects, and even in security exploits. This may be prevented by making the\n`clone()` method or the enclosing class itself `final`.\n\n**Example:**\n\n\n class Main implements Cloneable {\n @Override\n protected Object clone() throws CloneNotSupportedException {\n return super.clone();\n }\n }\n" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "ChainedEqualityComparisons", + "suppressToolId": "NonFinalClone", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -16472,8 +16472,8 @@ "relationships": [ { "target": { - "id": "Java/Code style issues", - "index": 11, + "id": "Java/Security", + "index": 38, "toolComponent": { "name": "QDJVM" } @@ -16506,7 +16506,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -17067,7 +17067,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -17343,19 +17343,19 @@ ] }, { - "id": "ExplicitArrayFilling", + "id": "LoopWithImplicitTerminationCondition", "shortDescription": { - "text": "Explicit array filling" + "text": "Loop with implicit termination condition" }, "fullDescription": { - "text": "Reports loops that can be replaced with 'Arrays.setAll()' or 'Arrays.fill()' calls. This inspection suggests replacing loops with 'Arrays.setAll()' if the language level of the project or module is 8 or higher. Replacing loops with 'Arrays.fill()' is possible with any language level. Example: 'for (int i=0; i expected() default Throwable.class;\n }\n\n @Test(expected = Throwable.class)\n void testSmth() {}' After the quick-fix is applied: '@Test()\n void testSmth() {}'", + "markdown": "Reports annotation parameters that are assigned to their `default` value.\n\nExample:\n\n\n @interface Test {\n Class expected() default Throwable.class;\n }\n\n @Test(expected = Throwable.class)\n void testSmth() {}\n\nAfter the quick-fix is applied:\n\n\n @Test()\n void testSmth() {}\n" }, "defaultConfiguration": { - "enabled": true, + "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "WhileLoopSpinsOnField", + "suppressToolId": "DefaultAnnotationParam", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -20362,8 +20362,8 @@ "relationships": [ { "target": { - "id": "Java/Threading issues", - "index": 29, + "id": "Java/Declaration redundancy", + "index": 13, "toolComponent": { "name": "QDJVM" } @@ -20375,19 +20375,19 @@ ] }, { - "id": "DefaultAnnotationParam", + "id": "WhileLoopSpinsOnField", "shortDescription": { - "text": "Default annotation parameter value" + "text": "'while' loop spins on field" }, "fullDescription": { - "text": "Reports annotation parameters that are assigned to their 'default' value. Example: '@interface Test {\n Class expected() default Throwable.class;\n }\n\n @Test(expected = Throwable.class)\n void testSmth() {}' After the quick-fix is applied: '@Test()\n void testSmth() {}'", - "markdown": "Reports annotation parameters that are assigned to their `default` value.\n\nExample:\n\n\n @interface Test {\n Class expected() default Throwable.class;\n }\n\n @Test(expected = Throwable.class)\n void testSmth() {}\n\nAfter the quick-fix is applied:\n\n\n @Test()\n void testSmth() {}\n" + "text": "Reports 'while' loops that 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 to have different semantics from what was intended. The Java Memory Model allows such loops to never complete even if another thread changes the field's value. Additionally, since Java 9 it's recommended to call 'Thread.onSpinWait()' inside a spin loop on a 'volatile' field, which may significantly improve performance on some hardware. Example: 'class SpinsOnField {\n boolean ready = false;\n\n void run() {\n while (!ready) {\n }\n // do some work\n }\n\n void markAsReady() {\n ready = true;\n }\n }' After the quick-fix is applied: 'class SpinsOnField {\n volatile boolean ready = false;\n\n void run() {\n while (!ready) {\n Thread.onSpinWait();\n }\n // do some work\n }\n\n void markAsReady() {\n ready = true;\n }\n }' Use the inspection options to only report empty 'while' loops.", + "markdown": "Reports `while` loops that spin on the value of a non-`volatile` field, waiting for it to be changed by another thread.\n\n\nIn addition to being potentially extremely CPU intensive when little work is done inside the loop, such\nloops are likely to have different semantics from what was intended.\nThe Java Memory Model allows such loops to never complete even if another thread changes the field's value.\n\n\nAdditionally, since Java 9 it's recommended to call `Thread.onSpinWait()` inside a spin loop\non a `volatile` field, which may significantly improve performance on some hardware.\n\n**Example:**\n\n\n class SpinsOnField {\n boolean ready = false;\n\n void run() {\n while (!ready) {\n }\n // do some work\n }\n\n void markAsReady() {\n ready = true;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class SpinsOnField {\n volatile boolean ready = false;\n\n void run() {\n while (!ready) {\n Thread.onSpinWait();\n }\n // do some work\n }\n\n void markAsReady() {\n ready = true;\n }\n }\n\n\nUse the inspection options to only report empty `while` loops." }, "defaultConfiguration": { - "enabled": false, + "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "DefaultAnnotationParam", + "suppressToolId": "WhileLoopSpinsOnField", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -20395,8 +20395,8 @@ "relationships": [ { "target": { - "id": "Java/Declaration redundancy", - "index": 13, + "id": "Java/Threading issues", + "index": 29, "toolComponent": { "name": "QDJVM" } @@ -20631,7 +20631,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -21033,7 +21033,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -21045,19 +21045,19 @@ ] }, { - "id": "BulkFileAttributesRead", + "id": "WhileCanBeForeach", "shortDescription": { - "text": "Bulk 'Files.readAttributes()' call can be used" + "text": "'while' loop can be replaced with enhanced 'for' loop" }, "fullDescription": { - "text": "Reports multiple sequential 'java.io.File' attribute checks, such as: 'isDirectory()' 'isFile()' 'lastModified()' 'length()' Such calls can be replaced with a bulk 'Files.readAttributes()' call. This is usually more performant than multiple separate attribute checks. Example: 'boolean isNewFile(File file, long lastModified) throws IOException {\n return file.isFile() && file.lastModified() > lastModified;\n }' After the quick-fix is applied: 'boolean isNewFile(File file, long lastModified) throws IOException {\n var fileAttributes = Files.readAttributes(file.toPath(), BasicFileAttributes.class);\n return fileAttributes.isRegularFile() && fileAttributes.lastModifiedTime().toMillis() > lastModified;\n }' This inspection does not show a warning if 'IOException' is not handled in the current context, but the quick-fix is still available. Note that the replacements are usually not completely equivalent and should be applied with care. In particular, the behavior could differ if the file does not exist at all. This inspection only reports if the language level of the project or module is 7 or higher. New in 2022.1", - "markdown": "Reports multiple sequential `java.io.File` attribute checks, such as:\n\n* `isDirectory()`\n* `isFile()`\n* `lastModified()`\n* `length()`\n\nSuch calls can be replaced with a bulk `Files.readAttributes()` call. This is usually more performant than multiple separate attribute checks.\n\nExample:\n\n\n boolean isNewFile(File file, long lastModified) throws IOException {\n return file.isFile() && file.lastModified() > lastModified;\n }\n\nAfter the quick-fix is applied:\n\n\n boolean isNewFile(File file, long lastModified) throws IOException {\n var fileAttributes = Files.readAttributes(file.toPath(), BasicFileAttributes.class);\n return fileAttributes.isRegularFile() && fileAttributes.lastModifiedTime().toMillis() > lastModified;\n }\n\nThis inspection does not show a warning if `IOException` is not handled in the current context, but the quick-fix is still available.\n\nNote that the replacements are usually not completely equivalent and should be applied with care. In particular, the behavior could differ if\nthe file does not exist at all.\n\nThis inspection only reports if the language level of the project or module is 7 or higher.\n\nNew in 2022.1" + "text": "Reports 'while' loops that iterate over collections and can be replaced with enhanced 'for' loops (foreach iteration syntax). Example: 'Iterator it = c.iterator();\n while(it.hasNext()) {\n Object obj = it.next();\n System.out.println(obj);\n }' Can be replaced with: 'for (Object obj : c) {\n System.out.println(obj);\n }' This inspection depends on the Java feature 'For-each loops', which is available since Java 5.", + "markdown": "Reports `while` loops that iterate over collections and can be replaced with enhanced `for` loops (foreach iteration syntax).\n\n**Example:**\n\n\n Iterator it = c.iterator();\n while(it.hasNext()) {\n Object obj = it.next();\n System.out.println(obj);\n }\n\nCan be replaced with:\n\n\n for (Object obj : c) {\n System.out.println(obj);\n }\n\nThis inspection depends on the Java feature 'For-each loops', which is available since Java 5." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "BulkFileAttributesRead", + "suppressToolId": "WhileLoopReplaceableByForEach", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -21065,8 +21065,8 @@ "relationships": [ { "target": { - "id": "Java/Performance", - "index": 7, + "id": "Java/Java language level migration aids/Java 5", + "index": 121, "toolComponent": { "name": "QDJVM" } @@ -21078,19 +21078,19 @@ ] }, { - "id": "WhileCanBeForeach", + "id": "BulkFileAttributesRead", "shortDescription": { - "text": "'while' loop can be replaced with enhanced 'for' loop" + "text": "Bulk 'Files.readAttributes()' call can be used" }, "fullDescription": { - "text": "Reports 'while' loops that iterate over collections and can be replaced with enhanced 'for' loops (foreach iteration syntax). Example: 'Iterator it = c.iterator();\n while(it.hasNext()) {\n Object obj = it.next();\n System.out.println(obj);\n }' Can be replaced with: 'for (Object obj : c) {\n System.out.println(obj);\n }' This inspection depends on the Java feature 'For-each loops', which is available since Java 5.", - "markdown": "Reports `while` loops that iterate over collections and can be replaced with enhanced `for` loops (foreach iteration syntax).\n\n**Example:**\n\n\n Iterator it = c.iterator();\n while(it.hasNext()) {\n Object obj = it.next();\n System.out.println(obj);\n }\n\nCan be replaced with:\n\n\n for (Object obj : c) {\n System.out.println(obj);\n }\n\nThis inspection depends on the Java feature 'For-each loops', which is available since Java 5." + "text": "Reports multiple sequential 'java.io.File' attribute checks, such as: 'isDirectory()' 'isFile()' 'lastModified()' 'length()' Such calls can be replaced with a bulk 'Files.readAttributes()' call. This is usually more performant than multiple separate attribute checks. Example: 'boolean isNewFile(File file, long lastModified) throws IOException {\n return file.isFile() && file.lastModified() > lastModified;\n }' After the quick-fix is applied: 'boolean isNewFile(File file, long lastModified) throws IOException {\n var fileAttributes = Files.readAttributes(file.toPath(), BasicFileAttributes.class);\n return fileAttributes.isRegularFile() && fileAttributes.lastModifiedTime().toMillis() > lastModified;\n }' This inspection does not show a warning if 'IOException' is not handled in the current context, but the quick-fix is still available. Note that the replacements are usually not completely equivalent and should be applied with care. In particular, the behavior could differ if the file does not exist at all. This inspection only reports if the language level of the project or module is 7 or higher. New in 2022.1", + "markdown": "Reports multiple sequential `java.io.File` attribute checks, such as:\n\n* `isDirectory()`\n* `isFile()`\n* `lastModified()`\n* `length()`\n\nSuch calls can be replaced with a bulk `Files.readAttributes()` call. This is usually more performant than multiple separate attribute checks.\n\nExample:\n\n\n boolean isNewFile(File file, long lastModified) throws IOException {\n return file.isFile() && file.lastModified() > lastModified;\n }\n\nAfter the quick-fix is applied:\n\n\n boolean isNewFile(File file, long lastModified) throws IOException {\n var fileAttributes = Files.readAttributes(file.toPath(), BasicFileAttributes.class);\n return fileAttributes.isRegularFile() && fileAttributes.lastModifiedTime().toMillis() > lastModified;\n }\n\nThis inspection does not show a warning if `IOException` is not handled in the current context, but the quick-fix is still available.\n\nNote that the replacements are usually not completely equivalent and should be applied with care. In particular, the behavior could differ if\nthe file does not exist at all.\n\nThis inspection only reports if the language level of the project or module is 7 or higher.\n\nNew in 2022.1" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "WhileLoopReplaceableByForEach", + "suppressToolId": "BulkFileAttributesRead", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -21098,8 +21098,8 @@ "relationships": [ { "target": { - "id": "Java/Java language level migration aids/Java 5", - "index": 121, + "id": "Java/Performance", + "index": 7, "toolComponent": { "name": "QDJVM" } @@ -21132,7 +21132,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -21168,7 +21168,7 @@ { "target": { "id": "Java/Probable bugs/Nullability problems", - "index": 173, + "index": 172, "toolComponent": { "name": "QDJVM" } @@ -21201,7 +21201,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -21510,25 +21510,19 @@ ] }, { - "id": "LoadLibraryWithNonConstantString", + "id": "SimplifiableAssertion", "shortDescription": { - "text": "Call to 'System.loadLibrary()' with non-constant string" + "text": "Simplifiable assertion" }, "fullDescription": { - "text": "Reports calls to 'java.lang.System.loadLibrary()', 'java.lang.System.load()', 'java.lang.Runtime.loadLibrary()' and 'java.lang.Runtime.load()' which take a dynamically-constructed string as the name of the library. Constructed library name strings are a common source of security breaches. By default, this inspection ignores compile-time constants. Example: 'void test(int i) {\n System.loadLibrary(\"foo\" + i);\n }' Use the inspection settings to consider any 'static final' fields as constant. Be careful, because strings like the following will be ignored when the option is enabled: 'private static final String LIBRARY = getUserInput();'", - "markdown": "Reports calls to `java.lang.System.loadLibrary()`, `java.lang.System.load()`, `java.lang.Runtime.loadLibrary()` and `java.lang.Runtime.load()` which take a dynamically-constructed string as the name of the library.\n\n\nConstructed library name strings are a common source of security breaches.\nBy default, this inspection ignores compile-time constants.\n\n**Example:**\n\n\n void test(int i) {\n System.loadLibrary(\"foo\" + i);\n }\n\n\nUse the inspection settings to consider any `static final` fields as constant.\nBe careful, because strings like the following will be ignored when the option is enabled:\n\n\n private static final String LIBRARY = getUserInput();\n" + "text": "Reports any 'assert' calls that can be replaced with simpler and equivalent calls. Example → Replacement 'assertEquals(true, x());' 'assertTrue(x());' 'assertTrue(y() != null);' 'assertNotNull(y());' 'assertTrue(z == z());' 'assertSame(z, z());' 'assertTrue(a.equals(a()));' 'assertEquals(a, a());' 'assertTrue(false);' 'fail();'", + "markdown": "Reports any `assert` calls that can be replaced with simpler and equivalent calls.\n\n| Example | → | Replacement |\n|----------------------------------|---|-------------------------|\n| `assertEquals(`**true**`, x());` | | `assertTrue(x());` |\n| `assertTrue(y() != null);` | | `assertNotNull(y());` |\n| `assertTrue(z == z());` | | `assertSame(z, z());` |\n| `assertTrue(a.equals(a()));` | | `assertEquals(a, a());` |\n| `assertTrue(`**false**`);` | | `fail();` |" }, "defaultConfiguration": { - "enabled": false, + "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "LoadLibraryWithNonConstantString", - "cweIds": [ - 114, - 494, - 676, - 829 - ], + "suppressToolId": "SimplifiableAssertion", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -21536,8 +21530,8 @@ "relationships": [ { "target": { - "id": "Java/Security", - "index": 38, + "id": "Java/Test frameworks", + "index": 130, "toolComponent": { "name": "QDJVM" } @@ -21582,19 +21576,25 @@ ] }, { - "id": "SimplifiableAssertion", + "id": "LoadLibraryWithNonConstantString", "shortDescription": { - "text": "Simplifiable assertion" + "text": "Call to 'System.loadLibrary()' with non-constant string" }, "fullDescription": { - "text": "Reports any 'assert' calls that can be replaced with simpler and equivalent calls. Example → Replacement 'assertEquals(true, x());' 'assertTrue(x());' 'assertTrue(y() != null);' 'assertNotNull(y());' 'assertTrue(z == z());' 'assertSame(z, z());' 'assertTrue(a.equals(a()));' 'assertEquals(a, a());' 'assertTrue(false);' 'fail();'", - "markdown": "Reports any `assert` calls that can be replaced with simpler and equivalent calls.\n\n| Example | → | Replacement |\n|----------------------------------|---|-------------------------|\n| `assertEquals(`**true**`, x());` | | `assertTrue(x());` |\n| `assertTrue(y() != null);` | | `assertNotNull(y());` |\n| `assertTrue(z == z());` | | `assertSame(z, z());` |\n| `assertTrue(a.equals(a()));` | | `assertEquals(a, a());` |\n| `assertTrue(`**false**`);` | | `fail();` |" + "text": "Reports calls to 'java.lang.System.loadLibrary()', 'java.lang.System.load()', 'java.lang.Runtime.loadLibrary()' and 'java.lang.Runtime.load()' which take a dynamically-constructed string as the name of the library. Constructed library name strings are a common source of security breaches. By default, this inspection ignores compile-time constants. Example: 'void test(int i) {\n System.loadLibrary(\"foo\" + i);\n }' Use the inspection settings to consider any 'static final' fields as constant. Be careful, because strings like the following will be ignored when the option is enabled: 'private static final String LIBRARY = getUserInput();'", + "markdown": "Reports calls to `java.lang.System.loadLibrary()`, `java.lang.System.load()`, `java.lang.Runtime.loadLibrary()` and `java.lang.Runtime.load()` which take a dynamically-constructed string as the name of the library.\n\n\nConstructed library name strings are a common source of security breaches.\nBy default, this inspection ignores compile-time constants.\n\n**Example:**\n\n\n void test(int i) {\n System.loadLibrary(\"foo\" + i);\n }\n\n\nUse the inspection settings to consider any `static final` fields as constant.\nBe careful, because strings like the following will be ignored when the option is enabled:\n\n\n private static final String LIBRARY = getUserInput();\n" }, "defaultConfiguration": { - "enabled": true, + "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "SimplifiableAssertion", + "suppressToolId": "LoadLibraryWithNonConstantString", + "cweIds": [ + 114, + 494, + 676, + 829 + ], "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -21602,8 +21602,8 @@ "relationships": [ { "target": { - "id": "Java/Test frameworks", - "index": 130, + "id": "Java/Security", + "index": 38, "toolComponent": { "name": "QDJVM" } @@ -22102,7 +22102,7 @@ { "target": { "id": "Java/Naming conventions", - "index": 79, + "index": 80, "toolComponent": { "name": "QDJVM" } @@ -22135,7 +22135,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -22444,19 +22444,19 @@ ] }, { - "id": "SuppressionAnnotation", + "id": "ClassOnlyUsedInOnePackage", "shortDescription": { - "text": "Inspection suppression annotation" + "text": "Class only used from one other package" }, "fullDescription": { - "text": "Reports comments or annotations suppressing inspections. This inspection can be useful when leaving suppressions intentionally for further review. Example: '@SuppressWarnings(\"unused\")\nstatic Stream stringProvider() {\n return Stream.of(\"foo\", \"bar\");\n}'", - "markdown": "Reports comments or annotations suppressing inspections.\n\nThis inspection can be useful when leaving suppressions intentionally for further review.\n\n**Example:**\n\n\n @SuppressWarnings(\"unused\")\n static Stream stringProvider() {\n return Stream.of(\"foo\", \"bar\");\n }\n" + "text": "Reports classes that don't depend on any other class in their package, depend on classes from another package, and are themselves a dependency only for classes from this other package. Consider moving such classes to the package on which they depend. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor.", + "markdown": "Reports classes that don't depend on any other class in their package, depend on classes from another package, and are themselves a dependency only for classes from this other package. Consider moving such classes to the package on which they depend.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "SuppressionAnnotation", + "suppressToolId": "ClassOnlyUsedInOnePackage", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -22464,8 +22464,8 @@ "relationships": [ { "target": { - "id": "JVM languages", - "index": 3, + "id": "Java/Packaging issues", + "index": 46, "toolComponent": { "name": "QDJVM" } @@ -22477,19 +22477,19 @@ ] }, { - "id": "UnnecessaryToStringCall", + "id": "SuppressionAnnotation", "shortDescription": { - "text": "Unnecessary call to 'toString()'" + "text": "Inspection suppression annotation" }, "fullDescription": { - "text": "Reports calls to 'toString()' that are used in the following cases: In string concatenations In the 'java.lang.StringBuilder#append()' or 'java.lang.StringBuffer#append()' methods In the methods of 'java.io.PrintWriter' or 'java.io.PrintStream' in the methods 'org.slf4j.Logger' In these cases, conversion to string will be handled by the underlying library methods, and the explicit call to 'toString()' is not needed. Removing redundant 'toString()' calls can occasionally even improve performance and reduce object allocations. Example: 'System.out.println(this.toString())' After the quick-fix is applied: 'System.out.println(this)' Note that without the 'toString()' call, the code semantics might be different: if the expression is null, then the 'null' string will be used instead of throwing a 'NullPointerException'. Use the Report only when qualifier is known to be not-null option to avoid warnings for the values that could potentially be null. Removing the explicit 'toString()' in these cases will change the runtime semantics from throwing a 'NullPointException' to silently accepting the value when it is 'null'.", - "markdown": "Reports calls to `toString()` that are used in the following cases:\n\n* In string concatenations\n* In the `java.lang.StringBuilder#append()` or `java.lang.StringBuffer#append()` methods\n* In the methods of `java.io.PrintWriter` or `java.io.PrintStream`\n* in the methods `org.slf4j.Logger`\n\nIn these cases, conversion to string will be handled by the underlying library methods,\nand the explicit call to `toString()` is not needed.\nRemoving redundant `toString()` calls can occasionally even improve performance and reduce object allocations.\n\nExample:\n\n\n System.out.println(this.toString())\n\nAfter the quick-fix is applied:\n\n\n System.out.println(this)\n\n\nNote that without the `toString()` call, the code semantics might be different: if the expression is null,\nthen the `null` string will be used instead of throwing a `NullPointerException`.\n\nUse the **Report only when qualifier is known to be not-null** option to avoid warnings for the values that could potentially be null.\nRemoving the explicit `toString()` in these cases will change the runtime semantics\nfrom throwing a `NullPointException` to silently accepting the value when it is `null`." + "text": "Reports comments or annotations suppressing inspections. This inspection can be useful when leaving suppressions intentionally for further review. Example: '@SuppressWarnings(\"unused\")\nstatic Stream stringProvider() {\n return Stream.of(\"foo\", \"bar\");\n}'", + "markdown": "Reports comments or annotations suppressing inspections.\n\nThis inspection can be useful when leaving suppressions intentionally for further review.\n\n**Example:**\n\n\n @SuppressWarnings(\"unused\")\n static Stream stringProvider() {\n return Stream.of(\"foo\", \"bar\");\n }\n" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "UnnecessaryToStringCall", + "suppressToolId": "SuppressionAnnotation", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -22497,8 +22497,8 @@ "relationships": [ { "target": { - "id": "Java/Code style issues", - "index": 11, + "id": "JVM languages", + "index": 3, "toolComponent": { "name": "QDJVM" } @@ -22510,19 +22510,19 @@ ] }, { - "id": "ClassOnlyUsedInOnePackage", + "id": "UnnecessaryToStringCall", "shortDescription": { - "text": "Class only used from one other package" + "text": "Unnecessary call to 'toString()'" }, "fullDescription": { - "text": "Reports classes that don't depend on any other class in their package, depend on classes from another package, and are themselves a dependency only for classes from this other package. Consider moving such classes to the package on which they depend. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor.", - "markdown": "Reports classes that don't depend on any other class in their package, depend on classes from another package, and are themselves a dependency only for classes from this other package. Consider moving such classes to the package on which they depend.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor." + "text": "Reports calls to 'toString()' that are used in the following cases: In string concatenations In the 'java.lang.StringBuilder#append()' or 'java.lang.StringBuffer#append()' methods In the methods of 'java.io.PrintWriter' or 'java.io.PrintStream' in the methods 'org.slf4j.Logger' In these cases, conversion to string will be handled by the underlying library methods, and the explicit call to 'toString()' is not needed. Removing redundant 'toString()' calls can occasionally even improve performance and reduce object allocations. Example: 'System.out.println(this.toString())' After the quick-fix is applied: 'System.out.println(this)' Note that without the 'toString()' call, the code semantics might be different: if the expression is null, then the 'null' string will be used instead of throwing a 'NullPointerException'. Use the Report only when qualifier is known to be not-null option to avoid warnings for the values that could potentially be null. Removing the explicit 'toString()' in these cases will change the runtime semantics from throwing a 'NullPointException' to silently accepting the value when it is 'null'.", + "markdown": "Reports calls to `toString()` that are used in the following cases:\n\n* In string concatenations\n* In the `java.lang.StringBuilder#append()` or `java.lang.StringBuffer#append()` methods\n* In the methods of `java.io.PrintWriter` or `java.io.PrintStream`\n* in the methods `org.slf4j.Logger`\n\nIn these cases, conversion to string will be handled by the underlying library methods,\nand the explicit call to `toString()` is not needed.\nRemoving redundant `toString()` calls can occasionally even improve performance and reduce object allocations.\n\nExample:\n\n\n System.out.println(this.toString())\n\nAfter the quick-fix is applied:\n\n\n System.out.println(this)\n\n\nNote that without the `toString()` call, the code semantics might be different: if the expression is null,\nthen the `null` string will be used instead of throwing a `NullPointerException`.\n\nUse the **Report only when qualifier is known to be not-null** option to avoid warnings for the values that could potentially be null.\nRemoving the explicit `toString()` in these cases will change the runtime semantics\nfrom throwing a `NullPointException` to silently accepting the value when it is `null`." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "ClassOnlyUsedInOnePackage", + "suppressToolId": "UnnecessaryToStringCall", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -22530,8 +22530,8 @@ "relationships": [ { "target": { - "id": "Java/Packaging issues", - "index": 46, + "id": "Java/Code style issues", + "index": 11, "toolComponent": { "name": "QDJVM" } @@ -22714,22 +22714,19 @@ ] }, { - "id": "SuspiciousIndentAfterControlStatement", + "id": "NumericOverflow", "shortDescription": { - "text": "Suspicious indentation after control statement without braces" + "text": "Numeric overflow" }, "fullDescription": { - "text": "Reports suspicious indentation of statements after a control statement without braces. Such indentation can make it look like the statement is inside the control statement, when in fact it will be executed unconditionally after the control statement. Example: 'class Bar {\n void foo(int i) {\n if (i == 0)\n System.out.println(\"foo\");\n System.out.println(\"bar\"); // warning\n if (i == 1);\n System.out.println(\"great\"); // warning\n if (i == 42)\n System.out.println(\"answer\");\n System.out.println(\"question\"); // warning\n }\n }'", - "markdown": "Reports suspicious indentation of statements after a control statement without braces.\n\n\nSuch indentation can make it look like the statement is inside the control statement,\nwhen in fact it will be executed unconditionally after the control statement.\n\n**Example:**\n\n\n class Bar {\n void foo(int i) {\n if (i == 0)\n System.out.println(\"foo\");\n System.out.println(\"bar\"); // warning\n if (i == 1);\n System.out.println(\"great\"); // warning\n if (i == 42)\n System.out.println(\"answer\");\n System.out.println(\"question\"); // warning\n }\n }\n" + "text": "Reports expressions that overflow during computation. Usually, this happens by accident and indicates a bug. For example, a wrong type is used or a shift should be done in an opposite direction . Examples: 'float a = 1.0f/0.0f;\n long b = 30 * 24 * 60 * 60 * 1000;\n long c = 1000L << 62;'", + "markdown": "Reports expressions that overflow during computation. Usually, this happens by accident and indicates a bug. For example, a wrong type is used or a shift should be done in an opposite direction .\n\n**Examples:**\n\n\n float a = 1.0f/0.0f;\n long b = 30 * 24 * 60 * 60 * 1000;\n long c = 1000L << 62;\n" }, "defaultConfiguration": { "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "SuspiciousIndentAfterControlStatement", - "cweIds": [ - 483 - ], + "suppressToolId": "NumericOverflow", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -22737,8 +22734,8 @@ "relationships": [ { "target": { - "id": "Java/Probable bugs", - "index": 15, + "id": "Java/Numeric issues", + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -22750,19 +22747,22 @@ ] }, { - "id": "NumericOverflow", + "id": "SuspiciousIndentAfterControlStatement", "shortDescription": { - "text": "Numeric overflow" + "text": "Suspicious indentation after control statement without braces" }, "fullDescription": { - "text": "Reports expressions that overflow during computation. Usually, this happens by accident and indicates a bug. For example, a wrong type is used or a shift should be done in an opposite direction . Examples: 'float a = 1.0f/0.0f;\n long b = 30 * 24 * 60 * 60 * 1000;\n long c = 1000L << 62;'", - "markdown": "Reports expressions that overflow during computation. Usually, this happens by accident and indicates a bug. For example, a wrong type is used or a shift should be done in an opposite direction .\n\n**Examples:**\n\n\n float a = 1.0f/0.0f;\n long b = 30 * 24 * 60 * 60 * 1000;\n long c = 1000L << 62;\n" + "text": "Reports suspicious indentation of statements after a control statement without braces. Such indentation can make it look like the statement is inside the control statement, when in fact it will be executed unconditionally after the control statement. Example: 'class Bar {\n void foo(int i) {\n if (i == 0)\n System.out.println(\"foo\");\n System.out.println(\"bar\"); // warning\n if (i == 1);\n System.out.println(\"great\"); // warning\n if (i == 42)\n System.out.println(\"answer\");\n System.out.println(\"question\"); // warning\n }\n }'", + "markdown": "Reports suspicious indentation of statements after a control statement without braces.\n\n\nSuch indentation can make it look like the statement is inside the control statement,\nwhen in fact it will be executed unconditionally after the control statement.\n\n**Example:**\n\n\n class Bar {\n void foo(int i) {\n if (i == 0)\n System.out.println(\"foo\");\n System.out.println(\"bar\"); // warning\n if (i == 1);\n System.out.println(\"great\"); // warning\n if (i == 42)\n System.out.println(\"answer\");\n System.out.println(\"question\"); // warning\n }\n }\n" }, "defaultConfiguration": { "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "NumericOverflow", + "suppressToolId": "SuspiciousIndentAfterControlStatement", + "cweIds": [ + 483 + ], "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -22770,8 +22770,8 @@ "relationships": [ { "target": { - "id": "Java/Numeric issues", - "index": 30, + "id": "Java/Probable bugs", + "index": 15, "toolComponent": { "name": "QDJVM" } @@ -22948,19 +22948,19 @@ ] }, { - "id": "ForLoopReplaceableByWhile", + "id": "MethodCount", "shortDescription": { - "text": "'for' loop may be replaced by 'while' loop" + "text": "Class with too many methods" }, "fullDescription": { - "text": "Reports 'for' loops that contain neither initialization nor update components, and suggests converting them to 'while' loops. This makes the code easier to read. Example: 'for(; exitCondition(); ) {\n process();\n }' After the quick-fix is applied: 'while(exitCondition()) {\n process();\n }' The quick-fix is also available for other 'for' loops, so you can replace any 'for' loop with a 'while' loop. Use the Ignore 'infinite' for loops without conditions option if you want to ignore 'for' loops with trivial or non-existent conditions.", - "markdown": "Reports `for` loops that contain neither initialization nor update components, and suggests converting them to `while` loops. This makes the code easier to read.\n\nExample:\n\n\n for(; exitCondition(); ) {\n process();\n }\n\nAfter the quick-fix is applied:\n\n\n while(exitCondition()) {\n process();\n }\n\nThe quick-fix is also available for other `for` loops, so you can replace any `for` loop with a\n`while` loop.\n\nUse the **Ignore 'infinite' for loops without conditions** option if you want to ignore `for`\nloops with trivial or non-existent conditions." + "text": "Reports classes whose number of methods exceeds the specified maximum. Classes with too many methods are often trying to 'do too much'. Consider splitting such a class into multiple smaller classes. Configure the inspection: Use the Method count limit field to specify the maximum allowed number of methods in a class. Use the Ignore simple getter and setter methods option to ignore simple getters and setters in method count. Use the Ignore methods overriding/implementing a super method to ignore methods that override or implement a method from a superclass.", + "markdown": "Reports classes whose number of methods exceeds the specified maximum.\n\nClasses with too many methods are often trying to 'do too much'. Consider splitting such a class into multiple smaller classes.\n\nConfigure the inspection:\n\n* Use the **Method count limit** field to specify the maximum allowed number of methods in a class.\n* Use the **Ignore simple getter and setter methods** option to ignore simple getters and setters in method count.\n* Use the **Ignore methods overriding/implementing a super method** to ignore methods that override or implement a method from a superclass." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "ForLoopReplaceableByWhile", + "suppressToolId": "ClassWithTooManyMethods", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -22968,8 +22968,8 @@ "relationships": [ { "target": { - "id": "Java/Control flow issues", - "index": 31, + "id": "Java/Class metrics", + "index": 125, "toolComponent": { "name": "QDJVM" } @@ -22981,19 +22981,19 @@ ] }, { - "id": "MethodCount", + "id": "ForLoopReplaceableByWhile", "shortDescription": { - "text": "Class with too many methods" + "text": "'for' loop may be replaced by 'while' loop" }, "fullDescription": { - "text": "Reports classes whose number of methods exceeds the specified maximum. Classes with too many methods are often trying to 'do too much'. Consider splitting such a class into multiple smaller classes. Configure the inspection: Use the Method count limit field to specify the maximum allowed number of methods in a class. Use the Ignore simple getter and setter methods option to ignore simple getters and setters in method count. Use the Ignore methods overriding/implementing a super method to ignore methods that override or implement a method from a superclass.", - "markdown": "Reports classes whose number of methods exceeds the specified maximum.\n\nClasses with too many methods are often trying to 'do too much'. Consider splitting such a class into multiple smaller classes.\n\nConfigure the inspection:\n\n* Use the **Method count limit** field to specify the maximum allowed number of methods in a class.\n* Use the **Ignore simple getter and setter methods** option to ignore simple getters and setters in method count.\n* Use the **Ignore methods overriding/implementing a super method** to ignore methods that override or implement a method from a superclass." + "text": "Reports 'for' loops that contain neither initialization nor update components, and suggests converting them to 'while' loops. This makes the code easier to read. Example: 'for(; exitCondition(); ) {\n process();\n }' After the quick-fix is applied: 'while(exitCondition()) {\n process();\n }' The quick-fix is also available for other 'for' loops, so you can replace any 'for' loop with a 'while' loop. Use the Ignore 'infinite' for loops without conditions option if you want to ignore 'for' loops with trivial or non-existent conditions.", + "markdown": "Reports `for` loops that contain neither initialization nor update components, and suggests converting them to `while` loops. This makes the code easier to read.\n\nExample:\n\n\n for(; exitCondition(); ) {\n process();\n }\n\nAfter the quick-fix is applied:\n\n\n while(exitCondition()) {\n process();\n }\n\nThe quick-fix is also available for other `for` loops, so you can replace any `for` loop with a\n`while` loop.\n\nUse the **Ignore 'infinite' for loops without conditions** option if you want to ignore `for`\nloops with trivial or non-existent conditions." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "ClassWithTooManyMethods", + "suppressToolId": "ForLoopReplaceableByWhile", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -23001,8 +23001,8 @@ "relationships": [ { "target": { - "id": "Java/Class metrics", - "index": 125, + "id": "Java/Control flow issues", + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -23047,23 +23047,19 @@ ] }, { - "id": "IgnoreResultOfCall", + "id": "BlockingMethodInNonBlockingContext", "shortDescription": { - "text": "Result of method call ignored" + "text": "Possibly blocking call in non-blocking context" }, "fullDescription": { - "text": "Reports method calls whose result is ignored. For many methods, ignoring the result is perfectly legitimate, but for some it is almost certainly an error. Examples of methods where ignoring the result is likely an error include 'java.io.inputStream.read()', which returns the number of bytes actually read, and any method on 'java.lang.String' or 'java.math.BigInteger'. These methods do not produce side-effects and thus pointless if their result is ignored. The calls to the following methods are inspected: Simple getters (which do nothing except return a field) Methods specified in the settings of this inspection Methods annotated with 'org.jetbrains.annotations.Contract(pure=true)' Methods annotated with .*.'CheckReturnValue' Methods in a class or package annotated with 'javax.annotation.CheckReturnValue' Optionally, all non-library methods Calls to methods annotated with Error Prone's or AssertJ's '@CanIgnoreReturnValue' annotation are not reported. Use the inspection settings to specify the classes to check. Methods are matched by name or name pattern using Java regular expression syntax. For classes, use fully-qualified names. Each entry applies to both the class and all its inheritors.", - "markdown": "Reports method calls whose result is ignored.\n\nFor many methods, ignoring the result is perfectly\nlegitimate, but for some it is almost certainly an error. Examples of methods where ignoring\nthe result is likely an error include `java.io.inputStream.read()`,\nwhich returns the number of bytes actually read, and any method on\n`java.lang.String` or `java.math.BigInteger`. These methods do not produce side-effects and thus pointless\nif their result is ignored.\n\nThe calls to the following methods are inspected:\n\n* Simple getters (which do nothing except return a field)\n* Methods specified in the settings of this inspection\n* Methods annotated with `org.jetbrains.annotations.Contract(pure=true)`\n* Methods annotated with .\\*.`CheckReturnValue`\n* Methods in a class or package annotated with `javax.annotation.CheckReturnValue`\n* Optionally, all non-library methods\n\nCalls to methods annotated with Error Prone's or AssertJ's `@CanIgnoreReturnValue` annotation are not reported.\n\n\nUse the inspection settings to specify the classes to check.\nMethods are matched by name or name pattern using Java regular expression syntax.\nFor classes, use fully-qualified names. Each entry applies to both the class and all its inheritors." + "text": "Reports thread-blocking method calls in code fragments where threads should not be blocked. Example (Project Reactor): 'Flux.just(\"1\").flatMap(f -> {\n Flux just = loadUsersFromDatabase();\n just.toIterable(); // Error: blocking operator call in non-blocking scope\n return just;\n }\n);' Consider running blocking code with a proper scheduler, for example 'Schedulers.boundedElastic()', or try to find an alternative non-blocking API. Example (Kotlin Coroutines): 'suspend fun exampleFun() {\n Thread.sleep(100); // Error: blocking method call inside suspend function\n}' Consider running blocking code with a special dispatcher, for example 'Dispatchers.IO', or try to find an alternative non-blocking API. Configure the inspection: In the Blocking Annotations list, specify annotations that mark thread-blocking methods. In the Non-Blocking Annotations list, specify annotations that mark non-blocking methods. Specified annotations can be used as External Annotations", + "markdown": "Reports thread-blocking method calls in code fragments where threads should not be blocked.\n\n**Example (Project Reactor):**\n\n\n Flux.just(\"1\").flatMap(f -> {\n Flux just = loadUsersFromDatabase();\n just.toIterable(); // Error: blocking operator call in non-blocking scope\n return just;\n }\n );\n\nConsider running blocking code [with a proper\nscheduler](https://projectreactor.io/docs/core/release/reference/#faq.wrap-blocking), for example `Schedulers.boundedElastic()`, or try to find an alternative non-blocking API.\n\n**Example (Kotlin Coroutines):**\n\n\n suspend fun exampleFun() {\n Thread.sleep(100); // Error: blocking method call inside suspend function\n }\n\nConsider running blocking code [with a special dispatcher](https://kotlinlang.org/docs/coroutine-context-and-dispatchers.html),\nfor example `Dispatchers.IO`, or try to find an alternative non-blocking API.\n\nConfigure the inspection:\n\n* In the **Blocking Annotations** list, specify annotations that mark thread-blocking methods.\n* In the **Non-Blocking Annotations** list, specify annotations that mark non-blocking methods.\n\nSpecified annotations can be used as [External Annotations](https://www.jetbrains.com/help/idea/external-annotations.html)" }, "defaultConfiguration": { "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "ResultOfMethodCallIgnored", - "cweIds": [ - 252, - 563 - ], + "suppressToolId": "BlockingMethodInNonBlockingContext", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -23071,8 +23067,8 @@ "relationships": [ { "target": { - "id": "Java/Probable bugs", - "index": 15, + "id": "JVM languages", + "index": 3, "toolComponent": { "name": "QDJVM" } @@ -23084,19 +23080,23 @@ ] }, { - "id": "BlockingMethodInNonBlockingContext", + "id": "IgnoreResultOfCall", "shortDescription": { - "text": "Possibly blocking call in non-blocking context" + "text": "Result of method call ignored" }, "fullDescription": { - "text": "Reports thread-blocking method calls in code fragments where threads should not be blocked. Example (Project Reactor): 'Flux.just(\"1\").flatMap(f -> {\n Flux just = loadUsersFromDatabase();\n just.toIterable(); // Error: blocking operator call in non-blocking scope\n return just;\n }\n);' Consider running blocking code with a proper scheduler, for example 'Schedulers.boundedElastic()', or try to find an alternative non-blocking API. Example (Kotlin Coroutines): 'suspend fun exampleFun() {\n Thread.sleep(100); // Error: blocking method call inside suspend function\n}' Consider running blocking code with a special dispatcher, for example 'Dispatchers.IO', or try to find an alternative non-blocking API. Configure the inspection: In the Blocking Annotations list, specify annotations that mark thread-blocking methods. In the Non-Blocking Annotations list, specify annotations that mark non-blocking methods. Specified annotations can be used as External Annotations", - "markdown": "Reports thread-blocking method calls in code fragments where threads should not be blocked.\n\n**Example (Project Reactor):**\n\n\n Flux.just(\"1\").flatMap(f -> {\n Flux just = loadUsersFromDatabase();\n just.toIterable(); // Error: blocking operator call in non-blocking scope\n return just;\n }\n );\n\nConsider running blocking code [with a proper\nscheduler](https://projectreactor.io/docs/core/release/reference/#faq.wrap-blocking), for example `Schedulers.boundedElastic()`, or try to find an alternative non-blocking API.\n\n**Example (Kotlin Coroutines):**\n\n\n suspend fun exampleFun() {\n Thread.sleep(100); // Error: blocking method call inside suspend function\n }\n\nConsider running blocking code [with a special dispatcher](https://kotlinlang.org/docs/coroutine-context-and-dispatchers.html),\nfor example `Dispatchers.IO`, or try to find an alternative non-blocking API.\n\nConfigure the inspection:\n\n* In the **Blocking Annotations** list, specify annotations that mark thread-blocking methods.\n* In the **Non-Blocking Annotations** list, specify annotations that mark non-blocking methods.\n\nSpecified annotations can be used as [External Annotations](https://www.jetbrains.com/help/idea/external-annotations.html)" + "text": "Reports method calls whose result is ignored. For many methods, ignoring the result is perfectly legitimate, but for some it is almost certainly an error. Examples of methods where ignoring the result is likely an error include 'java.io.inputStream.read()', which returns the number of bytes actually read, and any method on 'java.lang.String' or 'java.math.BigInteger'. These methods do not produce side-effects and thus pointless if their result is ignored. The calls to the following methods are inspected: Simple getters (which do nothing except return a field) Methods specified in the settings of this inspection Methods annotated with 'org.jetbrains.annotations.Contract(pure=true)' Methods annotated with .*.'CheckReturnValue' Methods in a class or package annotated with 'javax.annotation.CheckReturnValue' Optionally, all non-library methods Calls to methods annotated with Error Prone's or AssertJ's '@CanIgnoreReturnValue' annotation are not reported. Use the inspection settings to specify the classes to check. Methods are matched by name or name pattern using Java regular expression syntax. For classes, use fully-qualified names. Each entry applies to both the class and all its inheritors.", + "markdown": "Reports method calls whose result is ignored.\n\nFor many methods, ignoring the result is perfectly\nlegitimate, but for some it is almost certainly an error. Examples of methods where ignoring\nthe result is likely an error include `java.io.inputStream.read()`,\nwhich returns the number of bytes actually read, and any method on\n`java.lang.String` or `java.math.BigInteger`. These methods do not produce side-effects and thus pointless\nif their result is ignored.\n\nThe calls to the following methods are inspected:\n\n* Simple getters (which do nothing except return a field)\n* Methods specified in the settings of this inspection\n* Methods annotated with `org.jetbrains.annotations.Contract(pure=true)`\n* Methods annotated with .\\*.`CheckReturnValue`\n* Methods in a class or package annotated with `javax.annotation.CheckReturnValue`\n* Optionally, all non-library methods\n\nCalls to methods annotated with Error Prone's or AssertJ's `@CanIgnoreReturnValue` annotation are not reported.\n\n\nUse the inspection settings to specify the classes to check.\nMethods are matched by name or name pattern using Java regular expression syntax.\nFor classes, use fully-qualified names. Each entry applies to both the class and all its inheritors." }, "defaultConfiguration": { "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "BlockingMethodInNonBlockingContext", + "suppressToolId": "ResultOfMethodCallIgnored", + "cweIds": [ + 252, + 563 + ], "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -23104,8 +23104,8 @@ "relationships": [ { "target": { - "id": "JVM languages", - "index": 3, + "id": "Java/Probable bugs", + "index": 15, "toolComponent": { "name": "QDJVM" } @@ -23171,7 +23171,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -23183,28 +23183,28 @@ ] }, { - "id": "ConfusingElse", + "id": "InnerClassReferencedViaSubclass", "shortDescription": { - "text": "Redundant 'else'" + "text": "Inner class referenced via subclass" }, "fullDescription": { - "text": "Reports redundant 'else' keywords in 'if'—'else' statements and statement chains. The 'else' keyword is redundant when all previous branches end with a 'return', 'throw', 'break', or 'continue' statement. In this case, the statements from the 'else' branch can be placed after the 'if' statement, and the 'else' keyword can be removed. Example: 'if (name == null) {\n throw new IllegalArgumentException();\n } else {\n System.out.println(name);\n }' After the quick-fix is applied: 'if (name == null) {\n throw new IllegalArgumentException();\n }\n System.out.println(name);' Disable the Report when there are no more statements after the 'if' statement option to ignore cases where the 'if'—'else' statement is the last statement in a code block.", - "markdown": "Reports redundant `else` keywords in `if`---`else` statements and statement chains.\n\n\nThe `else` keyword is redundant when all previous branches end with a\n`return`, `throw`, `break`, or `continue` statement. In this case,\nthe statements from the `else` branch can be placed after the `if` statement, and the\n`else` keyword can be removed.\n\n**Example:**\n\n\n if (name == null) {\n throw new IllegalArgumentException();\n } else {\n System.out.println(name);\n }\n\nAfter the quick-fix is applied:\n\n\n if (name == null) {\n throw new IllegalArgumentException();\n }\n System.out.println(name);\n\nDisable the **Report when there are no more statements after the 'if' statement** option to ignore cases where the `if`---`else` statement is the last statement in a code block." + "text": "Reports accesses of inner and nested classes 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 indicate a subtle confusion of inheritance and overriding. Example: 'class Super {\n static class Inner {}\n }\n\n class Sub extends Super {\n void test() {\n Sub.Inner s = new Sub.Inner(); // 'Inner' class is declared in 'Super' class, but referenced via 'Sub' class\n }\n }' After the quick-fix is applied: 'class Super {\n static class Inner {}\n }\n\n class Sub extends Super {\n void test() {\n Super.Inner s = new Super.Inner();\n }\n }'", + "markdown": "Reports accesses of inner and nested classes where the call is qualified by a subclass of the declaring class, rather than the declaring class itself.\n\n\nJava allows such qualification, but such accesses may indicate a subtle confusion of inheritance and overriding.\n\n**Example:**\n\n\n class Super {\n static class Inner {}\n }\n\n class Sub extends Super {\n void test() {\n Sub.Inner s = new Sub.Inner(); // 'Inner' class is declared in 'Super' class, but referenced via 'Sub' class\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Super {\n static class Inner {}\n }\n\n class Sub extends Super {\n void test() {\n Super.Inner s = new Super.Inner();\n }\n }\n" }, "defaultConfiguration": { "enabled": false, - "level": "note", + "level": "warning", "parameters": { - "suppressToolId": "ConfusingElseBranch", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" + "suppressToolId": "InnerClassReferencedViaSubclass", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { - "id": "Java/Control flow issues", - "index": 31, + "id": "Java/Probable bugs", + "index": 15, "toolComponent": { "name": "QDJVM" } @@ -23216,28 +23216,28 @@ ] }, { - "id": "InnerClassReferencedViaSubclass", + "id": "ConfusingElse", "shortDescription": { - "text": "Inner class referenced via subclass" + "text": "Redundant 'else'" }, "fullDescription": { - "text": "Reports accesses of inner and nested classes 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 indicate a subtle confusion of inheritance and overriding. Example: 'class Super {\n static class Inner {}\n }\n\n class Sub extends Super {\n void test() {\n Sub.Inner s = new Sub.Inner(); // 'Inner' class is declared in 'Super' class, but referenced via 'Sub' class\n }\n }' After the quick-fix is applied: 'class Super {\n static class Inner {}\n }\n\n class Sub extends Super {\n void test() {\n Super.Inner s = new Super.Inner();\n }\n }'", - "markdown": "Reports accesses of inner and nested classes where the call is qualified by a subclass of the declaring class, rather than the declaring class itself.\n\n\nJava allows such qualification, but such accesses may indicate a subtle confusion of inheritance and overriding.\n\n**Example:**\n\n\n class Super {\n static class Inner {}\n }\n\n class Sub extends Super {\n void test() {\n Sub.Inner s = new Sub.Inner(); // 'Inner' class is declared in 'Super' class, but referenced via 'Sub' class\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Super {\n static class Inner {}\n }\n\n class Sub extends Super {\n void test() {\n Super.Inner s = new Super.Inner();\n }\n }\n" + "text": "Reports redundant 'else' keywords in 'if'—'else' statements and statement chains. The 'else' keyword is redundant when all previous branches end with a 'return', 'throw', 'break', or 'continue' statement. In this case, the statements from the 'else' branch can be placed after the 'if' statement, and the 'else' keyword can be removed. Example: 'if (name == null) {\n throw new IllegalArgumentException();\n } else {\n System.out.println(name);\n }' After the quick-fix is applied: 'if (name == null) {\n throw new IllegalArgumentException();\n }\n System.out.println(name);' Disable the Report when there are no more statements after the 'if' statement option to ignore cases where the 'if'—'else' statement is the last statement in a code block.", + "markdown": "Reports redundant `else` keywords in `if`---`else` statements and statement chains.\n\n\nThe `else` keyword is redundant when all previous branches end with a\n`return`, `throw`, `break`, or `continue` statement. In this case,\nthe statements from the `else` branch can be placed after the `if` statement, and the\n`else` keyword can be removed.\n\n**Example:**\n\n\n if (name == null) {\n throw new IllegalArgumentException();\n } else {\n System.out.println(name);\n }\n\nAfter the quick-fix is applied:\n\n\n if (name == null) {\n throw new IllegalArgumentException();\n }\n System.out.println(name);\n\nDisable the **Report when there are no more statements after the 'if' statement** option to ignore cases where the `if`---`else` statement is the last statement in a code block." }, "defaultConfiguration": { "enabled": false, - "level": "warning", + "level": "note", "parameters": { - "suppressToolId": "InnerClassReferencedViaSubclass", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "ConfusingElseBranch", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" } }, "relationships": [ { "target": { - "id": "Java/Probable bugs", - "index": 15, + "id": "Java/Control flow issues", + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -23513,19 +23513,19 @@ ] }, { - "id": "ObjectToString", + "id": "UnnecessarilyQualifiedStaticallyImportedElement", "shortDescription": { - "text": "Call to default 'toString()'" + "text": "Unnecessarily qualified statically imported element" }, "fullDescription": { - "text": "Reports calls to 'toString()' that use the default implementation from 'java.lang.Object'. The default implementation is rarely intended but may be used by accident. Calls to 'toString()' on objects with 'java.lang.Object', interface or abstract class type are ignored by this inspection. Example: 'class Bar {\n void foo1(Bar bar) {\n String s = bar.toString(); // warning\n /* ... */\n }\n\n void foo2(Object obj) {\n String s = obj.toString(); // no warning here\n /* ... */\n }\n }'", - "markdown": "Reports calls to `toString()` that use the default implementation from `java.lang.Object`.\n\nThe default implementation is rarely intended but may be used by accident.\n\n\nCalls to `toString()` on objects with `java.lang.Object`,\ninterface or abstract class type are ignored by this inspection.\n\n**Example:**\n\n\n class Bar {\n void foo1(Bar bar) {\n String s = bar.toString(); // warning\n /* ... */\n }\n\n void foo2(Object obj) {\n String s = obj.toString(); // no warning here\n /* ... */\n }\n }\n" + "text": "Reports usage of statically imported members qualified with their containing class name. Such qualification is unnecessary and can be removed because statically imported members can be accessed directly by member name. Example: 'import static foo.Test.WIDTH;\n\n class Bar {\n void bar() {\n System.out.println(Test.WIDTH);\n }\n }' After the quick-fix is applied: 'import static foo.Test.WIDTH;\n\n class Bar {\n void bar() {\n System.out.println(WIDTH);\n }\n }'", + "markdown": "Reports usage of statically imported members qualified with their containing class name.\n\nSuch qualification is unnecessary and can be removed\nbecause statically imported members can be accessed directly by member name.\n\n**Example:**\n\n\n import static foo.Test.WIDTH;\n\n class Bar {\n void bar() {\n System.out.println(Test.WIDTH);\n }\n }\n\nAfter the quick-fix is applied:\n\n\n import static foo.Test.WIDTH;\n\n class Bar {\n void bar() {\n System.out.println(WIDTH);\n }\n }\n" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "ObjectToString", + "suppressToolId": "UnnecessarilyQualifiedStaticallyImportedElement", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -23533,8 +23533,8 @@ "relationships": [ { "target": { - "id": "Java/Probable bugs", - "index": 15, + "id": "Java/Code style issues", + "index": 11, "toolComponent": { "name": "QDJVM" } @@ -23546,19 +23546,19 @@ ] }, { - "id": "UnnecessarilyQualifiedStaticallyImportedElement", + "id": "ObjectToString", "shortDescription": { - "text": "Unnecessarily qualified statically imported element" + "text": "Call to default 'toString()'" }, "fullDescription": { - "text": "Reports usage of statically imported members qualified with their containing class name. Such qualification is unnecessary and can be removed because statically imported members can be accessed directly by member name. Example: 'import static foo.Test.WIDTH;\n\n class Bar {\n void bar() {\n System.out.println(Test.WIDTH);\n }\n }' After the quick-fix is applied: 'import static foo.Test.WIDTH;\n\n class Bar {\n void bar() {\n System.out.println(WIDTH);\n }\n }'", - "markdown": "Reports usage of statically imported members qualified with their containing class name.\n\nSuch qualification is unnecessary and can be removed\nbecause statically imported members can be accessed directly by member name.\n\n**Example:**\n\n\n import static foo.Test.WIDTH;\n\n class Bar {\n void bar() {\n System.out.println(Test.WIDTH);\n }\n }\n\nAfter the quick-fix is applied:\n\n\n import static foo.Test.WIDTH;\n\n class Bar {\n void bar() {\n System.out.println(WIDTH);\n }\n }\n" + "text": "Reports calls to 'toString()' that use the default implementation from 'java.lang.Object'. The default implementation is rarely intended but may be used by accident. Calls to 'toString()' on objects with 'java.lang.Object', interface or abstract class type are ignored by this inspection. Example: 'class Bar {\n void foo1(Bar bar) {\n String s = bar.toString(); // warning\n /* ... */\n }\n\n void foo2(Object obj) {\n String s = obj.toString(); // no warning here\n /* ... */\n }\n }'", + "markdown": "Reports calls to `toString()` that use the default implementation from `java.lang.Object`.\n\nThe default implementation is rarely intended but may be used by accident.\n\n\nCalls to `toString()` on objects with `java.lang.Object`,\ninterface or abstract class type are ignored by this inspection.\n\n**Example:**\n\n\n class Bar {\n void foo1(Bar bar) {\n String s = bar.toString(); // warning\n /* ... */\n }\n\n void foo2(Object obj) {\n String s = obj.toString(); // no warning here\n /* ... */\n }\n }\n" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "UnnecessarilyQualifiedStaticallyImportedElement", + "suppressToolId": "ObjectToString", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -23566,8 +23566,8 @@ "relationships": [ { "target": { - "id": "Java/Code style issues", - "index": 11, + "id": "Java/Probable bugs", + "index": 15, "toolComponent": { "name": "QDJVM" } @@ -23699,7 +23699,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -23897,7 +23897,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -23930,7 +23930,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -24098,7 +24098,7 @@ { "target": { "id": "Java/Naming conventions", - "index": 79, + "index": 80, "toolComponent": { "name": "QDJVM" } @@ -24428,7 +24428,7 @@ { "target": { "id": "Java/Naming conventions/Class", - "index": 80, + "index": 81, "toolComponent": { "name": "QDJVM" } @@ -24543,19 +24543,19 @@ ] }, { - "id": "Java9UndeclaredServiceUsage", + "id": "InnerClassMayBeStatic", "shortDescription": { - "text": "Usage of service not declared in 'module-info'" + "text": "Inner class may be 'static'" }, "fullDescription": { - "text": "Reports situations in which a service is loaded with 'java.util.ServiceLoader' but it isn't declared with the 'uses' clause in the 'module-info.java' file and suggests inserting it. This inspection depends on the Java feature 'Modules', which is available since Java 9. New in 2018.1", - "markdown": "Reports situations in which a service is loaded with `java.util.ServiceLoader` but it isn't declared with the `uses` clause in the `module-info.java` file and suggests inserting it.\n\nThis inspection depends on the Java feature 'Modules', which is available since Java 9.\n\nNew in 2018.1" + "text": "Reports inner classes that can be made 'static'. A 'static' inner class does not keep an implicit reference to its enclosing instance. When using Java 17 or before, this prevents a common cause of memory leaks and uses less memory per instance of the class. Example: 'public class Outer {\n class Inner { // not static\n public void foo() {\n bar(\"x\");\n }\n\n private void bar(String string) {}\n }\n }' After the quick-fix is applied: 'public class Outer {\n static class Inner {\n public void foo() {\n bar(\"x\");\n }\n\n private void bar(String string) {}\n }\n }'", + "markdown": "Reports inner classes that can be made `static`.\n\nA `static` inner class does not keep an implicit reference to its enclosing instance.\nWhen using Java 17 or before,\nthis prevents a common cause of memory leaks and uses less memory per instance of the class.\n\n**Example:**\n\n\n public class Outer {\n class Inner { // not static\n public void foo() {\n bar(\"x\");\n }\n\n private void bar(String string) {}\n }\n }\n\nAfter the quick-fix is applied:\n\n\n public class Outer {\n static class Inner {\n public void foo() {\n bar(\"x\");\n }\n\n private void bar(String string) {}\n }\n }\n" }, "defaultConfiguration": { "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "Java9UndeclaredServiceUsage", + "suppressToolId": "InnerClassMayBeStatic", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -24563,8 +24563,8 @@ "relationships": [ { "target": { - "id": "Java/Visibility", - "index": 98, + "id": "Java/Memory", + "index": 166, "toolComponent": { "name": "QDJVM" } @@ -24609,19 +24609,19 @@ ] }, { - "id": "InnerClassMayBeStatic", + "id": "Java9UndeclaredServiceUsage", "shortDescription": { - "text": "Inner class may be 'static'" + "text": "Usage of service not declared in 'module-info'" }, "fullDescription": { - "text": "Reports inner classes that can be made 'static'. A 'static' inner class does not keep an implicit reference to its enclosing instance. When using Java 17 or before, this prevents a common cause of memory leaks and uses less memory per instance of the class. Example: 'public class Outer {\n class Inner { // not static\n public void foo() {\n bar(\"x\");\n }\n\n private void bar(String string) {}\n }\n }' After the quick-fix is applied: 'public class Outer {\n static class Inner {\n public void foo() {\n bar(\"x\");\n }\n\n private void bar(String string) {}\n }\n }'", - "markdown": "Reports inner classes that can be made `static`.\n\nA `static` inner class does not keep an implicit reference to its enclosing instance.\nWhen using Java 17 or before,\nthis prevents a common cause of memory leaks and uses less memory per instance of the class.\n\n**Example:**\n\n\n public class Outer {\n class Inner { // not static\n public void foo() {\n bar(\"x\");\n }\n\n private void bar(String string) {}\n }\n }\n\nAfter the quick-fix is applied:\n\n\n public class Outer {\n static class Inner {\n public void foo() {\n bar(\"x\");\n }\n\n private void bar(String string) {}\n }\n }\n" + "text": "Reports situations in which a service is loaded with 'java.util.ServiceLoader' but it isn't declared with the 'uses' clause in the 'module-info.java' file and suggests inserting it. This inspection depends on the Java feature 'Modules', which is available since Java 9. New in 2018.1", + "markdown": "Reports situations in which a service is loaded with `java.util.ServiceLoader` but it isn't declared with the `uses` clause in the `module-info.java` file and suggests inserting it.\n\nThis inspection depends on the Java feature 'Modules', which is available since Java 9.\n\nNew in 2018.1" }, "defaultConfiguration": { "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "InnerClassMayBeStatic", + "suppressToolId": "Java9UndeclaredServiceUsage", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -24629,8 +24629,8 @@ "relationships": [ { "target": { - "id": "Java/Memory", - "index": 166, + "id": "Java/Visibility", + "index": 98, "toolComponent": { "name": "QDJVM" } @@ -25253,19 +25253,19 @@ ] }, { - "id": "ClassWithoutNoArgConstructor", + "id": "ClassWithTooManyDependencies", "shortDescription": { - "text": "Class without no-arg constructor" + "text": "Class with too many dependencies" }, "fullDescription": { - "text": "Reports classes without a constructor that takes no arguments (i.e. has no parameters). No-arg constructors are necessary in some contexts. For example, if a class needs to be created using reflection. Example: 'public class Bean {\n private String name;\n\n public Bean(String name) {\n this.name = name;\n }\n }' Use the checkbox below to ignore classes without explicit constructors. The compiler provides a default no-arg constructor to such classes.", - "markdown": "Reports classes without a constructor that takes no arguments (i.e. has no parameters). No-arg constructors are necessary in some contexts. For example, if a class needs to be created using reflection.\n\n**Example:**\n\n\n public class Bean {\n private String name;\n\n public Bean(String name) {\n this.name = name;\n }\n }\n\n\nUse the checkbox below to ignore classes without explicit constructors.\nThe compiler provides a default no-arg constructor to such classes." + "text": "Reports classes that are directly dependent on too many other classes in the project. Modifications to any dependency of such classes may require changing the class, thus making it prone to instability. Only top-level classes are reported. Use the Maximum number of dependencies field to specify the maximum allowed number of dependencies for a class. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor.", + "markdown": "Reports classes that are directly dependent on too many other classes in the project.\n\nModifications to any dependency of such classes may require changing the class, thus making it prone to instability.\n\nOnly top-level classes are reported.\n\nUse the **Maximum number of dependencies** field to specify the maximum allowed number of dependencies for a class.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "ClassWithoutNoArgConstructor", + "suppressToolId": "ClassWithTooManyDependencies", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -25273,8 +25273,8 @@ "relationships": [ { "target": { - "id": "Java/JavaBeans issues", - "index": 141, + "id": "Java/Dependency issues", + "index": 146, "toolComponent": { "name": "QDJVM" } @@ -25286,19 +25286,19 @@ ] }, { - "id": "ClassWithTooManyDependencies", + "id": "ClassWithoutNoArgConstructor", "shortDescription": { - "text": "Class with too many dependencies" + "text": "Class without no-arg constructor" }, "fullDescription": { - "text": "Reports classes that are directly dependent on too many other classes in the project. Modifications to any dependency of such classes may require changing the class, thus making it prone to instability. Only top-level classes are reported. Use the Maximum number of dependencies field to specify the maximum allowed number of dependencies for a class. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor.", - "markdown": "Reports classes that are directly dependent on too many other classes in the project.\n\nModifications to any dependency of such classes may require changing the class, thus making it prone to instability.\n\nOnly top-level classes are reported.\n\nUse the **Maximum number of dependencies** field to specify the maximum allowed number of dependencies for a class.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor." + "text": "Reports classes without a constructor that takes no arguments (i.e. has no parameters). No-arg constructors are necessary in some contexts. For example, if a class needs to be created using reflection. Example: 'public class Bean {\n private String name;\n\n public Bean(String name) {\n this.name = name;\n }\n }' Use the checkbox below to ignore classes without explicit constructors. The compiler provides a default no-arg constructor to such classes.", + "markdown": "Reports classes without a constructor that takes no arguments (i.e. has no parameters). No-arg constructors are necessary in some contexts. For example, if a class needs to be created using reflection.\n\n**Example:**\n\n\n public class Bean {\n private String name;\n\n public Bean(String name) {\n this.name = name;\n }\n }\n\n\nUse the checkbox below to ignore classes without explicit constructors.\nThe compiler provides a default no-arg constructor to such classes." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "ClassWithTooManyDependencies", + "suppressToolId": "ClassWithoutNoArgConstructor", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -25306,8 +25306,8 @@ "relationships": [ { "target": { - "id": "Java/Dependency issues", - "index": 146, + "id": "Java/JavaBeans issues", + "index": 141, "toolComponent": { "name": "QDJVM" } @@ -25355,19 +25355,19 @@ ] }, { - "id": "NewExceptionWithoutArguments", + "id": "Contract", "shortDescription": { - "text": "Exception constructor called without arguments" + "text": "Contract issues" }, "fullDescription": { - "text": "Reports creation of a exception instance without any arguments specified. When an exception is constructed without any arguments, it contains no information about the problem that occurred, which makes debugging needlessly hard. Example: 'throw new IOException(); // warning: exception without arguments'", - "markdown": "Reports creation of a exception instance without any arguments specified.\n\nWhen an exception is constructed without any arguments, it contains no information about the problem that occurred, which makes\ndebugging needlessly hard.\n\n**Example:**\n\n\n throw new IOException(); // warning: exception without arguments\n" + "text": "Reports issues in method '@Contract' annotations. The types of issues that can be reported are: Errors in contract syntax Contracts that do not conform to the method signature (wrong parameter count) Method implementations that contradict the contract (e.g. return 'true' when the contract says 'false') Example: '// method has no parameters, but contract expects 1\n @Contract(\"_ -> fail\")\n void x() {\n throw new AssertionError();\n }'", + "markdown": "Reports issues in method `@Contract` annotations. The types of issues that can be reported are:\n\n* Errors in contract syntax\n* Contracts that do not conform to the method signature (wrong parameter count)\n* Method implementations that contradict the contract (e.g. return `true` when the contract says `false`)\n\nExample:\n\n\n // method has no parameters, but contract expects 1\n @Contract(\"_ -> fail\")\n void x() {\n throw new AssertionError();\n }\n" }, "defaultConfiguration": { - "enabled": false, + "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "NewExceptionWithoutArguments", + "suppressToolId": "Contract", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -25375,8 +25375,8 @@ "relationships": [ { "target": { - "id": "Java/Error handling", - "index": 14, + "id": "Java/Probable bugs", + "index": 15, "toolComponent": { "name": "QDJVM" } @@ -25388,19 +25388,19 @@ ] }, { - "id": "Contract", + "id": "NewExceptionWithoutArguments", "shortDescription": { - "text": "Contract issues" + "text": "Exception constructor called without arguments" }, "fullDescription": { - "text": "Reports issues in method '@Contract' annotations. The types of issues that can be reported are: Errors in contract syntax Contracts that do not conform to the method signature (wrong parameter count) Method implementations that contradict the contract (e.g. return 'true' when the contract says 'false') Example: '// method has no parameters, but contract expects 1\n @Contract(\"_ -> fail\")\n void x() {\n throw new AssertionError();\n }'", - "markdown": "Reports issues in method `@Contract` annotations. The types of issues that can be reported are:\n\n* Errors in contract syntax\n* Contracts that do not conform to the method signature (wrong parameter count)\n* Method implementations that contradict the contract (e.g. return `true` when the contract says `false`)\n\nExample:\n\n\n // method has no parameters, but contract expects 1\n @Contract(\"_ -> fail\")\n void x() {\n throw new AssertionError();\n }\n" + "text": "Reports creation of a exception instance without any arguments specified. When an exception is constructed without any arguments, it contains no information about the problem that occurred, which makes debugging needlessly hard. Example: 'throw new IOException(); // warning: exception without arguments'", + "markdown": "Reports creation of a exception instance without any arguments specified.\n\nWhen an exception is constructed without any arguments, it contains no information about the problem that occurred, which makes\ndebugging needlessly hard.\n\n**Example:**\n\n\n throw new IOException(); // warning: exception without arguments\n" }, "defaultConfiguration": { - "enabled": true, + "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "Contract", + "suppressToolId": "NewExceptionWithoutArguments", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -25408,8 +25408,8 @@ "relationships": [ { "target": { - "id": "Java/Probable bugs", - "index": 15, + "id": "Java/Error handling", + "index": 14, "toolComponent": { "name": "QDJVM" } @@ -25685,19 +25685,19 @@ ] }, { - "id": "UnnecessaryLocalVariable", + "id": "Java9RedundantRequiresStatement", "shortDescription": { - "text": "Redundant local variable" + "text": "Redundant 'requires' directive in module-info" }, "fullDescription": { - "text": "Reports unnecessary local variables that add nothing to the comprehensibility of a method, including: Local variables that are immediately returned. Local variables that are immediately assigned to another variable and then not used. Local variables that always have the same value as another local variable or parameter. Example: 'boolean yes() {\n boolean b = true;\n return b;\n }' After the quick-fix is applied: 'boolean yes() {\n return true;\n }' Configure the inspection: Use the Ignore immediately returned or thrown variables option to ignore immediately returned or thrown variables. Some coding styles suggest using such variables for clarity and ease of debugging. Use the Ignore variables which have an annotation option to ignore annotated variables.", - "markdown": "Reports unnecessary local variables that add nothing to the comprehensibility of a method, including:\n\n* Local variables that are immediately returned.\n* Local variables that are immediately assigned to another variable and then not used.\n* Local variables that always have the same value as another local variable or parameter.\n\n**Example:**\n\n\n boolean yes() {\n boolean b = true;\n return b;\n }\n\nAfter the quick-fix is applied:\n\n\n boolean yes() {\n return true;\n }\n \nConfigure the inspection:\n\n* Use the **Ignore immediately returned or thrown variables** option to ignore immediately returned or thrown variables. Some coding styles suggest using such variables for clarity and ease of debugging.\n* Use the **Ignore variables which have an annotation** option to ignore annotated variables." + "text": "Reports redundant 'requires' directives in Java Platform Module System 'module-info.java' files. A 'requires' directive is redundant when a module 'A' requires a module 'B', but the code in module 'A' doesn't import any packages or classes from 'B'. Furthermore, all modules have an implicitly declared dependence on the 'java.base' module, therefore a 'requires java.base;' directive is always redundant. The quick-fix deletes the redundant 'requires' directive. If the deleted dependency re-exported modules that are actually used, the fix adds a 'requires' directives for these modules. This inspection only reports if the language level of the project or module is 9 or higher. New in 2017.1", + "markdown": "Reports redundant `requires` directives in Java Platform Module System `module-info.java` files. A `requires` directive is redundant when a module `A` requires a module `B`, but the code in module `A` doesn't import any packages or classes from `B`. Furthermore, all modules have an implicitly declared dependence on the `java.base` module, therefore a `requires java.base;` directive is always redundant.\n\n\nThe quick-fix deletes the redundant `requires` directive.\nIf the deleted dependency re-exported modules that are actually used, the fix adds a `requires` directives for these modules.\n\nThis inspection only reports if the language level of the project or module is 9 or higher.\n\nNew in 2017.1" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "UnnecessaryLocalVariable", + "suppressToolId": "Java9RedundantRequiresStatement", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -25705,8 +25705,8 @@ "relationships": [ { "target": { - "id": "Java/Data flow", - "index": 65, + "id": "Java/Declaration redundancy", + "index": 13, "toolComponent": { "name": "QDJVM" } @@ -25718,19 +25718,19 @@ ] }, { - "id": "Java9RedundantRequiresStatement", + "id": "UnnecessaryLocalVariable", "shortDescription": { - "text": "Redundant 'requires' directive in module-info" + "text": "Redundant local variable" }, "fullDescription": { - "text": "Reports redundant 'requires' directives in Java Platform Module System 'module-info.java' files. A 'requires' directive is redundant when a module 'A' requires a module 'B', but the code in module 'A' doesn't import any packages or classes from 'B'. Furthermore, all modules have an implicitly declared dependence on the 'java.base' module, therefore a 'requires java.base;' directive is always redundant. The quick-fix deletes the redundant 'requires' directive. If the deleted dependency re-exported modules that are actually used, the fix adds a 'requires' directives for these modules. This inspection only reports if the language level of the project or module is 9 or higher. New in 2017.1", - "markdown": "Reports redundant `requires` directives in Java Platform Module System `module-info.java` files. A `requires` directive is redundant when a module `A` requires a module `B`, but the code in module `A` doesn't import any packages or classes from `B`. Furthermore, all modules have an implicitly declared dependence on the `java.base` module, therefore a `requires java.base;` directive is always redundant.\n\n\nThe quick-fix deletes the redundant `requires` directive.\nIf the deleted dependency re-exported modules that are actually used, the fix adds a `requires` directives for these modules.\n\nThis inspection only reports if the language level of the project or module is 9 or higher.\n\nNew in 2017.1" + "text": "Reports unnecessary local variables that add nothing to the comprehensibility of a method, including: Local variables that are immediately returned. Local variables that are immediately assigned to another variable and then not used. Local variables that always have the same value as another local variable or parameter. Example: 'boolean yes() {\n boolean b = true;\n return b;\n }' After the quick-fix is applied: 'boolean yes() {\n return true;\n }' Configure the inspection: Use the Ignore immediately returned or thrown variables option to ignore immediately returned or thrown variables. Some coding styles suggest using such variables for clarity and ease of debugging. Use the Ignore variables which have an annotation option to ignore annotated variables.", + "markdown": "Reports unnecessary local variables that add nothing to the comprehensibility of a method, including:\n\n* Local variables that are immediately returned.\n* Local variables that are immediately assigned to another variable and then not used.\n* Local variables that always have the same value as another local variable or parameter.\n\n**Example:**\n\n\n boolean yes() {\n boolean b = true;\n return b;\n }\n\nAfter the quick-fix is applied:\n\n\n boolean yes() {\n return true;\n }\n \nConfigure the inspection:\n\n* Use the **Ignore immediately returned or thrown variables** option to ignore immediately returned or thrown variables. Some coding styles suggest using such variables for clarity and ease of debugging.\n* Use the **Ignore variables which have an annotation** option to ignore annotated variables." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "Java9RedundantRequiresStatement", + "suppressToolId": "UnnecessaryLocalVariable", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -25738,8 +25738,8 @@ "relationships": [ { "target": { - "id": "Java/Declaration redundancy", - "index": 13, + "id": "Java/Data flow", + "index": 65, "toolComponent": { "name": "QDJVM" } @@ -25805,7 +25805,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -25973,7 +25973,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -26183,19 +26183,19 @@ ] }, { - "id": "IfCanBeSwitch", + "id": "NonPublicClone", "shortDescription": { - "text": "'if' can be replaced with 'switch'" + "text": "'clone()' method not 'public'" }, "fullDescription": { - "text": "Reports 'if' statements that can be replaced with 'switch' statements. The replacement result is usually shorter and clearer. Example: 'void test(String str) {\n if (str.equals(\"1\")) {\n System.out.println(1);\n } else if (str.equals(\"2\")) {\n System.out.println(2);\n } else if (str.equals(\"3\")) {\n System.out.println(3);\n } else {\n System.out.println(4);\n }\n }' After the quick-fix is applied: 'void test(String str) {\n switch (str) {\n case \"1\" -> System.out.println(1);\n case \"2\" -> System.out.println(2);\n case \"3\" -> System.out.println(3);\n default -> System.out.println(4);\n }\n }' This inspection only reports if the language level of the project or module is 7 or higher. Use the Minimum number of 'if' condition branches field to specify the minimum number of 'if' condition branches for an 'if' statement to have to be reported. Note that the terminal 'else' branch (without 'if') is not counted. Use the Suggest switch on numbers option to enable the suggestion of 'switch' statements on primitive and boxed numbers and characters. Use the Suggest switch on enums option to enable the suggestion of 'switch' statements on 'enum' constants. Use the Only suggest on null-safe expressions option to suggest 'switch' statements that can't introduce a 'NullPointerException' only.", - "markdown": "Reports `if` statements that can be replaced with `switch` statements.\n\nThe replacement result is usually shorter and clearer.\n\n**Example:**\n\n\n void test(String str) {\n if (str.equals(\"1\")) {\n System.out.println(1);\n } else if (str.equals(\"2\")) {\n System.out.println(2);\n } else if (str.equals(\"3\")) {\n System.out.println(3);\n } else {\n System.out.println(4);\n }\n }\n\nAfter the quick-fix is applied:\n\n\n void test(String str) {\n switch (str) {\n case \"1\" -> System.out.println(1);\n case \"2\" -> System.out.println(2);\n case \"3\" -> System.out.println(3);\n default -> System.out.println(4);\n }\n }\n \nThis inspection only reports if the language level of the project or module is 7 or higher.\n\nUse the **Minimum number of 'if' condition branches** field to specify the minimum number of `if` condition branches\nfor an `if` statement to have to be reported. Note that the terminal `else` branch (without `if`) is not counted.\n\n\nUse the **Suggest switch on numbers** option to enable the suggestion of `switch` statements on\nprimitive and boxed numbers and characters.\n\n\nUse the **Suggest switch on enums** option to enable the suggestion of `switch` statements on\n`enum` constants.\n\n\nUse the **Only suggest on null-safe expressions** option to suggest `switch` statements that can't introduce a `NullPointerException` only." + "text": "Reports 'clone()' methods that are 'protected' and not 'public'. When overriding the 'clone()' method from 'java.lang.Object', it is expected to make the method 'public', so that it is accessible from non-subclasses outside the package.", + "markdown": "Reports `clone()` methods that are `protected` and not `public`.\n\nWhen overriding the `clone()` method from `java.lang.Object`, it is expected to make the method `public`,\nso that it is accessible from non-subclasses outside the package." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "IfCanBeSwitch", + "suppressToolId": "NonPublicClone", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -26203,8 +26203,8 @@ "relationships": [ { "target": { - "id": "Java/Java language level migration aids", - "index": 70, + "id": "Java/Cloning issues", + "index": 116, "toolComponent": { "name": "QDJVM" } @@ -26216,19 +26216,19 @@ ] }, { - "id": "NonPublicClone", + "id": "IfCanBeSwitch", "shortDescription": { - "text": "'clone()' method not 'public'" + "text": "'if' can be replaced with 'switch'" }, "fullDescription": { - "text": "Reports 'clone()' methods that are 'protected' and not 'public'. When overriding the 'clone()' method from 'java.lang.Object', it is expected to make the method 'public', so that it is accessible from non-subclasses outside the package.", - "markdown": "Reports `clone()` methods that are `protected` and not `public`.\n\nWhen overriding the `clone()` method from `java.lang.Object`, it is expected to make the method `public`,\nso that it is accessible from non-subclasses outside the package." + "text": "Reports 'if' statements that can be replaced with 'switch' statements. The replacement result is usually shorter and clearer. Example: 'void test(String str) {\n if (str.equals(\"1\")) {\n System.out.println(1);\n } else if (str.equals(\"2\")) {\n System.out.println(2);\n } else if (str.equals(\"3\")) {\n System.out.println(3);\n } else {\n System.out.println(4);\n }\n }' After the quick-fix is applied: 'void test(String str) {\n switch (str) {\n case \"1\" -> System.out.println(1);\n case \"2\" -> System.out.println(2);\n case \"3\" -> System.out.println(3);\n default -> System.out.println(4);\n }\n }' This inspection only reports if the language level of the project or module is 7 or higher. Use the Minimum number of 'if' condition branches field to specify the minimum number of 'if' condition branches for an 'if' statement to have to be reported. Note that the terminal 'else' branch (without 'if') is not counted. Use the Suggest switch on numbers option to enable the suggestion of 'switch' statements on primitive and boxed numbers and characters. Use the Suggest switch on enums option to enable the suggestion of 'switch' statements on 'enum' constants. Use the Only suggest on null-safe expressions option to suggest 'switch' statements that can't introduce a 'NullPointerException' only.", + "markdown": "Reports `if` statements that can be replaced with `switch` statements.\n\nThe replacement result is usually shorter and clearer.\n\n**Example:**\n\n\n void test(String str) {\n if (str.equals(\"1\")) {\n System.out.println(1);\n } else if (str.equals(\"2\")) {\n System.out.println(2);\n } else if (str.equals(\"3\")) {\n System.out.println(3);\n } else {\n System.out.println(4);\n }\n }\n\nAfter the quick-fix is applied:\n\n\n void test(String str) {\n switch (str) {\n case \"1\" -> System.out.println(1);\n case \"2\" -> System.out.println(2);\n case \"3\" -> System.out.println(3);\n default -> System.out.println(4);\n }\n }\n \nThis inspection only reports if the language level of the project or module is 7 or higher.\n\nUse the **Minimum number of 'if' condition branches** field to specify the minimum number of `if` condition branches\nfor an `if` statement to have to be reported. Note that the terminal `else` branch (without `if`) is not counted.\n\n\nUse the **Suggest switch on numbers** option to enable the suggestion of `switch` statements on\nprimitive and boxed numbers and characters.\n\n\nUse the **Suggest switch on enums** option to enable the suggestion of `switch` statements on\n`enum` constants.\n\n\nUse the **Only suggest on null-safe expressions** option to suggest `switch` statements that can't introduce a `NullPointerException` only." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "NonPublicClone", + "suppressToolId": "IfCanBeSwitch", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -26236,8 +26236,8 @@ "relationships": [ { "target": { - "id": "Java/Cloning issues", - "index": 116, + "id": "Java/Java language level migration aids", + "index": 70, "toolComponent": { "name": "QDJVM" } @@ -27156,19 +27156,19 @@ ] }, { - "id": "WaitCalledOnCondition", + "id": "NonSynchronizedMethodOverridesSynchronizedMethod", "shortDescription": { - "text": "'wait()' called on 'java.util.concurrent.locks.Condition' object" + "text": "Unsynchronized method overrides 'synchronized' method" }, "fullDescription": { - "text": "Reports calls 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. Example: 'void acquire(Condition released) throws InterruptedException {\n while (acquired) {\n released.wait();\n }\n }' Good code would look like this: 'void acquire(Condition released) throws InterruptedException {\n while (acquired) {\n released.await();\n }\n }'", - "markdown": "Reports calls 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.\n\n**Example:**\n\n\n void acquire(Condition released) throws InterruptedException {\n while (acquired) {\n released.wait();\n }\n }\n\nGood code would look like this:\n\n\n void acquire(Condition released) throws InterruptedException {\n while (acquired) {\n released.await();\n }\n }\n" + "text": "Reports non-'synchronized' methods overriding 'synchronized' methods. The overridden method will not be automatically synchronized if the superclass method is declared as 'synchronized'. This may result in unexpected race conditions when using the subclass. Example: 'class Super {\n synchronized void process() {}\n }\n class Sub extends Super {\n // Unsynchronized method 'process()' overrides synchronized method\n void process() {}\n }'", + "markdown": "Reports non-`synchronized` methods overriding `synchronized` methods.\n\n\nThe overridden method will not be automatically synchronized if the superclass method\nis declared as `synchronized`. This may result in unexpected race conditions when using the subclass.\n\n**Example:**\n\n\n class Super {\n synchronized void process() {}\n }\n class Sub extends Super {\n // Unsynchronized method 'process()' overrides synchronized method\n void process() {}\n } \n" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "WaitCalledOnCondition", + "suppressToolId": "NonSynchronizedMethodOverridesSynchronizedMethod", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -27189,19 +27189,19 @@ ] }, { - "id": "NonSynchronizedMethodOverridesSynchronizedMethod", + "id": "WaitCalledOnCondition", "shortDescription": { - "text": "Unsynchronized method overrides 'synchronized' method" + "text": "'wait()' called on 'java.util.concurrent.locks.Condition' object" }, "fullDescription": { - "text": "Reports non-'synchronized' methods overriding 'synchronized' methods. The overridden method will not be automatically synchronized if the superclass method is declared as 'synchronized'. This may result in unexpected race conditions when using the subclass. Example: 'class Super {\n synchronized void process() {}\n }\n class Sub extends Super {\n // Unsynchronized method 'process()' overrides synchronized method\n void process() {}\n }'", - "markdown": "Reports non-`synchronized` methods overriding `synchronized` methods.\n\n\nThe overridden method will not be automatically synchronized if the superclass method\nis declared as `synchronized`. This may result in unexpected race conditions when using the subclass.\n\n**Example:**\n\n\n class Super {\n synchronized void process() {}\n }\n class Sub extends Super {\n // Unsynchronized method 'process()' overrides synchronized method\n void process() {}\n } \n" + "text": "Reports calls 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. Example: 'void acquire(Condition released) throws InterruptedException {\n while (acquired) {\n released.wait();\n }\n }' Good code would look like this: 'void acquire(Condition released) throws InterruptedException {\n while (acquired) {\n released.await();\n }\n }'", + "markdown": "Reports calls 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.\n\n**Example:**\n\n\n void acquire(Condition released) throws InterruptedException {\n while (acquired) {\n released.wait();\n }\n }\n\nGood code would look like this:\n\n\n void acquire(Condition released) throws InterruptedException {\n while (acquired) {\n released.await();\n }\n }\n" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "NonSynchronizedMethodOverridesSynchronizedMethod", + "suppressToolId": "WaitCalledOnCondition", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -27408,7 +27408,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -27507,7 +27507,7 @@ { "target": { "id": "Java/Naming conventions", - "index": 79, + "index": 80, "toolComponent": { "name": "QDJVM" } @@ -27750,19 +27750,19 @@ ] }, { - "id": "ExternalizableWithoutPublicNoArgConstructor", + "id": "StaticGuardedByInstance", "shortDescription": { - "text": "'Externalizable' class without 'public' no-arg constructor" + "text": "Static member guarded by instance field or this" }, "fullDescription": { - "text": "Reports '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 available, a 'java.io.InvalidClassException' will be thrown at runtime.", - "markdown": "Reports `Externalizable` classes without a public no-argument constructor.\n\nWhen an `Externalizable` object is reconstructed, an instance is created using the public\nno-arg constructor before the `readExternal` method called. If a public\nno-arg constructor is not available, a `java.io.InvalidClassException` will be\nthrown at runtime." + "text": "Reports '@GuardedBy' annotations on 'static' fields or methods in which the guard is either a non-static field or 'this'. Guarding a static element with a non-static element may result in excessive concurrency, multiple threads may be able to access the guarded field simultaneously by locking in different object contexts. Example: 'private ReadWriteLock lock = new ReentrantReadWriteLock();\n\n @GuardedBy(\"lock\")\n public static void bar() {\n // ...\n }' Supported '@GuardedBy' annotations are: 'net.jcip.annotations.GuardedBy' 'javax.annotation.concurrent.GuardedBy' 'org.apache.http.annotation.GuardedBy' 'com.android.annotations.concurrency.GuardedBy' 'androidx.annotation.GuardedBy' 'com.google.errorprone.annotations.concurrent.GuardedBy'", + "markdown": "Reports `@GuardedBy` annotations on `static` fields or methods in which the guard is either a non-static field or `this`.\n\nGuarding a static element with a non-static element may result in\nexcessive concurrency, multiple threads may be able to access the guarded field simultaneously by locking in different object contexts.\n\nExample:\n\n\n private ReadWriteLock lock = new ReentrantReadWriteLock();\n\n @GuardedBy(\"lock\")\n public static void bar() {\n // ...\n }\n\nSupported `@GuardedBy` annotations are:\n\n* `net.jcip.annotations.GuardedBy`\n* `javax.annotation.concurrent.GuardedBy`\n* `org.apache.http.annotation.GuardedBy`\n* `com.android.annotations.concurrency.GuardedBy`\n* `androidx.annotation.GuardedBy`\n* `com.google.errorprone.annotations.concurrent.GuardedBy`" }, "defaultConfiguration": { - "enabled": true, + "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "ExternalizableWithoutPublicNoArgConstructor", + "suppressToolId": "StaticGuardedByInstance", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -27770,8 +27770,8 @@ "relationships": [ { "target": { - "id": "Java/Serialization issues", - "index": 20, + "id": "Java/Concurrency annotation issues", + "index": 100, "toolComponent": { "name": "QDJVM" } @@ -27783,19 +27783,19 @@ ] }, { - "id": "StaticGuardedByInstance", + "id": "ExternalizableWithoutPublicNoArgConstructor", "shortDescription": { - "text": "Static member guarded by instance field or this" + "text": "'Externalizable' class without 'public' no-arg constructor" }, "fullDescription": { - "text": "Reports '@GuardedBy' annotations on 'static' fields or methods in which the guard is either a non-static field or 'this'. Guarding a static element with a non-static element may result in excessive concurrency, multiple threads may be able to access the guarded field simultaneously by locking in different object contexts. Example: 'private ReadWriteLock lock = new ReentrantReadWriteLock();\n\n @GuardedBy(\"lock\")\n public static void bar() {\n // ...\n }' Supported '@GuardedBy' annotations are: 'net.jcip.annotations.GuardedBy' 'javax.annotation.concurrent.GuardedBy' 'org.apache.http.annotation.GuardedBy' 'com.android.annotations.concurrency.GuardedBy' 'androidx.annotation.GuardedBy' 'com.google.errorprone.annotations.concurrent.GuardedBy'", - "markdown": "Reports `@GuardedBy` annotations on `static` fields or methods in which the guard is either a non-static field or `this`.\n\nGuarding a static element with a non-static element may result in\nexcessive concurrency, multiple threads may be able to access the guarded field simultaneously by locking in different object contexts.\n\nExample:\n\n\n private ReadWriteLock lock = new ReentrantReadWriteLock();\n\n @GuardedBy(\"lock\")\n public static void bar() {\n // ...\n }\n\nSupported `@GuardedBy` annotations are:\n\n* `net.jcip.annotations.GuardedBy`\n* `javax.annotation.concurrent.GuardedBy`\n* `org.apache.http.annotation.GuardedBy`\n* `com.android.annotations.concurrency.GuardedBy`\n* `androidx.annotation.GuardedBy`\n* `com.google.errorprone.annotations.concurrent.GuardedBy`" + "text": "Reports '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 available, a 'java.io.InvalidClassException' will be thrown at runtime.", + "markdown": "Reports `Externalizable` classes without a public no-argument constructor.\n\nWhen an `Externalizable` object is reconstructed, an instance is created using the public\nno-arg constructor before the `readExternal` method called. If a public\nno-arg constructor is not available, a `java.io.InvalidClassException` will be\nthrown at runtime." }, "defaultConfiguration": { - "enabled": false, + "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "StaticGuardedByInstance", + "suppressToolId": "ExternalizableWithoutPublicNoArgConstructor", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -27803,8 +27803,8 @@ "relationships": [ { "target": { - "id": "Java/Concurrency annotation issues", - "index": 100, + "id": "Java/Serialization issues", + "index": 20, "toolComponent": { "name": "QDJVM" } @@ -28017,19 +28017,19 @@ ] }, { - "id": "EnumClass", + "id": "TrivialFunctionalExpressionUsage", "shortDescription": { - "text": "Enumerated class" + "text": "Trivial usage of functional expression" }, "fullDescription": { - "text": "Reports enum classes. Such statements are not supported in Java 1.4 and earlier JVM.", - "markdown": "Reports **enum** classes. Such statements are not supported in Java 1.4 and earlier JVM." + "text": "Reports functional interface methods calls that are directly invoked on the definition of the lambda, method reference, or anonymous class. Such method calls can be replaced with the body of the functional interface implementation. Example: 'boolean contains(List names, String name) {\n return ((Predicate)x -> {\n return names.contains(x);\n }).test(name);\n }' When the quick-fix is applied, the method call changes to: 'boolean contains(List names, String name) {\n return names.contains(name);\n }'", + "markdown": "Reports functional interface methods calls that are directly invoked on the definition of the lambda, method reference, or anonymous class. Such method calls can be replaced with the body of the functional interface implementation.\n\n**Example:**\n\n\n boolean contains(List names, String name) {\n return ((Predicate)x -> {\n return names.contains(x);\n }).test(name);\n }\n\nWhen the quick-fix is applied, the method call changes to:\n\n\n boolean contains(List names, String name) {\n return names.contains(name);\n }\n" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "EnumClass", + "suppressToolId": "TrivialFunctionalExpressionUsage", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -28037,8 +28037,8 @@ "relationships": [ { "target": { - "id": "Java/Java language level issues", - "index": 147, + "id": "Java/Declaration redundancy", + "index": 13, "toolComponent": { "name": "QDJVM" } @@ -28050,19 +28050,19 @@ ] }, { - "id": "TrivialFunctionalExpressionUsage", + "id": "EnumClass", "shortDescription": { - "text": "Trivial usage of functional expression" + "text": "Enumerated class" }, "fullDescription": { - "text": "Reports functional interface methods calls that are directly invoked on the definition of the lambda, method reference, or anonymous class. Such method calls can be replaced with the body of the functional interface implementation. Example: 'boolean contains(List names, String name) {\n return ((Predicate)x -> {\n return names.contains(x);\n }).test(name);\n }' When the quick-fix is applied, the method call changes to: 'boolean contains(List names, String name) {\n return names.contains(name);\n }'", - "markdown": "Reports functional interface methods calls that are directly invoked on the definition of the lambda, method reference, or anonymous class. Such method calls can be replaced with the body of the functional interface implementation.\n\n**Example:**\n\n\n boolean contains(List names, String name) {\n return ((Predicate)x -> {\n return names.contains(x);\n }).test(name);\n }\n\nWhen the quick-fix is applied, the method call changes to:\n\n\n boolean contains(List names, String name) {\n return names.contains(name);\n }\n" + "text": "Reports enum classes. Such statements are not supported in Java 1.4 and earlier JVM.", + "markdown": "Reports **enum** classes. Such statements are not supported in Java 1.4 and earlier JVM." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "TrivialFunctionalExpressionUsage", + "suppressToolId": "EnumClass", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -28070,8 +28070,8 @@ "relationships": [ { "target": { - "id": "Java/Declaration redundancy", - "index": 13, + "id": "Java/Java language level issues", + "index": 147, "toolComponent": { "name": "QDJVM" } @@ -28305,7 +28305,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -28404,7 +28404,7 @@ { "target": { "id": "Java/Naming conventions", - "index": 79, + "index": 80, "toolComponent": { "name": "QDJVM" } @@ -28536,7 +28536,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -28779,19 +28779,19 @@ ] }, { - "id": "UnnecessaryModifier", + "id": "NonThreadSafeLazyInitialization", "shortDescription": { - "text": "Unnecessary modifier" + "text": "Unsafe lazy initialization of 'static' field" }, "fullDescription": { - "text": "Reports redundant modifiers and suggests to remove them. The resulting code will be shorter, but the behaviour and meaning will remain the same. Example 1: '// all code is implicitly strictfp under Java 17 and higher\n strictfp class X {\n\n // inner enums are implicitly static\n static enum Inner {\n A, B, C\n }\n\n // inner records are implicitly static\n static record R() {\n }\n }' Example 2: 'final record R() {\n // all records are implicitly final\n }' Example 3: '// all interfaces are implicitly abstract\n abstract interface Printer {\n\n // all interface members are implicitly public\n public int size();\n\n // all inner classes of interfaces are implicitly static\n static class Inner {}\n }'", - "markdown": "Reports redundant modifiers and suggests to remove them. The resulting code will be shorter, but the behaviour and meaning will remain the same.\n\n**Example 1:**\n\n\n // all code is implicitly strictfp under Java 17 and higher\n strictfp class X {\n\n // inner enums are implicitly static\n static enum Inner {\n A, B, C\n }\n\n // inner records are implicitly static\n static record R() {\n }\n }\n\n**Example 2:**\n\n\n final record R() {\n // all records are implicitly final\n }\n\n**Example 3:**\n\n\n // all interfaces are implicitly abstract\n abstract interface Printer {\n\n // all interface members are implicitly public\n public int size();\n\n // all inner classes of interfaces are implicitly static\n static class Inner {}\n }\n" + "text": "Reports 'static' variables that are lazily initialized in a non-thread-safe manner. Lazy initialization of 'static' variables should be done with an appropriate synchronization construct to prevent different threads from performing conflicting initialization. When applicable, a quick-fix, which introduces the lazy initialization holder class idiom, is suggested. This idiom makes use of the fact that the JVM guarantees that a class will not be initialized until it is used. Example: 'class X {\n private static List list;\n\n public List getList() {\n if (list == null) {\n list = List.of(\"one\", \"two\", \"tree\");\n }\n return list;\n }\n }' After the quick-fix is applied: 'class X {\n private static final class ListHolder {\n static final List list = List.of(\"one\", \"two\", \"tree\");\n }\n\n public List getList() {\n return ListHolder.list;\n }\n }'", + "markdown": "Reports `static` variables that are lazily initialized in a non-thread-safe manner.\n\nLazy initialization of `static` variables should be done with an appropriate synchronization construct\nto prevent different threads from performing conflicting initialization.\n\nWhen applicable, a quick-fix, which introduces the\n[lazy initialization holder class idiom](https://en.wikipedia.org/wiki/Initialization_on_demand_holder_idiom), is suggested.\nThis idiom makes use of the fact that the JVM guarantees that a class will not be initialized until it is used.\n\n**Example:**\n\n\n class X {\n private static List list;\n\n public List getList() {\n if (list == null) {\n list = List.of(\"one\", \"two\", \"tree\");\n }\n return list;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class X {\n private static final class ListHolder {\n static final List list = List.of(\"one\", \"two\", \"tree\");\n }\n\n public List getList() {\n return ListHolder.list;\n }\n }\n" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "UnnecessaryModifier", + "suppressToolId": "NonThreadSafeLazyInitialization", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -28799,8 +28799,8 @@ "relationships": [ { "target": { - "id": "Java/Code style issues", - "index": 11, + "id": "Java/Initialization", + "index": 33, "toolComponent": { "name": "QDJVM" } @@ -28812,19 +28812,19 @@ ] }, { - "id": "NonThreadSafeLazyInitialization", + "id": "UnnecessaryModifier", "shortDescription": { - "text": "Unsafe lazy initialization of 'static' field" + "text": "Unnecessary modifier" }, "fullDescription": { - "text": "Reports 'static' variables that are lazily initialized in a non-thread-safe manner. Lazy initialization of 'static' variables should be done with an appropriate synchronization construct to prevent different threads from performing conflicting initialization. When applicable, a quick-fix, which introduces the lazy initialization holder class idiom, is suggested. This idiom makes use of the fact that the JVM guarantees that a class will not be initialized until it is used. Example: 'class X {\n private static List list;\n\n public List getList() {\n if (list == null) {\n list = List.of(\"one\", \"two\", \"tree\");\n }\n return list;\n }\n }' After the quick-fix is applied: 'class X {\n private static final class ListHolder {\n static final List list = List.of(\"one\", \"two\", \"tree\");\n }\n\n public List getList() {\n return ListHolder.list;\n }\n }'", - "markdown": "Reports `static` variables that are lazily initialized in a non-thread-safe manner.\n\nLazy initialization of `static` variables should be done with an appropriate synchronization construct\nto prevent different threads from performing conflicting initialization.\n\nWhen applicable, a quick-fix, which introduces the\n[lazy initialization holder class idiom](https://en.wikipedia.org/wiki/Initialization_on_demand_holder_idiom), is suggested.\nThis idiom makes use of the fact that the JVM guarantees that a class will not be initialized until it is used.\n\n**Example:**\n\n\n class X {\n private static List list;\n\n public List getList() {\n if (list == null) {\n list = List.of(\"one\", \"two\", \"tree\");\n }\n return list;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class X {\n private static final class ListHolder {\n static final List list = List.of(\"one\", \"two\", \"tree\");\n }\n\n public List getList() {\n return ListHolder.list;\n }\n }\n" + "text": "Reports redundant modifiers and suggests to remove them. The resulting code will be shorter, but the behaviour and meaning will remain the same. Example 1: '// all code is implicitly strictfp under Java 17 and higher\n strictfp class X {\n\n // inner enums are implicitly static\n static enum Inner {\n A, B, C\n }\n\n // inner records are implicitly static\n static record R() {\n }\n }' Example 2: 'final record R() {\n // all records are implicitly final\n }' Example 3: '// all interfaces are implicitly abstract\n abstract interface Printer {\n\n // all interface members are implicitly public\n public int size();\n\n // all inner classes of interfaces are implicitly static\n static class Inner {}\n }'", + "markdown": "Reports redundant modifiers and suggests to remove them. The resulting code will be shorter, but the behaviour and meaning will remain the same.\n\n**Example 1:**\n\n\n // all code is implicitly strictfp under Java 17 and higher\n strictfp class X {\n\n // inner enums are implicitly static\n static enum Inner {\n A, B, C\n }\n\n // inner records are implicitly static\n static record R() {\n }\n }\n\n**Example 2:**\n\n\n final record R() {\n // all records are implicitly final\n }\n\n**Example 3:**\n\n\n // all interfaces are implicitly abstract\n abstract interface Printer {\n\n // all interface members are implicitly public\n public int size();\n\n // all inner classes of interfaces are implicitly static\n static class Inner {}\n }\n" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "NonThreadSafeLazyInitialization", + "suppressToolId": "UnnecessaryModifier", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -28832,8 +28832,8 @@ "relationships": [ { "target": { - "id": "Java/Initialization", - "index": 33, + "id": "Java/Code style issues", + "index": 11, "toolComponent": { "name": "QDJVM" } @@ -28866,7 +28866,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -29076,19 +29076,19 @@ ] }, { - "id": "ClassNameSameAsAncestorName", + "id": "RedundantMethodOverride", "shortDescription": { - "text": "Class name same as ancestor name" + "text": "Method is identical to its super method" }, "fullDescription": { - "text": "Reports classes that have the same name as one of their superclasses, while their fully qualified names remain different. Such class names may be very confusing. Example: 'package util;\n abstract class Iterable implements java.lang.Iterable {}' A quick-fix that renames such classes is available only in the editor.", - "markdown": "Reports classes that have the same name as one of their superclasses, while their fully qualified names remain different. Such class names may be very confusing.\n\n**Example:**\n\n\n package util;\n abstract class Iterable implements java.lang.Iterable {}\n\nA quick-fix that renames such classes is available only in the editor." + "text": "Reports methods that are identical to their super methods. Such methods have the same signature as their super method and either have an identical body or only their body consists only of a call to the super method. These methods are redundant and can be removed. Use the first checkbox below to run the inspection for the methods that override library methods. Checking library methods may slow down the inspection. Use the second checkbox below to ignore methods that only delegate calls to their super methods.", + "markdown": "Reports methods that are identical to their super methods. Such methods have the same signature as their super method and either have an identical body or only their body consists only of a call to the super method. These methods are redundant and can be removed.\n\n\nUse the first checkbox below to run the inspection for the methods that override library methods.\nChecking library methods may slow down the inspection.\n\n\nUse the second checkbox below to ignore methods that only delegate calls to their super methods." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "ClassNameSameAsAncestorName", + "suppressToolId": "RedundantMethodOverride", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -29096,8 +29096,8 @@ "relationships": [ { "target": { - "id": "Java/Naming conventions/Class", - "index": 80, + "id": "Java/Inheritance issues", + "index": 151, "toolComponent": { "name": "QDJVM" } @@ -29109,19 +29109,19 @@ ] }, { - "id": "RedundantMethodOverride", + "id": "ClassNameSameAsAncestorName", "shortDescription": { - "text": "Method is identical to its super method" + "text": "Class name same as ancestor name" }, "fullDescription": { - "text": "Reports methods that are identical to their super methods. Such methods have the same signature as their super method and either have an identical body or only their body consists only of a call to the super method. These methods are redundant and can be removed. Use the first checkbox below to run the inspection for the methods that override library methods. Checking library methods may slow down the inspection. Use the second checkbox below to ignore methods that only delegate calls to their super methods.", - "markdown": "Reports methods that are identical to their super methods. Such methods have the same signature as their super method and either have an identical body or only their body consists only of a call to the super method. These methods are redundant and can be removed.\n\n\nUse the first checkbox below to run the inspection for the methods that override library methods.\nChecking library methods may slow down the inspection.\n\n\nUse the second checkbox below to ignore methods that only delegate calls to their super methods." + "text": "Reports classes that have the same name as one of their superclasses, while their fully qualified names remain different. Such class names may be very confusing. Example: 'package util;\n abstract class Iterable implements java.lang.Iterable {}' A quick-fix that renames such classes is available only in the editor.", + "markdown": "Reports classes that have the same name as one of their superclasses, while their fully qualified names remain different. Such class names may be very confusing.\n\n**Example:**\n\n\n package util;\n abstract class Iterable implements java.lang.Iterable {}\n\nA quick-fix that renames such classes is available only in the editor." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "RedundantMethodOverride", + "suppressToolId": "ClassNameSameAsAncestorName", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -29129,8 +29129,8 @@ "relationships": [ { "target": { - "id": "Java/Inheritance issues", - "index": 151, + "id": "Java/Naming conventions/Class", + "index": 81, "toolComponent": { "name": "QDJVM" } @@ -29163,7 +29163,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -29196,7 +29196,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -29361,7 +29361,7 @@ { "target": { "id": "Java/Naming conventions", - "index": 79, + "index": 80, "toolComponent": { "name": "QDJVM" } @@ -29394,7 +29394,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -29439,19 +29439,19 @@ ] }, { - "id": "DisjointPackage", + "id": "MethodOverloadsParentMethod", "shortDescription": { - "text": "Package with disjoint dependency graph" + "text": "Possibly unintended overload of method from superclass" }, "fullDescription": { - "text": "Reports packages whose classes can be separated into mutually independent subsets. Such disjoint packages indicate ad-hoc packaging or a lack of conceptual cohesion. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor.", - "markdown": "Reports packages whose classes can be separated into mutually independent subsets.\n\nSuch disjoint packages indicate ad-hoc packaging or a lack of conceptual cohesion.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor." + "text": "Reports instance methods with the same name and the same number of parameters as a method in a superclass, but where at least one of the parameters is of a different incompatible type. In this case, the method in a subclass will be overloading the method from the superclass instead of overriding it. If it is unintended, it may result in latent bugs. Example: 'public class Foo {\n void foo(int x) {}\n }\n\n public class Bar extends Foo {\n void foo(Number x) {} // Method 'foo()' overloads a compatible method of a superclass,\n // when overriding might have been intended\n }' Use the option to choose whether the inspection should also report cases where parameter types are not compatible.", + "markdown": "Reports instance methods with the same name and the same number of parameters as a method in a superclass, but where at least one of the parameters is of a different incompatible type.\n\n\nIn this case, the method in a subclass will be overloading the method from the superclass\ninstead of overriding it. If it is unintended, it may result in latent bugs.\n\n**Example:**\n\n\n public class Foo {\n void foo(int x) {}\n }\n\n public class Bar extends Foo {\n void foo(Number x) {} // Method 'foo()' overloads a compatible method of a superclass,\n // when overriding might have been intended\n }\n\n\nUse the option to choose whether the inspection should also report cases where parameter types are not compatible." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "DisjointPackage", + "suppressToolId": "MethodOverloadsMethodOfSuperclass", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -29459,8 +29459,8 @@ "relationships": [ { "target": { - "id": "Java/Packaging issues", - "index": 46, + "id": "Java/Visibility", + "index": 98, "toolComponent": { "name": "QDJVM" } @@ -29472,19 +29472,19 @@ ] }, { - "id": "MethodOverloadsParentMethod", + "id": "DisjointPackage", "shortDescription": { - "text": "Possibly unintended overload of method from superclass" + "text": "Package with disjoint dependency graph" }, "fullDescription": { - "text": "Reports instance methods with the same name and the same number of parameters as a method in a superclass, but where at least one of the parameters is of a different incompatible type. In this case, the method in a subclass will be overloading the method from the superclass instead of overriding it. If it is unintended, it may result in latent bugs. Example: 'public class Foo {\n void foo(int x) {}\n }\n\n public class Bar extends Foo {\n void foo(Number x) {} // Method 'foo()' overloads a compatible method of a superclass,\n // when overriding might have been intended\n }' Use the option to choose whether the inspection should also report cases where parameter types are not compatible.", - "markdown": "Reports instance methods with the same name and the same number of parameters as a method in a superclass, but where at least one of the parameters is of a different incompatible type.\n\n\nIn this case, the method in a subclass will be overloading the method from the superclass\ninstead of overriding it. If it is unintended, it may result in latent bugs.\n\n**Example:**\n\n\n public class Foo {\n void foo(int x) {}\n }\n\n public class Bar extends Foo {\n void foo(Number x) {} // Method 'foo()' overloads a compatible method of a superclass,\n // when overriding might have been intended\n }\n\n\nUse the option to choose whether the inspection should also report cases where parameter types are not compatible." + "text": "Reports packages whose classes can be separated into mutually independent subsets. Such disjoint packages indicate ad-hoc packaging or a lack of conceptual cohesion. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor.", + "markdown": "Reports packages whose classes can be separated into mutually independent subsets.\n\nSuch disjoint packages indicate ad-hoc packaging or a lack of conceptual cohesion.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "MethodOverloadsMethodOfSuperclass", + "suppressToolId": "DisjointPackage", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -29492,8 +29492,8 @@ "relationships": [ { "target": { - "id": "Java/Visibility", - "index": 98, + "id": "Java/Packaging issues", + "index": 46, "toolComponent": { "name": "QDJVM" } @@ -29538,19 +29538,19 @@ ] }, { - "id": "UpperCaseFieldNameNotConstant", + "id": "MethodMayBeSynchronized", "shortDescription": { - "text": "Non-constant field with upper-case name" + "text": "Method with single 'synchronized' block can be replaced with 'synchronized' method" }, "fullDescription": { - "text": "Reports non-'static' non-'final' fields whose names are all in upper case. Such fields may cause confusion by breaking a common naming convention and are often used by mistake. Example: 'public static int THE_ANSWER = 42; //a warning here: final modifier is missing' A quick-fix that renames such fields is available only in the editor.", - "markdown": "Reports non-`static` non-`final` fields whose names are all in upper case.\n\nSuch fields may cause confusion by breaking a common naming convention and\nare often used by mistake.\n\n**Example:**\n\n\n public static int THE_ANSWER = 42; //a warning here: final modifier is missing\n\nA quick-fix that renames such fields is available only in the editor." + "text": "Reports methods whose body contains a single 'synchronized' statement. A lock expression for this 'synchronized' statement must be equal to 'this' for instance methods or '[ClassName].class' for static methods. To improve readability of such methods, you can remove the 'synchronized' wrapper and mark the method as 'synchronized'. Example: 'public int generateInt(int x) {\n synchronized (this) {\n return 1;\n }\n }' After the quick-fix is applied: 'public synchronized int generateInt(int x) {\n return 1;\n }'", + "markdown": "Reports methods whose body contains a single `synchronized` statement. A lock expression for this `synchronized` statement must be equal to `this` for instance methods or `[ClassName].class` for static methods.\n\n\nTo improve readability of such methods,\nyou can remove the `synchronized` wrapper and mark the method as `synchronized`.\n\n**Example:**\n\n\n public int generateInt(int x) {\n synchronized (this) {\n return 1;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n public synchronized int generateInt(int x) {\n return 1;\n }\n" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "NonConstantFieldWithUpperCaseName", + "suppressToolId": "MethodMayBeSynchronized", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -29558,8 +29558,8 @@ "relationships": [ { "target": { - "id": "Java/Naming conventions", - "index": 79, + "id": "Java/Threading issues", + "index": 29, "toolComponent": { "name": "QDJVM" } @@ -29571,19 +29571,19 @@ ] }, { - "id": "MethodMayBeSynchronized", + "id": "UpperCaseFieldNameNotConstant", "shortDescription": { - "text": "Method with single 'synchronized' block can be replaced with 'synchronized' method" + "text": "Non-constant field with upper-case name" }, "fullDescription": { - "text": "Reports methods whose body contains a single 'synchronized' statement. A lock expression for this 'synchronized' statement must be equal to 'this' for instance methods or '[ClassName].class' for static methods. To improve readability of such methods, you can remove the 'synchronized' wrapper and mark the method as 'synchronized'. Example: 'public int generateInt(int x) {\n synchronized (this) {\n return 1;\n }\n }' After the quick-fix is applied: 'public synchronized int generateInt(int x) {\n return 1;\n }'", - "markdown": "Reports methods whose body contains a single `synchronized` statement. A lock expression for this `synchronized` statement must be equal to `this` for instance methods or `[ClassName].class` for static methods.\n\n\nTo improve readability of such methods,\nyou can remove the `synchronized` wrapper and mark the method as `synchronized`.\n\n**Example:**\n\n\n public int generateInt(int x) {\n synchronized (this) {\n return 1;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n public synchronized int generateInt(int x) {\n return 1;\n }\n" + "text": "Reports non-'static' non-'final' fields whose names are all in upper case. Such fields may cause confusion by breaking a common naming convention and are often used by mistake. Example: 'public static int THE_ANSWER = 42; //a warning here: final modifier is missing' A quick-fix that renames such fields is available only in the editor.", + "markdown": "Reports non-`static` non-`final` fields whose names are all in upper case.\n\nSuch fields may cause confusion by breaking a common naming convention and\nare often used by mistake.\n\n**Example:**\n\n\n public static int THE_ANSWER = 42; //a warning here: final modifier is missing\n\nA quick-fix that renames such fields is available only in the editor." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "MethodMayBeSynchronized", + "suppressToolId": "NonConstantFieldWithUpperCaseName", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -29591,8 +29591,8 @@ "relationships": [ { "target": { - "id": "Java/Threading issues", - "index": 29, + "id": "Java/Naming conventions", + "index": 80, "toolComponent": { "name": "QDJVM" } @@ -30060,7 +30060,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -30306,19 +30306,19 @@ ] }, { - "id": "Singleton", + "id": "NonFinalUtilityClass", "shortDescription": { - "text": "Singleton" + "text": "Utility class is not 'final'" }, "fullDescription": { - "text": "Reports singleton classes. Singleton classes are declared in a way that only one instance of the class can ever be instantiated. Singleton classes complicate testing, and their presence may indicate a lack of object-oriented design. Example: 'class Singleton {\n private static final Singleton ourInstance = new Singleton();\n\n private Singleton() {\n }\n\n public Singleton getInstance() {\n return ourInstance;\n }\n }'", - "markdown": "Reports singleton classes.\n\nSingleton classes are declared in a way that only one instance of the class can ever be instantiated. Singleton classes complicate testing,\nand their presence may indicate a lack of object-oriented design.\n\n**Example:**\n\n\n class Singleton {\n private static final Singleton ourInstance = new Singleton();\n\n private Singleton() {\n }\n\n public Singleton getInstance() {\n return ourInstance;\n }\n }\n" + "text": "Reports utility classes that aren't 'final' or 'abstract'. Utility classes have all fields and methods declared as 'static'. Making them 'final' prevents them from being accidentally subclassed. Example: 'public class UtilityClass {\n public static void foo() {}\n }' After the quick-fix is applied: 'public final class UtilityClass {\n public static void foo() {}\n }'", + "markdown": "Reports utility classes that aren't `final` or `abstract`.\n\nUtility classes have all fields and methods declared as `static`.\nMaking them `final` prevents them from being accidentally subclassed.\n\n**Example:**\n\n\n public class UtilityClass {\n public static void foo() {}\n }\n\nAfter the quick-fix is applied:\n\n\n public final class UtilityClass {\n public static void foo() {}\n }\n" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "Singleton", + "suppressToolId": "NonFinalUtilityClass", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -30339,19 +30339,19 @@ ] }, { - "id": "NonFinalUtilityClass", + "id": "Singleton", "shortDescription": { - "text": "Utility class is not 'final'" + "text": "Singleton" }, "fullDescription": { - "text": "Reports utility classes that aren't 'final' or 'abstract'. Utility classes have all fields and methods declared as 'static'. Making them 'final' prevents them from being accidentally subclassed. Example: 'public class UtilityClass {\n public static void foo() {}\n }' After the quick-fix is applied: 'public final class UtilityClass {\n public static void foo() {}\n }'", - "markdown": "Reports utility classes that aren't `final` or `abstract`.\n\nUtility classes have all fields and methods declared as `static`.\nMaking them `final` prevents them from being accidentally subclassed.\n\n**Example:**\n\n\n public class UtilityClass {\n public static void foo() {}\n }\n\nAfter the quick-fix is applied:\n\n\n public final class UtilityClass {\n public static void foo() {}\n }\n" + "text": "Reports singleton classes. Singleton classes are declared in a way that only one instance of the class can ever be instantiated. Singleton classes complicate testing, and their presence may indicate a lack of object-oriented design. Example: 'class Singleton {\n private static final Singleton ourInstance = new Singleton();\n\n private Singleton() {\n }\n\n public Singleton getInstance() {\n return ourInstance;\n }\n }'", + "markdown": "Reports singleton classes.\n\nSingleton classes are declared in a way that only one instance of the class can ever be instantiated. Singleton classes complicate testing,\nand their presence may indicate a lack of object-oriented design.\n\n**Example:**\n\n\n class Singleton {\n private static final Singleton ourInstance = new Singleton();\n\n private Singleton() {\n }\n\n public Singleton getInstance() {\n return ourInstance;\n }\n }\n" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "NonFinalUtilityClass", + "suppressToolId": "Singleton", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -30426,7 +30426,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -30690,7 +30690,7 @@ { "target": { "id": "Java/Naming conventions", - "index": 79, + "index": 80, "toolComponent": { "name": "QDJVM" } @@ -30826,7 +30826,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -30859,7 +30859,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -31270,19 +31270,19 @@ ] }, { - "id": "MaskedAssertion", + "id": "StringTokenizerDelimiter", "shortDescription": { - "text": "Assertion is suppressed by 'catch'" + "text": "Duplicated delimiters in 'StringTokenizer'" }, "fullDescription": { - "text": "Reports 'assert' statements and test framework assertions that are suppressed by a surrounding catch block. Such assertions will never fail, as the thrown 'AssertionError' will be caught and silently ignored. Example 1: 'void javaAssertion() {\n try {\n ...\n assert 1 == 2;\n } catch (AssertionError e) {\n // the assertion is silently ignored\n }\n }' Example 2: '@Test\n void testWithAssertJ() {\n try {\n ...\n assertThat(1).as(\"test\").isEqualTo(2);\n } catch (AssertionError e) {\n // the assertion is silently ignored\n }\n }' Example 3: '@Test\n void testWithJunit() {\n try {\n ...\n assertEquals(1, 2);\n } catch (AssertionError e) {\n // the assertion is silently ignored\n }\n }' New in 2020.3", - "markdown": "Reports `assert` statements and test framework assertions that are suppressed by a surrounding catch block. Such assertions will never fail, as the thrown `AssertionError` will be caught and silently ignored.\n\n**Example 1:**\n\n\n void javaAssertion() {\n try {\n ...\n assert 1 == 2;\n } catch (AssertionError e) {\n // the assertion is silently ignored\n }\n }\n\n**Example 2:**\n\n\n @Test\n void testWithAssertJ() {\n try {\n ...\n assertThat(1).as(\"test\").isEqualTo(2);\n } catch (AssertionError e) {\n // the assertion is silently ignored\n }\n }\n\n**Example 3:**\n\n\n @Test\n void testWithJunit() {\n try {\n ...\n assertEquals(1, 2);\n } catch (AssertionError e) {\n // the assertion is silently ignored\n }\n }\n\nNew in 2020.3" + "text": "Reports 'StringTokenizer()' constructor calls or 'nextToken()' method calls that contain duplicate characters in the delimiter argument. Example: 'void printTokens(String text) {\n StringTokenizer tokenizer = new StringTokenizer(text, \"\\n\\n\");\n while (tokenizer.hasMoreTokens()) {\n System.out.println(tokenizer.nextToken());\n }\n }' After the quick-fix is applied: 'void printTokens(String text) {\n StringTokenizer tokenizer = new StringTokenizer(text, \"\\n\");\n while (tokenizer.hasMoreTokens()) {\n System.out.println(tokenizer.nextToken());\n }\n }'", + "markdown": "Reports `StringTokenizer()` constructor calls or `nextToken()` method calls that contain duplicate characters in the delimiter argument.\n\n**Example:**\n\n\n void printTokens(String text) {\n StringTokenizer tokenizer = new StringTokenizer(text, \"\\n\\n\");\n while (tokenizer.hasMoreTokens()) {\n System.out.println(tokenizer.nextToken());\n }\n }\n\nAfter the quick-fix is applied:\n\n\n void printTokens(String text) {\n StringTokenizer tokenizer = new StringTokenizer(text, \"\\n\");\n while (tokenizer.hasMoreTokens()) {\n System.out.println(tokenizer.nextToken());\n }\n }\n" }, "defaultConfiguration": { "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "MaskedAssertion", + "suppressToolId": "StringTokenizerDelimiter", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -31290,8 +31290,8 @@ "relationships": [ { "target": { - "id": "Java/Test frameworks", - "index": 130, + "id": "Java/Probable bugs", + "index": 15, "toolComponent": { "name": "QDJVM" } @@ -31303,19 +31303,19 @@ ] }, { - "id": "StringTokenizerDelimiter", + "id": "MaskedAssertion", "shortDescription": { - "text": "Duplicated delimiters in 'StringTokenizer'" + "text": "Assertion is suppressed by 'catch'" }, "fullDescription": { - "text": "Reports 'StringTokenizer()' constructor calls or 'nextToken()' method calls that contain duplicate characters in the delimiter argument. Example: 'void printTokens(String text) {\n StringTokenizer tokenizer = new StringTokenizer(text, \"\\n\\n\");\n while (tokenizer.hasMoreTokens()) {\n System.out.println(tokenizer.nextToken());\n }\n }' After the quick-fix is applied: 'void printTokens(String text) {\n StringTokenizer tokenizer = new StringTokenizer(text, \"\\n\");\n while (tokenizer.hasMoreTokens()) {\n System.out.println(tokenizer.nextToken());\n }\n }'", - "markdown": "Reports `StringTokenizer()` constructor calls or `nextToken()` method calls that contain duplicate characters in the delimiter argument.\n\n**Example:**\n\n\n void printTokens(String text) {\n StringTokenizer tokenizer = new StringTokenizer(text, \"\\n\\n\");\n while (tokenizer.hasMoreTokens()) {\n System.out.println(tokenizer.nextToken());\n }\n }\n\nAfter the quick-fix is applied:\n\n\n void printTokens(String text) {\n StringTokenizer tokenizer = new StringTokenizer(text, \"\\n\");\n while (tokenizer.hasMoreTokens()) {\n System.out.println(tokenizer.nextToken());\n }\n }\n" + "text": "Reports 'assert' statements and test framework assertions that are suppressed by a surrounding catch block. Such assertions will never fail, as the thrown 'AssertionError' will be caught and silently ignored. Example 1: 'void javaAssertion() {\n try {\n ...\n assert 1 == 2;\n } catch (AssertionError e) {\n // the assertion is silently ignored\n }\n }' Example 2: '@Test\n void testWithAssertJ() {\n try {\n ...\n assertThat(1).as(\"test\").isEqualTo(2);\n } catch (AssertionError e) {\n // the assertion is silently ignored\n }\n }' Example 3: '@Test\n void testWithJunit() {\n try {\n ...\n assertEquals(1, 2);\n } catch (AssertionError e) {\n // the assertion is silently ignored\n }\n }' New in 2020.3", + "markdown": "Reports `assert` statements and test framework assertions that are suppressed by a surrounding catch block. Such assertions will never fail, as the thrown `AssertionError` will be caught and silently ignored.\n\n**Example 1:**\n\n\n void javaAssertion() {\n try {\n ...\n assert 1 == 2;\n } catch (AssertionError e) {\n // the assertion is silently ignored\n }\n }\n\n**Example 2:**\n\n\n @Test\n void testWithAssertJ() {\n try {\n ...\n assertThat(1).as(\"test\").isEqualTo(2);\n } catch (AssertionError e) {\n // the assertion is silently ignored\n }\n }\n\n**Example 3:**\n\n\n @Test\n void testWithJunit() {\n try {\n ...\n assertEquals(1, 2);\n } catch (AssertionError e) {\n // the assertion is silently ignored\n }\n }\n\nNew in 2020.3" }, "defaultConfiguration": { "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "StringTokenizerDelimiter", + "suppressToolId": "MaskedAssertion", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -31323,8 +31323,8 @@ "relationships": [ { "target": { - "id": "Java/Probable bugs", - "index": 15, + "id": "Java/Test frameworks", + "index": 130, "toolComponent": { "name": "QDJVM" } @@ -31402,19 +31402,19 @@ ] }, { - "id": "ShiftOutOfRange", + "id": "ClassWithMultipleLoggers", "shortDescription": { - "text": "Shift operation by inappropriate constant" + "text": "Class with multiple loggers" }, "fullDescription": { - "text": "Reports shift operations where the shift value is a constant outside the reasonable range. Integer shift operations outside the range '0..31' and long shift operations outside the range '0..63' are reported. Shifting by negative or overly large values is almost certainly a coding error. Example: 'int shiftSize = 32;\n // Warning: shift by 32 bits is equivalent to shift by 0 bits, so there's no shift at all.\n int mask = (1 << shiftSize) - 1;'", - "markdown": "Reports shift operations where the shift value is a constant outside the reasonable range.\n\nInteger shift operations outside the range `0..31` and long shift operations outside the\nrange `0..63` are reported. Shifting by negative or overly large values is almost certainly\na coding error.\n\n**Example:**\n\n\n int shiftSize = 32;\n // Warning: shift by 32 bits is equivalent to shift by 0 bits, so there's no shift at all.\n int mask = (1 << shiftSize) - 1;\n" + "text": "Reports classes that 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. For example: 'public class Critical {\n protected static final Logger LOG = Logger.getLogger(Critical.class);\n\n protected static final Logger myLogger = Logger.getLogger(getClass());\n }' Use the table below to specify Logger class names. Classes which declare multiple fields that have the type of one of the specified classes will be reported by this inspection.", + "markdown": "Reports classes that 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.\n\nFor example:\n\n\n public class Critical {\n protected static final Logger LOG = Logger.getLogger(Critical.class);\n\n protected static final Logger myLogger = Logger.getLogger(getClass());\n }\n\n\nUse the table below to specify Logger class names.\nClasses which declare multiple fields that have the type of one of the specified classes will be reported by this inspection." }, "defaultConfiguration": { - "enabled": true, + "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "ShiftOutOfRange", + "suppressToolId": "ClassWithMultipleLoggers", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -31422,8 +31422,8 @@ "relationships": [ { "target": { - "id": "Java/Bitwise operation issues", - "index": 199, + "id": "Java/Logging", + "index": 119, "toolComponent": { "name": "QDJVM" } @@ -31435,19 +31435,19 @@ ] }, { - "id": "ClassWithMultipleLoggers", + "id": "ShiftOutOfRange", "shortDescription": { - "text": "Class with multiple loggers" + "text": "Shift operation by inappropriate constant" }, "fullDescription": { - "text": "Reports classes that 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. For example: 'public class Critical {\n protected static final Logger LOG = Logger.getLogger(Critical.class);\n\n protected static final Logger myLogger = Logger.getLogger(getClass());\n }' Use the table below to specify Logger class names. Classes which declare multiple fields that have the type of one of the specified classes will be reported by this inspection.", - "markdown": "Reports classes that 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.\n\nFor example:\n\n\n public class Critical {\n protected static final Logger LOG = Logger.getLogger(Critical.class);\n\n protected static final Logger myLogger = Logger.getLogger(getClass());\n }\n\n\nUse the table below to specify Logger class names.\nClasses which declare multiple fields that have the type of one of the specified classes will be reported by this inspection." + "text": "Reports shift operations where the shift value is a constant outside the reasonable range. Integer shift operations outside the range '0..31' and long shift operations outside the range '0..63' are reported. Shifting by negative or overly large values is almost certainly a coding error. Example: 'int shiftSize = 32;\n // Warning: shift by 32 bits is equivalent to shift by 0 bits, so there's no shift at all.\n int mask = (1 << shiftSize) - 1;'", + "markdown": "Reports shift operations where the shift value is a constant outside the reasonable range.\n\nInteger shift operations outside the range `0..31` and long shift operations outside the\nrange `0..63` are reported. Shifting by negative or overly large values is almost certainly\na coding error.\n\n**Example:**\n\n\n int shiftSize = 32;\n // Warning: shift by 32 bits is equivalent to shift by 0 bits, so there's no shift at all.\n int mask = (1 << shiftSize) - 1;\n" }, "defaultConfiguration": { - "enabled": false, + "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "ClassWithMultipleLoggers", + "suppressToolId": "ShiftOutOfRange", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -31455,8 +31455,8 @@ "relationships": [ { "target": { - "id": "Java/Logging", - "index": 119, + "id": "Java/Bitwise operation issues", + "index": 199, "toolComponent": { "name": "QDJVM" } @@ -31501,19 +31501,19 @@ ] }, { - "id": "AutoBoxing", + "id": "ExtendsThrowable", "shortDescription": { - "text": "Auto-boxing" + "text": "Class directly extends 'Throwable'" }, "fullDescription": { - "text": "Reports expressions that are affected by autoboxing conversion (automatic wrapping of primitive values as objects). Try not to use objects instead of primitives. It might significantly affect performance. Example: 'Integer x = 42;' The quick-fix makes the conversion explicit: 'Integer x = Integer.valueOf(42);' AutoBoxing appeared in Java 5. This inspection can help to downgrade for backward compatibility with earlier Java versions.", - "markdown": "Reports expressions that are affected by autoboxing conversion (automatic wrapping of primitive values as objects). Try not to use objects instead of primitives. It might significantly affect performance.\n\n**Example:**\n\n Integer x = 42;\n\nThe quick-fix makes the conversion explicit:\n\n Integer x = Integer.valueOf(42);\n\n\n*AutoBoxing* appeared in Java 5.\nThis inspection can help to downgrade for backward compatibility with earlier Java versions." + "text": "Reports classes that directly extend 'java.lang.Throwable'. Extending 'java.lang.Throwable' directly is generally considered bad practice. It is usually enough to extend 'java.lang.RuntimeException', 'java.lang.Exception', or - in special cases - 'java.lang.Error'. Example: 'class EnigmaThrowable extends Throwable {} // warning: Class 'EnigmaThrowable' directly extends 'java.lang.Throwable''", + "markdown": "Reports classes that directly extend `java.lang.Throwable`.\n\nExtending `java.lang.Throwable` directly is generally considered bad practice.\nIt is usually enough to extend `java.lang.RuntimeException`, `java.lang.Exception`, or - in special\ncases - `java.lang.Error`.\n\n**Example:**\n\n\n class EnigmaThrowable extends Throwable {} // warning: Class 'EnigmaThrowable' directly extends 'java.lang.Throwable'\n" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "AutoBoxing", + "suppressToolId": "ExtendsThrowable", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -31521,8 +31521,8 @@ "relationships": [ { "target": { - "id": "Java/Performance", - "index": 7, + "id": "Java/Error handling", + "index": 14, "toolComponent": { "name": "QDJVM" } @@ -31534,19 +31534,19 @@ ] }, { - "id": "ExtendsThrowable", + "id": "AutoBoxing", "shortDescription": { - "text": "Class directly extends 'Throwable'" + "text": "Auto-boxing" }, "fullDescription": { - "text": "Reports classes that directly extend 'java.lang.Throwable'. Extending 'java.lang.Throwable' directly is generally considered bad practice. It is usually enough to extend 'java.lang.RuntimeException', 'java.lang.Exception', or - in special cases - 'java.lang.Error'. Example: 'class EnigmaThrowable extends Throwable {} // warning: Class 'EnigmaThrowable' directly extends 'java.lang.Throwable''", - "markdown": "Reports classes that directly extend `java.lang.Throwable`.\n\nExtending `java.lang.Throwable` directly is generally considered bad practice.\nIt is usually enough to extend `java.lang.RuntimeException`, `java.lang.Exception`, or - in special\ncases - `java.lang.Error`.\n\n**Example:**\n\n\n class EnigmaThrowable extends Throwable {} // warning: Class 'EnigmaThrowable' directly extends 'java.lang.Throwable'\n" + "text": "Reports expressions that are affected by autoboxing conversion (automatic wrapping of primitive values as objects). Try not to use objects instead of primitives. It might significantly affect performance. Example: 'Integer x = 42;' The quick-fix makes the conversion explicit: 'Integer x = Integer.valueOf(42);' AutoBoxing appeared in Java 5. This inspection can help to downgrade for backward compatibility with earlier Java versions.", + "markdown": "Reports expressions that are affected by autoboxing conversion (automatic wrapping of primitive values as objects). Try not to use objects instead of primitives. It might significantly affect performance.\n\n**Example:**\n\n Integer x = 42;\n\nThe quick-fix makes the conversion explicit:\n\n Integer x = Integer.valueOf(42);\n\n\n*AutoBoxing* appeared in Java 5.\nThis inspection can help to downgrade for backward compatibility with earlier Java versions." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "ExtendsThrowable", + "suppressToolId": "AutoBoxing", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -31554,8 +31554,8 @@ "relationships": [ { "target": { - "id": "Java/Error handling", - "index": 14, + "id": "Java/Performance", + "index": 7, "toolComponent": { "name": "QDJVM" } @@ -31633,19 +31633,19 @@ ] }, { - "id": "UnnecessaryModuleDependencyInspection", + "id": "CloneCallsConstructors", "shortDescription": { - "text": "Unnecessary module dependency" + "text": "'clone()' instantiates objects with constructor" }, "fullDescription": { - "text": "Reports dependencies on modules that are not used. The quick-fix safely removes such unused dependencies.", - "markdown": "Reports dependencies on modules that are not used. The quick-fix safely removes such unused dependencies." + "text": "Reports calls to object constructors inside 'clone()' methods. It is considered good practice to call 'clone()' to instantiate objects inside of a 'clone()' method instead of creating them directly to support later subclassing. This inspection will not report 'clone()' methods declared as 'final' or 'clone()' methods on 'final' classes.", + "markdown": "Reports calls to object constructors inside `clone()` methods.\n\nIt is considered good practice to call `clone()` to instantiate objects inside of a `clone()` method\ninstead of creating them directly to support later subclassing.\nThis inspection will not report\n`clone()` methods declared as `final`\nor `clone()` methods on `final` classes." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "UnnecessaryModuleDependencyInspection", + "suppressToolId": "CloneCallsConstructors", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -31653,8 +31653,8 @@ "relationships": [ { "target": { - "id": "Java/Declaration redundancy", - "index": 13, + "id": "Java/Cloning issues", + "index": 116, "toolComponent": { "name": "QDJVM" } @@ -31666,19 +31666,19 @@ ] }, { - "id": "CloneCallsConstructors", + "id": "UnnecessaryModuleDependencyInspection", "shortDescription": { - "text": "'clone()' instantiates objects with constructor" + "text": "Unnecessary module dependency" }, "fullDescription": { - "text": "Reports calls to object constructors inside 'clone()' methods. It is considered good practice to call 'clone()' to instantiate objects inside of a 'clone()' method instead of creating them directly to support later subclassing. This inspection will not report 'clone()' methods declared as 'final' or 'clone()' methods on 'final' classes.", - "markdown": "Reports calls to object constructors inside `clone()` methods.\n\nIt is considered good practice to call `clone()` to instantiate objects inside of a `clone()` method\ninstead of creating them directly to support later subclassing.\nThis inspection will not report\n`clone()` methods declared as `final`\nor `clone()` methods on `final` classes." + "text": "Reports dependencies on modules that are not used. The quick-fix safely removes such unused dependencies.", + "markdown": "Reports dependencies on modules that are not used. The quick-fix safely removes such unused dependencies." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "CloneCallsConstructors", + "suppressToolId": "UnnecessaryModuleDependencyInspection", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -31686,8 +31686,8 @@ "relationships": [ { "target": { - "id": "Java/Cloning issues", - "index": 116, + "id": "Java/Declaration redundancy", + "index": 13, "toolComponent": { "name": "QDJVM" } @@ -31897,28 +31897,28 @@ ] }, { - "id": "WhileCanBeDoWhile", + "id": "SharedThreadLocalRandom", "shortDescription": { - "text": "'while' can be replaced with 'do while'" + "text": "'ThreadLocalRandom' instance might be shared" }, "fullDescription": { - "text": "Reports 'while' loops that could be more effectively written as 'do-while' loops. There are 'while' loops where the code just before the loop is identical to the code in the body of the loop. Replacing with a 'do-while' loop removes the duplicated code. For 'while' loops without such duplicated code, the quick fix is offered in the editor as well, but without highlighting. Example: 'foo();\n while (x) {\n foo();\n }' Can be replaced with: 'do {\n foo();\n } while (x);' New in 2024.1", - "markdown": "Reports `while` loops that could be more effectively written as `do-while` loops.\nThere are `while` loops where the code just before the loop is identical to the code in the body of the loop.\nReplacing with a `do-while` loop removes the duplicated code.\nFor `while` loops without such duplicated code, the quick fix is offered in the editor as well, but without highlighting.\n\n**Example:**\n\n\n foo();\n while (x) {\n foo();\n }\n\nCan be replaced with:\n\n\n do {\n foo();\n } while (x);\n\n\nNew in 2024.1" + "text": "Reports 'java.util.concurrent.ThreadLocalRandom' instances which might be shared between threads. A 'ThreadLocalRandom' should not be shared between threads because that is not thread-safe. The inspection reports instances that are assigned to a field used as a method argument, or assigned to a local variable and used in anonymous or nested classes as they might get shared between threads. Usages of 'ThreadLocalRandom' should typically look like 'ThreadLocalRandom.current().nextInt(...)' (or 'nextDouble(...)' etc.). When all usages are in this form, 'ThreadLocalRandom' instances cannot be used accidentally by multiple threads. Example: 'class Main {\n void printRandomNumbersAsync() {\n ThreadLocalRandom random = ThreadLocalRandom.current();\n CompletableFuture.supplyAsync(() -> generateNumbers(random))\n .thenAccept(numbers -> System.out.println(Arrays.toString(numbers)));\n }\n\n private int[] generateNumbers(Random random) {\n return random.ints(1000, 0, 100).toArray();\n }\n }' Use the options to list methods that are safe to be passed to 'ThreadLocalRandom' instances as an argument. It's possible to use regular expressions for method names.", + "markdown": "Reports `java.util.concurrent.ThreadLocalRandom` instances which might be shared between threads.\n\n\nA `ThreadLocalRandom` should not be shared between threads because that is not thread-safe.\nThe inspection reports instances that are assigned to a field used as a method argument,\nor assigned to a local variable and used in anonymous or nested classes as they might get shared between threads.\n\n\nUsages of `ThreadLocalRandom` should typically look like `ThreadLocalRandom.current().nextInt(...)`\n(or `nextDouble(...)` etc.).\nWhen all usages are in this form, `ThreadLocalRandom` instances cannot be used accidentally by multiple threads.\n\n**Example:**\n\n\n class Main {\n void printRandomNumbersAsync() {\n ThreadLocalRandom random = ThreadLocalRandom.current();\n CompletableFuture.supplyAsync(() -> generateNumbers(random))\n .thenAccept(numbers -> System.out.println(Arrays.toString(numbers)));\n }\n\n private int[] generateNumbers(Random random) {\n return random.ints(1000, 0, 100).toArray();\n }\n }\n \n\nUse the options to list methods that are safe to be passed to `ThreadLocalRandom` instances as an argument.\nIt's possible to use regular expressions for method names." }, "defaultConfiguration": { - "enabled": true, - "level": "note", + "enabled": false, + "level": "warning", "parameters": { - "suppressToolId": "WhileCanBeDoWhile", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" + "suppressToolId": "SharedThreadLocalRandom", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { - "id": "Java/Control flow issues", - "index": 31, + "id": "Java/Threading issues", + "index": 29, "toolComponent": { "name": "QDJVM" } @@ -31930,28 +31930,28 @@ ] }, { - "id": "SharedThreadLocalRandom", + "id": "WhileCanBeDoWhile", "shortDescription": { - "text": "'ThreadLocalRandom' instance might be shared" + "text": "'while' can be replaced with 'do while'" }, "fullDescription": { - "text": "Reports 'java.util.concurrent.ThreadLocalRandom' instances which might be shared between threads. A 'ThreadLocalRandom' should not be shared between threads because that is not thread-safe. The inspection reports instances that are assigned to a field used as a method argument, or assigned to a local variable and used in anonymous or nested classes as they might get shared between threads. Usages of 'ThreadLocalRandom' should typically look like 'ThreadLocalRandom.current().nextInt(...)' (or 'nextDouble(...)' etc.). When all usages are in this form, 'ThreadLocalRandom' instances cannot be used accidentally by multiple threads. Example: 'class Main {\n void printRandomNumbersAsync() {\n ThreadLocalRandom random = ThreadLocalRandom.current();\n CompletableFuture.supplyAsync(() -> generateNumbers(random))\n .thenAccept(numbers -> System.out.println(Arrays.toString(numbers)));\n }\n\n private int[] generateNumbers(Random random) {\n return random.ints(1000, 0, 100).toArray();\n }\n }' Use the options to list methods that are safe to be passed to 'ThreadLocalRandom' instances as an argument. It's possible to use regular expressions for method names.", - "markdown": "Reports `java.util.concurrent.ThreadLocalRandom` instances which might be shared between threads.\n\n\nA `ThreadLocalRandom` should not be shared between threads because that is not thread-safe.\nThe inspection reports instances that are assigned to a field used as a method argument,\nor assigned to a local variable and used in anonymous or nested classes as they might get shared between threads.\n\n\nUsages of `ThreadLocalRandom` should typically look like `ThreadLocalRandom.current().nextInt(...)`\n(or `nextDouble(...)` etc.).\nWhen all usages are in this form, `ThreadLocalRandom` instances cannot be used accidentally by multiple threads.\n\n**Example:**\n\n\n class Main {\n void printRandomNumbersAsync() {\n ThreadLocalRandom random = ThreadLocalRandom.current();\n CompletableFuture.supplyAsync(() -> generateNumbers(random))\n .thenAccept(numbers -> System.out.println(Arrays.toString(numbers)));\n }\n\n private int[] generateNumbers(Random random) {\n return random.ints(1000, 0, 100).toArray();\n }\n }\n \n\nUse the options to list methods that are safe to be passed to `ThreadLocalRandom` instances as an argument.\nIt's possible to use regular expressions for method names." + "text": "Reports 'while' loops that could be more effectively written as 'do-while' loops. There are 'while' loops where the code just before the loop is identical to the code in the body of the loop. Replacing with a 'do-while' loop removes the duplicated code. For 'while' loops without such duplicated code, the quick fix is offered in the editor as well, but without highlighting. Example: 'foo();\n while (x) {\n foo();\n }' Can be replaced with: 'do {\n foo();\n } while (x);' New in 2024.1", + "markdown": "Reports `while` loops that could be more effectively written as `do-while` loops.\nThere are `while` loops where the code just before the loop is identical to the code in the body of the loop.\nReplacing with a `do-while` loop removes the duplicated code.\nFor `while` loops without such duplicated code, the quick fix is offered in the editor as well, but without highlighting.\n\n**Example:**\n\n\n foo();\n while (x) {\n foo();\n }\n\nCan be replaced with:\n\n\n do {\n foo();\n } while (x);\n\n\nNew in 2024.1" }, "defaultConfiguration": { - "enabled": false, - "level": "warning", + "enabled": true, + "level": "note", "parameters": { - "suppressToolId": "SharedThreadLocalRandom", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "WhileCanBeDoWhile", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" } }, "relationships": [ { "target": { - "id": "Java/Threading issues", - "index": 29, + "id": "Java/Control flow issues", + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -32215,7 +32215,7 @@ { "target": { "id": "Java/Naming conventions", - "index": 79, + "index": 80, "toolComponent": { "name": "QDJVM" } @@ -32391,7 +32391,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -32568,19 +32568,19 @@ ] }, { - "id": "ImplicitCallToSuper", + "id": "MissingDeprecatedAnnotation", "shortDescription": { - "text": "Implicit call to 'super()'" + "text": "Missing '@Deprecated' annotation" }, "fullDescription": { - "text": "Reports constructors that do not begin with a call to \"super\" constructor or another constructor 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. Example: 'class Foo {\n Foo() {}\n }' After the quick-fix is applied: 'class Foo {\n Foo() {\n super();\n }\n }' Use the inspection settings to ignore classes extending directly from 'Object'. For instance: 'class Foo {\n Foo() {} // Not reported\n }\n\n class Bar extends Foo {\n Bar() {} // Implicit call to 'super()'\n }'", - "markdown": "Reports constructors that do not begin with a call to \"super\" constructor or another constructor of the same class.\n\nSuch constructors can be thought of as implicitly beginning with a\ncall to `super()`. Some coding standards prefer that such calls to\n`super()` be made explicitly.\n\n**Example:**\n\n\n class Foo {\n Foo() {}\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo {\n Foo() {\n super();\n }\n }\n\n\nUse the inspection settings to ignore classes extending directly from `Object`.\nFor instance:\n\n\n class Foo {\n Foo() {} // Not reported\n }\n\n class Bar extends Foo {\n Bar() {} // Implicit call to 'super()'\n }\n" + "text": "Reports module declarations, classes, fields, or methods that have the '@deprecated' Javadoc tag but do not have the '@java.lang.Deprecated' annotation. Example: '/**\n * @deprecated use {@code example()} instead\n */\n void sample(){ }' After the quick-fix is applied: '/**\n * @deprecated use {@code example()} instead\n */\n @Deprecated\n void sample(){ }' Use the checkbox below to report members annotated with '@Deprecated' without an explanation in a Javadoc '@deprecated' tag. This inspection depends on the Java feature 'Annotations', which is available since Java 5.", + "markdown": "Reports module declarations, classes, fields, or methods that have the `@deprecated` Javadoc tag but do not have the `@java.lang.Deprecated` annotation.\n\n**Example:**\n\n\n /**\n * @deprecated use {@code example()} instead\n */\n void sample(){ }\n\nAfter the quick-fix is applied:\n\n\n /**\n * @deprecated use {@code example()} instead\n */\n @Deprecated\n void sample(){ }\n\n\nUse the checkbox below to report members annotated with `@Deprecated` without\nan explanation in a Javadoc `@deprecated` tag.\n\nThis inspection depends on the Java feature 'Annotations', which is available since Java 5." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "ImplicitCallToSuper", + "suppressToolId": "MissingDeprecatedAnnotation", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -32588,8 +32588,8 @@ "relationships": [ { "target": { - "id": "Java/Code style issues", - "index": 11, + "id": "Java/Javadoc", + "index": 77, "toolComponent": { "name": "QDJVM" } @@ -32601,19 +32601,19 @@ ] }, { - "id": "MissingDeprecatedAnnotation", + "id": "ImplicitCallToSuper", "shortDescription": { - "text": "Missing '@Deprecated' annotation" + "text": "Implicit call to 'super()'" }, "fullDescription": { - "text": "Reports module declarations, classes, fields, or methods that have the '@deprecated' Javadoc tag but do not have the '@java.lang.Deprecated' annotation. Example: '/**\n * @deprecated use {@code example()} instead\n */\n void sample(){ }' After the quick-fix is applied: '/**\n * @deprecated use {@code example()} instead\n */\n @Deprecated\n void sample(){ }' Use the checkbox below to report members annotated with '@Deprecated' without an explanation in a Javadoc '@deprecated' tag. This inspection depends on the Java feature 'Annotations', which is available since Java 5.", - "markdown": "Reports module declarations, classes, fields, or methods that have the `@deprecated` Javadoc tag but do not have the `@java.lang.Deprecated` annotation.\n\n**Example:**\n\n\n /**\n * @deprecated use {@code example()} instead\n */\n void sample(){ }\n\nAfter the quick-fix is applied:\n\n\n /**\n * @deprecated use {@code example()} instead\n */\n @Deprecated\n void sample(){ }\n\n\nUse the checkbox below to report members annotated with `@Deprecated` without\nan explanation in a Javadoc `@deprecated` tag.\n\nThis inspection depends on the Java feature 'Annotations', which is available since Java 5." + "text": "Reports constructors that do not begin with a call to \"super\" constructor or another constructor 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. Example: 'class Foo {\n Foo() {}\n }' After the quick-fix is applied: 'class Foo {\n Foo() {\n super();\n }\n }' Use the inspection settings to ignore classes extending directly from 'Object'. For instance: 'class Foo {\n Foo() {} // Not reported\n }\n\n class Bar extends Foo {\n Bar() {} // Implicit call to 'super()'\n }'", + "markdown": "Reports constructors that do not begin with a call to \"super\" constructor or another constructor of the same class.\n\nSuch constructors can be thought of as implicitly beginning with a\ncall to `super()`. Some coding standards prefer that such calls to\n`super()` be made explicitly.\n\n**Example:**\n\n\n class Foo {\n Foo() {}\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo {\n Foo() {\n super();\n }\n }\n\n\nUse the inspection settings to ignore classes extending directly from `Object`.\nFor instance:\n\n\n class Foo {\n Foo() {} // Not reported\n }\n\n class Bar extends Foo {\n Bar() {} // Implicit call to 'super()'\n }\n" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "MissingDeprecatedAnnotation", + "suppressToolId": "ImplicitCallToSuper", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -32621,8 +32621,8 @@ "relationships": [ { "target": { - "id": "Java/Javadoc", - "index": 77, + "id": "Java/Code style issues", + "index": 11, "toolComponent": { "name": "QDJVM" } @@ -32721,7 +32721,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -32919,7 +32919,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -33051,7 +33051,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -33150,7 +33150,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -33618,7 +33618,7 @@ { "target": { "id": "Java/Naming conventions", - "index": 79, + "index": 80, "toolComponent": { "name": "QDJVM" } @@ -33684,7 +33684,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -33861,19 +33861,19 @@ ] }, { - "id": "UnnecessaryEmptyArrayUsage", + "id": "LiteralAsArgToStringEquals", "shortDescription": { - "text": "Unnecessary zero length array usage" + "text": "String literal may be 'equals()' qualifier" }, "fullDescription": { - "text": "Reports allocations of arrays with known lengths of zero when there is a constant for that in the class of the array's element type. As zero-length arrays are immutable, you can save memory reusing the same array instance. Example: 'class Item {\n // Public zero-length array constant that can be reused \n public static final Item[] EMPTY_ARRAY = new Item[0];\n }\n class EmptyNode {\n Item[] getChildren() {\n // Unnecessary zero-length array creation\n return new Item[0];\n }\n }' After the quick-fix is applied: 'class EmptyNode {\n Item[] getChildren() {\n return Item.EMPTY_ARRAY;\n }\n }'", - "markdown": "Reports allocations of arrays with known lengths of zero when there is a constant for that in the class of the array's element type. As zero-length arrays are immutable, you can save memory reusing the same array instance.\n\n**Example:**\n\n\n class Item {\n // Public zero-length array constant that can be reused \n public static final Item[] EMPTY_ARRAY = new Item[0];\n }\n class EmptyNode {\n Item[] getChildren() {\n // Unnecessary zero-length array creation\n return new Item[0];\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class EmptyNode {\n Item[] getChildren() {\n return Item.EMPTY_ARRAY;\n }\n }\n" + "text": "Reports 'String.equals()' or 'String.equalsIgnoreCase()' calls with a string literal argument. Some coding standards specify that string literals should be the qualifier of 'equals()', rather than argument, thus minimizing 'NullPointerException'-s. A quick-fix is available to exchange the literal and the expression. Example: 'boolean isFoo(String value) {\n return value.equals(\"foo\");\n }' After the quick-fix is applied: 'boolean isFoo(String value) {\n return \"foo\".equals(value);\n }'", + "markdown": "Reports `String.equals()` or `String.equalsIgnoreCase()` calls with a string literal argument.\n\nSome coding standards specify that string literals should be the qualifier of `equals()`, rather than\nargument, thus minimizing `NullPointerException`-s.\n\nA quick-fix is available to exchange the literal and the expression.\n\n**Example:**\n\n\n boolean isFoo(String value) {\n return value.equals(\"foo\");\n }\n\nAfter the quick-fix is applied:\n\n\n boolean isFoo(String value) {\n return \"foo\".equals(value);\n }\n" }, "defaultConfiguration": { - "enabled": true, + "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "ConstantForZeroLengthArrayAllocation", + "suppressToolId": "LiteralAsArgToStringEquals", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -33881,8 +33881,8 @@ "relationships": [ { "target": { - "id": "Java/Memory", - "index": 166, + "id": "Java/Code style issues", + "index": 11, "toolComponent": { "name": "QDJVM" } @@ -33894,19 +33894,19 @@ ] }, { - "id": "LiteralAsArgToStringEquals", + "id": "UnnecessaryEmptyArrayUsage", "shortDescription": { - "text": "String literal may be 'equals()' qualifier" + "text": "Unnecessary zero length array usage" }, "fullDescription": { - "text": "Reports 'String.equals()' or 'String.equalsIgnoreCase()' calls with a string literal argument. Some coding standards specify that string literals should be the qualifier of 'equals()', rather than argument, thus minimizing 'NullPointerException'-s. A quick-fix is available to exchange the literal and the expression. Example: 'boolean isFoo(String value) {\n return value.equals(\"foo\");\n }' After the quick-fix is applied: 'boolean isFoo(String value) {\n return \"foo\".equals(value);\n }'", - "markdown": "Reports `String.equals()` or `String.equalsIgnoreCase()` calls with a string literal argument.\n\nSome coding standards specify that string literals should be the qualifier of `equals()`, rather than\nargument, thus minimizing `NullPointerException`-s.\n\nA quick-fix is available to exchange the literal and the expression.\n\n**Example:**\n\n\n boolean isFoo(String value) {\n return value.equals(\"foo\");\n }\n\nAfter the quick-fix is applied:\n\n\n boolean isFoo(String value) {\n return \"foo\".equals(value);\n }\n" + "text": "Reports allocations of arrays with known lengths of zero when there is a constant for that in the class of the array's element type. As zero-length arrays are immutable, you can save memory reusing the same array instance. Example: 'class Item {\n // Public zero-length array constant that can be reused \n public static final Item[] EMPTY_ARRAY = new Item[0];\n }\n class EmptyNode {\n Item[] getChildren() {\n // Unnecessary zero-length array creation\n return new Item[0];\n }\n }' After the quick-fix is applied: 'class EmptyNode {\n Item[] getChildren() {\n return Item.EMPTY_ARRAY;\n }\n }'", + "markdown": "Reports allocations of arrays with known lengths of zero when there is a constant for that in the class of the array's element type. As zero-length arrays are immutable, you can save memory reusing the same array instance.\n\n**Example:**\n\n\n class Item {\n // Public zero-length array constant that can be reused \n public static final Item[] EMPTY_ARRAY = new Item[0];\n }\n class EmptyNode {\n Item[] getChildren() {\n // Unnecessary zero-length array creation\n return new Item[0];\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class EmptyNode {\n Item[] getChildren() {\n return Item.EMPTY_ARRAY;\n }\n }\n" }, "defaultConfiguration": { - "enabled": false, + "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "LiteralAsArgToStringEquals", + "suppressToolId": "ConstantForZeroLengthArrayAllocation", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -33914,8 +33914,8 @@ "relationships": [ { "target": { - "id": "Java/Code style issues", - "index": 11, + "id": "Java/Memory", + "index": 166, "toolComponent": { "name": "QDJVM" } @@ -34026,19 +34026,19 @@ ] }, { - "id": "ThrowableSupplierOnlyThrowException", + "id": "IfStatementMissingBreakInLoop", "shortDescription": { - "text": "Throwable supplier never returns a value" + "text": "Early loop exit in 'if' condition" }, "fullDescription": { - "text": "Reports 'Supplier' lambdas in 'Optional.orElseThrow()' calls that throw an exception, instead of returning it. Example: 'optional.orElseThrow(() -> {\n throw new RuntimeException();\n});' After the quick-fix is applied: 'optional.orElseThrow(() -> new RuntimeException());' New in 2023.1", - "markdown": "Reports `Supplier` lambdas in `Optional.orElseThrow()` calls that throw an exception, instead of returning it.\n\n**Example:**\n\n\n optional.orElseThrow(() -> {\n throw new RuntimeException();\n });\n\nAfter the quick-fix is applied:\n\n\n optional.orElseThrow(() -> new RuntimeException());\n\nNew in 2023.1" + "text": "Reports loops with an 'if' statement that can end with 'break' without changing the semantics. This prevents redundant loop iterations. Example: 'boolean found = false;\n for (int i = 0; i < arr.length; i++) {\n if (Objects.equals(value, arr[i])) {\n found = true;\n }\n }' After the quick-fix is applied: 'boolean found = false;\n for (int i = 0; i < arr.length; i++) {\n if (Objects.equals(value, arr[i])) {\n found = true;\n break;\n }\n }' New in 2019.2", + "markdown": "Reports loops with an `if` statement that can end with `break` without changing the semantics. This prevents redundant loop iterations.\n\n**Example:**\n\n\n boolean found = false;\n for (int i = 0; i < arr.length; i++) {\n if (Objects.equals(value, arr[i])) {\n found = true;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n boolean found = false;\n for (int i = 0; i < arr.length; i++) {\n if (Objects.equals(value, arr[i])) {\n found = true;\n break;\n }\n }\n\nNew in 2019.2" }, "defaultConfiguration": { "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "ThrowableSupplierOnlyThrowException", + "suppressToolId": "IfStatementMissingBreakInLoop", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -34046,8 +34046,8 @@ "relationships": [ { "target": { - "id": "Java/Error handling", - "index": 14, + "id": "Java/Performance", + "index": 7, "toolComponent": { "name": "QDJVM" } @@ -34059,19 +34059,19 @@ ] }, { - "id": "IfStatementMissingBreakInLoop", + "id": "ThrowableSupplierOnlyThrowException", "shortDescription": { - "text": "Early loop exit in 'if' condition" + "text": "Throwable supplier never returns a value" }, "fullDescription": { - "text": "Reports loops with an 'if' statement that can end with 'break' without changing the semantics. This prevents redundant loop iterations. Example: 'boolean found = false;\n for (int i = 0; i < arr.length; i++) {\n if (Objects.equals(value, arr[i])) {\n found = true;\n }\n }' After the quick-fix is applied: 'boolean found = false;\n for (int i = 0; i < arr.length; i++) {\n if (Objects.equals(value, arr[i])) {\n found = true;\n break;\n }\n }' New in 2019.2", - "markdown": "Reports loops with an `if` statement that can end with `break` without changing the semantics. This prevents redundant loop iterations.\n\n**Example:**\n\n\n boolean found = false;\n for (int i = 0; i < arr.length; i++) {\n if (Objects.equals(value, arr[i])) {\n found = true;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n boolean found = false;\n for (int i = 0; i < arr.length; i++) {\n if (Objects.equals(value, arr[i])) {\n found = true;\n break;\n }\n }\n\nNew in 2019.2" + "text": "Reports 'Supplier' lambdas in 'Optional.orElseThrow()' calls that throw an exception, instead of returning it. Example: 'optional.orElseThrow(() -> {\n throw new RuntimeException();\n});' After the quick-fix is applied: 'optional.orElseThrow(() -> new RuntimeException());' New in 2023.1", + "markdown": "Reports `Supplier` lambdas in `Optional.orElseThrow()` calls that throw an exception, instead of returning it.\n\n**Example:**\n\n\n optional.orElseThrow(() -> {\n throw new RuntimeException();\n });\n\nAfter the quick-fix is applied:\n\n\n optional.orElseThrow(() -> new RuntimeException());\n\nNew in 2023.1" }, "defaultConfiguration": { "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "IfStatementMissingBreakInLoop", + "suppressToolId": "ThrowableSupplierOnlyThrowException", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -34079,8 +34079,8 @@ "relationships": [ { "target": { - "id": "Java/Performance", - "index": 7, + "id": "Java/Error handling", + "index": 14, "toolComponent": { "name": "QDJVM" } @@ -34158,19 +34158,19 @@ ] }, { - "id": "RedundantStringFormatCall", + "id": "NonFinalFieldOfException", "shortDescription": { - "text": "Redundant call to 'String.format()'" + "text": "Non-final field of 'Exception' class" }, "fullDescription": { - "text": "Reports calls to methods like 'format()' and 'printf()' that can be safely removed or simplified. Example: 'System.out.println(String.format(\"Total count: %d\", 42));' After the quick-fix is applied: 'System.out.printf(\"Total count: %d%n\", 42);'", - "markdown": "Reports calls to methods like `format()` and `printf()` that can be safely removed or simplified.\n\n**Example:**\n\n\n System.out.println(String.format(\"Total count: %d\", 42));\n\nAfter the quick-fix is applied:\n\n\n System.out.printf(\"Total count: %d%n\", 42);\n" + "text": "Reports fields in subclasses of 'java.lang.Exception' that are not declared 'final'. Data on exception objects should not be modified because this may result in losing the error context for later debugging and logging. Example: 'public class EditorException extends Exception {\n private String message; // warning: Non-final field 'message' of exception class\n }'", + "markdown": "Reports fields in subclasses of `java.lang.Exception` that are not declared `final`.\n\nData on exception objects should not be modified\nbecause this may result in losing the error context for later debugging and logging.\n\n**Example:**\n\n\n public class EditorException extends Exception {\n private String message; // warning: Non-final field 'message' of exception class\n }\n" }, "defaultConfiguration": { - "enabled": true, + "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "RedundantStringFormatCall", + "suppressToolId": "NonFinalFieldOfException", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -34178,8 +34178,8 @@ "relationships": [ { "target": { - "id": "Java/Performance", - "index": 7, + "id": "Java/Error handling", + "index": 14, "toolComponent": { "name": "QDJVM" } @@ -34191,19 +34191,19 @@ ] }, { - "id": "NonFinalFieldOfException", + "id": "RedundantStringFormatCall", "shortDescription": { - "text": "Non-final field of 'Exception' class" + "text": "Redundant call to 'String.format()'" }, "fullDescription": { - "text": "Reports fields in subclasses of 'java.lang.Exception' that are not declared 'final'. Data on exception objects should not be modified because this may result in losing the error context for later debugging and logging. Example: 'public class EditorException extends Exception {\n private String message; // warning: Non-final field 'message' of exception class\n }'", - "markdown": "Reports fields in subclasses of `java.lang.Exception` that are not declared `final`.\n\nData on exception objects should not be modified\nbecause this may result in losing the error context for later debugging and logging.\n\n**Example:**\n\n\n public class EditorException extends Exception {\n private String message; // warning: Non-final field 'message' of exception class\n }\n" + "text": "Reports calls to methods like 'format()' and 'printf()' that can be safely removed or simplified. Example: 'System.out.println(String.format(\"Total count: %d\", 42));' After the quick-fix is applied: 'System.out.printf(\"Total count: %d%n\", 42);'", + "markdown": "Reports calls to methods like `format()` and `printf()` that can be safely removed or simplified.\n\n**Example:**\n\n\n System.out.println(String.format(\"Total count: %d\", 42));\n\nAfter the quick-fix is applied:\n\n\n System.out.printf(\"Total count: %d%n\", 42);\n" }, "defaultConfiguration": { - "enabled": false, + "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "NonFinalFieldOfException", + "suppressToolId": "RedundantStringFormatCall", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -34211,8 +34211,8 @@ "relationships": [ { "target": { - "id": "Java/Error handling", - "index": 14, + "id": "Java/Performance", + "index": 7, "toolComponent": { "name": "QDJVM" } @@ -34245,7 +34245,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -34740,7 +34740,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -35014,7 +35014,7 @@ { "target": { "id": "Java/Probable bugs/Nullability problems", - "index": 173, + "index": 172, "toolComponent": { "name": "QDJVM" } @@ -35059,28 +35059,28 @@ ] }, { - "id": "StringTemplateReverseMigration", + "id": "SynchronizationOnGetClass", "shortDescription": { - "text": "String template can be concatenated string" + "text": "Synchronization on 'getClass()'" }, "fullDescription": { - "text": "Reports string template expressions using the 'STR' processor and offers a quick-fix to migrate back to a plain string concatenation. Example: 'String name = \"Bob\";\n String greeting = STR.\"Hello, \\{name}. You are 29 years old.\";' After the quick-fix is applied: 'String name = \"Bob\";\n String greeting = \"Hello, \" + name + \". You are 29 years old.\";' New in 2024.2", - "markdown": "Reports string template expressions using the `STR` processor and offers a quick-fix to migrate back to a plain string concatenation.\n\n**Example:**\n\n\n String name = \"Bob\";\n String greeting = STR.\"Hello, \\{name}. You are 29 years old.\";\n\nAfter the quick-fix is applied:\n\n\n String name = \"Bob\";\n String greeting = \"Hello, \" + name + \". You are 29 years old.\";\n\nNew in 2024.2" + "text": "Reports synchronization on a call to 'getClass()'. If the class containing the synchronization is subclassed, the subclass will synchronize on a different class object. Usually the call to 'getClass()' can be replaced with a class literal expression, for example 'String.class'. An even better solution is synchronizing on a 'private static final' lock object, access to which can be completely controlled. Example: 'synchronized(getClass()) {}'", + "markdown": "Reports synchronization on a call to `getClass()`.\n\n\nIf the class containing the synchronization is subclassed, the subclass\nwill\nsynchronize on a different class object. Usually the call to `getClass()` can be replaced with a class literal expression, for\nexample `String.class`. An even better solution is synchronizing on a `private static final` lock object, access to\nwhich can be completely controlled.\n\n**Example:**\n\n synchronized(getClass()) {}\n" }, "defaultConfiguration": { - "enabled": false, - "level": "note", + "enabled": true, + "level": "warning", "parameters": { - "suppressToolId": "StringTemplateReverseMigration", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" + "suppressToolId": "SynchronizationOnGetClass", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { - "id": "Java/Java language level migration aids/Java 21", - "index": 195, + "id": "Java/Threading issues", + "index": 29, "toolComponent": { "name": "QDJVM" } @@ -35092,28 +35092,28 @@ ] }, { - "id": "DuplicateCondition", + "id": "StringTemplateReverseMigration", "shortDescription": { - "text": "Duplicate condition" + "text": "String template can be concatenated string" }, "fullDescription": { - "text": "Reports duplicate conditions in '&&' and '||' expressions and branches of 'if' statements. While sometimes duplicate conditions are intended, in most cases they are the result of an oversight. Example: 'boolean result = digit1 != digit2 || digit1 != digit2;' To ignore conditions that may produce side effects, use the Ignore conditions with side effects option. Disabling this option may lead to false-positives, for example, when the same method returns different values on subsequent invocations. Example: 'native boolean unknownMethod();\n \n ...\n \n if (unknownMethod() || unknownMethod()) {\n System.out.println(\"Got it\");\n }' Due to possible side effects of 'unknownMethod()' (on the example), the warning will only be triggered if the Ignore conditions with side effects option is disabled.", - "markdown": "Reports duplicate conditions in `&&` and `||` expressions and branches of `if` statements. While sometimes duplicate conditions are intended, in most cases they are the result of an oversight.\n\nExample:\n\n\n boolean result = digit1 != digit2 || digit1 != digit2;\n\n\nTo ignore conditions that may produce side effects, use the **Ignore conditions with side effects** option.\nDisabling this option may lead to false-positives, for example, when the same method returns different values on subsequent invocations.\n\nExample:\n\n\n native boolean unknownMethod();\n \n ...\n \n if (unknownMethod() || unknownMethod()) {\n System.out.println(\"Got it\");\n }\n\nDue to possible side effects of `unknownMethod()` (on the example), the warning will only be\ntriggered if the **Ignore conditions with side effects** option is disabled." + "text": "Reports string template expressions using the 'STR' processor and offers a quick-fix to migrate back to a plain string concatenation. Example: 'String name = \"Bob\";\n String greeting = STR.\"Hello, \\{name}. You are 29 years old.\";' After the quick-fix is applied: 'String name = \"Bob\";\n String greeting = \"Hello, \" + name + \". You are 29 years old.\";' New in 2024.2", + "markdown": "Reports string template expressions using the `STR` processor and offers a quick-fix to migrate back to a plain string concatenation.\n\n**Example:**\n\n\n String name = \"Bob\";\n String greeting = STR.\"Hello, \\{name}. You are 29 years old.\";\n\nAfter the quick-fix is applied:\n\n\n String name = \"Bob\";\n String greeting = \"Hello, \" + name + \". You are 29 years old.\";\n\nNew in 2024.2" }, "defaultConfiguration": { - "enabled": true, - "level": "warning", + "enabled": false, + "level": "note", "parameters": { - "suppressToolId": "DuplicateCondition", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "StringTemplateReverseMigration", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" } }, "relationships": [ { "target": { - "id": "Java/Control flow issues", - "index": 31, + "id": "Java/Java language level migration aids/Java 21", + "index": 195, "toolComponent": { "name": "QDJVM" } @@ -35125,19 +35125,19 @@ ] }, { - "id": "SynchronizationOnGetClass", + "id": "DuplicateCondition", "shortDescription": { - "text": "Synchronization on 'getClass()'" + "text": "Duplicate condition" }, "fullDescription": { - "text": "Reports synchronization on a call to 'getClass()'. If the class containing the synchronization is subclassed, the subclass will synchronize on a different class object. Usually the call to 'getClass()' can be replaced with a class literal expression, for example 'String.class'. An even better solution is synchronizing on a 'private static final' lock object, access to which can be completely controlled. Example: 'synchronized(getClass()) {}'", - "markdown": "Reports synchronization on a call to `getClass()`.\n\n\nIf the class containing the synchronization is subclassed, the subclass\nwill\nsynchronize on a different class object. Usually the call to `getClass()` can be replaced with a class literal expression, for\nexample `String.class`. An even better solution is synchronizing on a `private static final` lock object, access to\nwhich can be completely controlled.\n\n**Example:**\n\n synchronized(getClass()) {}\n" + "text": "Reports duplicate conditions in '&&' and '||' expressions and branches of 'if' statements. While sometimes duplicate conditions are intended, in most cases they are the result of an oversight. Example: 'boolean result = digit1 != digit2 || digit1 != digit2;' To ignore conditions that may produce side effects, use the Ignore conditions with side effects option. Disabling this option may lead to false-positives, for example, when the same method returns different values on subsequent invocations. Example: 'native boolean unknownMethod();\n \n ...\n \n if (unknownMethod() || unknownMethod()) {\n System.out.println(\"Got it\");\n }' Due to possible side effects of 'unknownMethod()' (on the example), the warning will only be triggered if the Ignore conditions with side effects option is disabled.", + "markdown": "Reports duplicate conditions in `&&` and `||` expressions and branches of `if` statements. While sometimes duplicate conditions are intended, in most cases they are the result of an oversight.\n\nExample:\n\n\n boolean result = digit1 != digit2 || digit1 != digit2;\n\n\nTo ignore conditions that may produce side effects, use the **Ignore conditions with side effects** option.\nDisabling this option may lead to false-positives, for example, when the same method returns different values on subsequent invocations.\n\nExample:\n\n\n native boolean unknownMethod();\n \n ...\n \n if (unknownMethod() || unknownMethod()) {\n System.out.println(\"Got it\");\n }\n\nDue to possible side effects of `unknownMethod()` (on the example), the warning will only be\ntriggered if the **Ignore conditions with side effects** option is disabled." }, "defaultConfiguration": { "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "SynchronizationOnGetClass", + "suppressToolId": "DuplicateCondition", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -35145,8 +35145,8 @@ "relationships": [ { "target": { - "id": "Java/Threading issues", - "index": 29, + "id": "Java/Control flow issues", + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -35455,19 +35455,19 @@ ] }, { - "id": "ReplaceInefficientStreamCount", + "id": "ParameterTypePreventsOverriding", "shortDescription": { - "text": "Inefficient Stream API call chains ending with count()" + "text": "Parameter type prevents overriding" }, "fullDescription": { - "text": "Reports Stream API call chains ending with a 'count()' operation, that are optimizable. The following call chains can be replaced by this inspection: 'Collection.stream().count()' → 'Collection.size()'. In Java 8 'Collection.stream().count()' actually iterates over the collection elements to count them, while 'Collection.size()' is much faster for most of the collections. 'Stream.flatMap(Collection::stream).count()' → 'Stream.mapToLong(Collection::size).sum()'. Similarly, there's no need to iterate over all the nested collections. Instead, their sizes could be summed up. 'Stream.filter(o -> ...).count() > 0' → 'Stream.anyMatch(o -> ...)'. Unlike the original call, 'anyMatch()' may stop the computation as soon as a matching element is found. 'Stream.filter(o -> ...).count() == 0' → 'Stream.noneMatch(o -> ...)'. Similar to the above. Note that if the replacement involves a short-circuiting operation like 'anyMatch()', there could be a visible behavior change, if the intermediate stream operations produce side effects. In general, side effects should be avoided in Stream API calls. This inspection depends on the Java feature 'Stream and Optional API', which is available since Java 8.", - "markdown": "Reports Stream API call chains ending with a `count()` operation, that are optimizable.\n\n\nThe following call chains can be replaced by this inspection:\n\n* `Collection.stream().count()` → `Collection.size()`. In Java 8 `Collection.stream().count()` actually iterates over the collection elements to count them, while `Collection.size()` is much faster for most of the collections.\n* `Stream.flatMap(Collection::stream).count()` → `Stream.mapToLong(Collection::size).sum()`. Similarly, there's no need to iterate over all the nested collections. Instead, their sizes could be summed up.\n* `Stream.filter(o -> ...).count() > 0` → `Stream.anyMatch(o -> ...)`. Unlike the original call, `anyMatch()` may stop the computation as soon as a matching element is found.\n* `Stream.filter(o -> ...).count() == 0` → `Stream.noneMatch(o -> ...)`. Similar to the above.\n\n\nNote that if the replacement involves a short-circuiting operation like `anyMatch()`, there could be a visible behavior change,\nif the intermediate stream operations produce side effects. In general, side effects should be avoided in Stream API calls.\n\nThis inspection depends on the Java feature 'Stream and Optional API', which is available since Java 8." + "text": "Reports parameter types of a subclass method that have the same name as the parameter type of the corresponding super method but belong to a different package. In these cases, the subclass method cannot override the super method. Example: 'public class A {\n public void method(Object o) {}\n}\n\npublic class B extends A {\n public void method(Object o) {} // warning on parameter type\n class Object {}\n}' After the quick-fix is applied: 'public class A {\n public void method(Object o) {}\n}\n\npublic class B extends A {\n public void method(java.lang.Object o) {} // new parameter type\n class Object {}\n}'", + "markdown": "Reports parameter types of a subclass method that have the same name as the parameter type of the corresponding super method but belong to a different package. In these cases, the subclass method cannot override the super method.\n\n**Example:**\n\n\n public class A {\n public void method(Object o) {}\n }\n\n public class B extends A {\n public void method(Object o) {} // warning on parameter type\n class Object {}\n }\n\nAfter the quick-fix is applied:\n\n\n public class A {\n public void method(Object o) {}\n }\n\n public class B extends A {\n public void method(java.lang.Object o) {} // new parameter type\n class Object {}\n }\n" }, "defaultConfiguration": { - "enabled": true, + "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "ReplaceInefficientStreamCount", + "suppressToolId": "ParameterTypePreventsOverriding", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -35475,8 +35475,8 @@ "relationships": [ { "target": { - "id": "Java/Performance", - "index": 7, + "id": "Java/Inheritance issues", + "index": 151, "toolComponent": { "name": "QDJVM" } @@ -35488,19 +35488,19 @@ ] }, { - "id": "ParameterTypePreventsOverriding", + "id": "ReplaceInefficientStreamCount", "shortDescription": { - "text": "Parameter type prevents overriding" + "text": "Inefficient Stream API call chains ending with count()" }, "fullDescription": { - "text": "Reports parameter types of a subclass method that have the same name as the parameter type of the corresponding super method but belong to a different package. In these cases, the subclass method cannot override the super method. Example: 'public class A {\n public void method(Object o) {}\n}\n\npublic class B extends A {\n public void method(Object o) {} // warning on parameter type\n class Object {}\n}' After the quick-fix is applied: 'public class A {\n public void method(Object o) {}\n}\n\npublic class B extends A {\n public void method(java.lang.Object o) {} // new parameter type\n class Object {}\n}'", - "markdown": "Reports parameter types of a subclass method that have the same name as the parameter type of the corresponding super method but belong to a different package. In these cases, the subclass method cannot override the super method.\n\n**Example:**\n\n\n public class A {\n public void method(Object o) {}\n }\n\n public class B extends A {\n public void method(Object o) {} // warning on parameter type\n class Object {}\n }\n\nAfter the quick-fix is applied:\n\n\n public class A {\n public void method(Object o) {}\n }\n\n public class B extends A {\n public void method(java.lang.Object o) {} // new parameter type\n class Object {}\n }\n" + "text": "Reports Stream API call chains ending with a 'count()' operation, that are optimizable. The following call chains can be replaced by this inspection: 'Collection.stream().count()' → 'Collection.size()'. In Java 8 'Collection.stream().count()' actually iterates over the collection elements to count them, while 'Collection.size()' is much faster for most of the collections. 'Stream.flatMap(Collection::stream).count()' → 'Stream.mapToLong(Collection::size).sum()'. Similarly, there's no need to iterate over all the nested collections. Instead, their sizes could be summed up. 'Stream.filter(o -> ...).count() > 0' → 'Stream.anyMatch(o -> ...)'. Unlike the original call, 'anyMatch()' may stop the computation as soon as a matching element is found. 'Stream.filter(o -> ...).count() == 0' → 'Stream.noneMatch(o -> ...)'. Similar to the above. Note that if the replacement involves a short-circuiting operation like 'anyMatch()', there could be a visible behavior change, if the intermediate stream operations produce side effects. In general, side effects should be avoided in Stream API calls. This inspection depends on the Java feature 'Stream and Optional API', which is available since Java 8.", + "markdown": "Reports Stream API call chains ending with a `count()` operation, that are optimizable.\n\n\nThe following call chains can be replaced by this inspection:\n\n* `Collection.stream().count()` → `Collection.size()`. In Java 8 `Collection.stream().count()` actually iterates over the collection elements to count them, while `Collection.size()` is much faster for most of the collections.\n* `Stream.flatMap(Collection::stream).count()` → `Stream.mapToLong(Collection::size).sum()`. Similarly, there's no need to iterate over all the nested collections. Instead, their sizes could be summed up.\n* `Stream.filter(o -> ...).count() > 0` → `Stream.anyMatch(o -> ...)`. Unlike the original call, `anyMatch()` may stop the computation as soon as a matching element is found.\n* `Stream.filter(o -> ...).count() == 0` → `Stream.noneMatch(o -> ...)`. Similar to the above.\n\n\nNote that if the replacement involves a short-circuiting operation like `anyMatch()`, there could be a visible behavior change,\nif the intermediate stream operations produce side effects. In general, side effects should be avoided in Stream API calls.\n\nThis inspection depends on the Java feature 'Stream and Optional API', which is available since Java 8." }, "defaultConfiguration": { - "enabled": false, + "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "ParameterTypePreventsOverriding", + "suppressToolId": "ReplaceInefficientStreamCount", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -35508,8 +35508,8 @@ "relationships": [ { "target": { - "id": "Java/Inheritance issues", - "index": 151, + "id": "Java/Performance", + "index": 7, "toolComponent": { "name": "QDJVM" } @@ -35743,7 +35743,7 @@ { "target": { "id": "Java/Naming conventions", - "index": 79, + "index": 80, "toolComponent": { "name": "QDJVM" } @@ -35948,7 +35948,7 @@ { "target": { "id": "Java/Probable bugs/Nullability problems", - "index": 173, + "index": 172, "toolComponent": { "name": "QDJVM" } @@ -36014,7 +36014,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -36047,7 +36047,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -36113,7 +36113,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -36311,7 +36311,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -36476,7 +36476,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -36575,7 +36575,7 @@ { "target": { "id": "Java/Naming conventions", - "index": 79, + "index": 80, "toolComponent": { "name": "QDJVM" } @@ -36587,19 +36587,19 @@ ] }, { - "id": "ClassNamePrefixedWithPackageName", + "id": "ConstantConditionalExpression", "shortDescription": { - "text": "Class name prefixed with package name" + "text": "Constant conditional expression" }, "fullDescription": { - "text": "Reports classes whose names are prefixed with their package names, ignoring differences in capitalization. While occasionally having such names is reasonable, they are often used due to a poor naming scheme, may be redundant and annoying. Example: 'package byteCode;\n class ByteCodeAnalyzer {}' A quick-fix that renames such classes is available only in the editor.", - "markdown": "Reports classes whose names are prefixed with their package names, ignoring differences in capitalization.\n\nWhile occasionally having such names is reasonable, they are often used due to a poor naming scheme, may be redundant and\nannoying.\n\n**Example:**\n\n\n package byteCode;\n class ByteCodeAnalyzer {}\n\nA quick-fix that renames such classes is available only in the editor." + "text": "Reports conditional expressions in which the condition is either a 'true' or 'false' constant. These expressions sometimes occur as a result of automatic refactorings and may be simplified. Example: 'return true ? \"Yes\" : \"No\";' After quick-fix is applied: 'return \"Yes\";'", + "markdown": "Reports conditional expressions in which the condition is either a `true` or `false` constant. These expressions sometimes occur as a result of automatic refactorings and may be simplified.\n\nExample:\n\n\n return true ? \"Yes\" : \"No\";\n\nAfter quick-fix is applied:\n\n\n return \"Yes\";\n" }, "defaultConfiguration": { - "enabled": false, + "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "ClassNamePrefixedWithPackageName", + "suppressToolId": "ConstantConditionalExpression", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -36607,8 +36607,8 @@ "relationships": [ { "target": { - "id": "Java/Naming conventions/Class", - "index": 80, + "id": "Java/Control flow issues", + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -36620,19 +36620,19 @@ ] }, { - "id": "ConstantConditionalExpression", + "id": "ClassNamePrefixedWithPackageName", "shortDescription": { - "text": "Constant conditional expression" + "text": "Class name prefixed with package name" }, "fullDescription": { - "text": "Reports conditional expressions in which the condition is either a 'true' or 'false' constant. These expressions sometimes occur as a result of automatic refactorings and may be simplified. Example: 'return true ? \"Yes\" : \"No\";' After quick-fix is applied: 'return \"Yes\";'", - "markdown": "Reports conditional expressions in which the condition is either a `true` or `false` constant. These expressions sometimes occur as a result of automatic refactorings and may be simplified.\n\nExample:\n\n\n return true ? \"Yes\" : \"No\";\n\nAfter quick-fix is applied:\n\n\n return \"Yes\";\n" + "text": "Reports classes whose names are prefixed with their package names, ignoring differences in capitalization. While occasionally having such names is reasonable, they are often used due to a poor naming scheme, may be redundant and annoying. Example: 'package byteCode;\n class ByteCodeAnalyzer {}' A quick-fix that renames such classes is available only in the editor.", + "markdown": "Reports classes whose names are prefixed with their package names, ignoring differences in capitalization.\n\nWhile occasionally having such names is reasonable, they are often used due to a poor naming scheme, may be redundant and\nannoying.\n\n**Example:**\n\n\n package byteCode;\n class ByteCodeAnalyzer {}\n\nA quick-fix that renames such classes is available only in the editor." }, "defaultConfiguration": { - "enabled": true, + "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "ConstantConditionalExpression", + "suppressToolId": "ClassNamePrefixedWithPackageName", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -36640,8 +36640,8 @@ "relationships": [ { "target": { - "id": "Java/Control flow issues", - "index": 31, + "id": "Java/Naming conventions/Class", + "index": 81, "toolComponent": { "name": "QDJVM" } @@ -36950,19 +36950,19 @@ ] }, { - "id": "NonSerializableWithSerialVersionUIDField", + "id": "SynchronizeOnValueBasedClass", "shortDescription": { - "text": "Non-serializable class with 'serialVersionUID'" + "text": "Value-based warnings" }, "fullDescription": { - "text": "Reports non-'Serializable' classes that define a 'serialVersionUID' field. A 'serialVersionUID' field in that context normally indicates an error because the field will be ignored and the class will not be serialized. Example: 'public class IWantToSerializeThis {\n private static final long serialVersionUID = 2669293150219020249L;\n }'", - "markdown": "Reports non-`Serializable` classes that define a `serialVersionUID` field. A `serialVersionUID` field in that context normally indicates an error because the field will be ignored and the class will not be serialized.\n\n**Example:**\n\n\n public class IWantToSerializeThis {\n private static final long serialVersionUID = 2669293150219020249L;\n }\n" + "text": "Reports attempts to synchronize on an instance of a value-based class that produce compile-time warnings and raise run-time exceptions starting from Java 16. For example, 'java.lang.Double' is annotated with 'jdk.internal.ValueBased', so the following code will produce a compile-time warning: 'Double d = 20.0;\nsynchronized (d) { ... } // javac warning' New in 2021.1", + "markdown": "Reports attempts to synchronize on an instance of a value-based class that produce compile-time warnings and raise run-time exceptions starting from Java 16.\n\n\nFor example, `java.lang.Double` is annotated with `jdk.internal.ValueBased`, so the following code will\nproduce a compile-time warning:\n\n\n Double d = 20.0;\n synchronized (d) { ... } // javac warning\n\nNew in 2021.1" }, "defaultConfiguration": { "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "NonSerializableClassWithSerialVersionUID", + "suppressToolId": "synchronization", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -36970,8 +36970,8 @@ "relationships": [ { "target": { - "id": "Java/Serialization issues", - "index": 20, + "id": "Java/Compiler issues", + "index": 162, "toolComponent": { "name": "QDJVM" } @@ -36983,19 +36983,19 @@ ] }, { - "id": "SynchronizeOnValueBasedClass", + "id": "NonSerializableWithSerialVersionUIDField", "shortDescription": { - "text": "Value-based warnings" + "text": "Non-serializable class with 'serialVersionUID'" }, "fullDescription": { - "text": "Reports attempts to synchronize on an instance of a value-based class that produce compile-time warnings and raise run-time exceptions starting from Java 16. For example, 'java.lang.Double' is annotated with 'jdk.internal.ValueBased', so the following code will produce a compile-time warning: 'Double d = 20.0;\nsynchronized (d) { ... } // javac warning' New in 2021.1", - "markdown": "Reports attempts to synchronize on an instance of a value-based class that produce compile-time warnings and raise run-time exceptions starting from Java 16.\n\n\nFor example, `java.lang.Double` is annotated with `jdk.internal.ValueBased`, so the following code will\nproduce a compile-time warning:\n\n\n Double d = 20.0;\n synchronized (d) { ... } // javac warning\n\nNew in 2021.1" + "text": "Reports non-'Serializable' classes that define a 'serialVersionUID' field. A 'serialVersionUID' field in that context normally indicates an error because the field will be ignored and the class will not be serialized. Example: 'public class IWantToSerializeThis {\n private static final long serialVersionUID = 2669293150219020249L;\n }'", + "markdown": "Reports non-`Serializable` classes that define a `serialVersionUID` field. A `serialVersionUID` field in that context normally indicates an error because the field will be ignored and the class will not be serialized.\n\n**Example:**\n\n\n public class IWantToSerializeThis {\n private static final long serialVersionUID = 2669293150219020249L;\n }\n" }, "defaultConfiguration": { "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "synchronization", + "suppressToolId": "NonSerializableClassWithSerialVersionUID", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -37003,8 +37003,8 @@ "relationships": [ { "target": { - "id": "Java/Compiler issues", - "index": 162, + "id": "Java/Serialization issues", + "index": 20, "toolComponent": { "name": "QDJVM" } @@ -37037,7 +37037,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -37235,7 +37235,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -37619,19 +37619,19 @@ ] }, { - "id": "PrimitiveArrayArgumentToVariableArgMethod", + "id": "StringTokenizer", "shortDescription": { - "text": "Confusing primitive array argument to varargs method" + "text": "Use of 'StringTokenizer'" }, "fullDescription": { - "text": "Reports any calls to a variable arity method where the call has a primitive array in the variable arity parameter position (for example, 'System.out.printf(\"%s\", new int[]{1, 2, 3})'). Such a primitive-array argument may be confusing, as it will be wrapped as a single-element array, rather than each individual element being boxed, as might be expected. Example: 'String.format(\"%s\", new int[]{1, 2, 3});' After the quick-fix is applied: 'String.format(\"%s\", (Object) new int[]{1, 2, 3});' This inspection depends on the Java feature 'Variable arity methods', which is available since Java 5.", - "markdown": "Reports any calls to a variable arity method where the call has a primitive array in the variable arity parameter position (for example, `System.out.printf(\"%s\", new int[]{1, 2, 3})`). Such a primitive-array argument may be confusing, as it will be wrapped as a single-element array, rather than each individual element being boxed, as might be expected.\n\n**Example:**\n\n\n String.format(\"%s\", new int[]{1, 2, 3});\n\nAfter the quick-fix is applied:\n\n\n String.format(\"%s\", (Object) new int[]{1, 2, 3});\n\nThis inspection depends on the Java feature 'Variable arity methods', which is available since Java 5." + "text": "Reports usages of the 'StringTokenizer' class. Excessive use of 'StringTokenizer' is incorrect in an internationalized environment.", + "markdown": "Reports usages of the `StringTokenizer` class. Excessive use of `StringTokenizer` is incorrect in an internationalized environment." }, "defaultConfiguration": { - "enabled": true, + "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "PrimitiveArrayArgumentToVarargsMethod", + "suppressToolId": "UseOfStringTokenizer", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -37639,8 +37639,8 @@ "relationships": [ { "target": { - "id": "Java/Probable bugs", - "index": 15, + "id": "Java/Internationalization", + "index": 6, "toolComponent": { "name": "QDJVM" } @@ -37685,19 +37685,19 @@ ] }, { - "id": "StringTokenizer", + "id": "PrimitiveArrayArgumentToVariableArgMethod", "shortDescription": { - "text": "Use of 'StringTokenizer'" + "text": "Confusing primitive array argument to varargs method" }, "fullDescription": { - "text": "Reports usages of the 'StringTokenizer' class. Excessive use of 'StringTokenizer' is incorrect in an internationalized environment.", - "markdown": "Reports usages of the `StringTokenizer` class. Excessive use of `StringTokenizer` is incorrect in an internationalized environment." + "text": "Reports any calls to a variable arity method where the call has a primitive array in the variable arity parameter position (for example, 'System.out.printf(\"%s\", new int[]{1, 2, 3})'). Such a primitive-array argument may be confusing, as it will be wrapped as a single-element array, rather than each individual element being boxed, as might be expected. Example: 'String.format(\"%s\", new int[]{1, 2, 3});' After the quick-fix is applied: 'String.format(\"%s\", (Object) new int[]{1, 2, 3});' This inspection depends on the Java feature 'Variable arity methods', which is available since Java 5.", + "markdown": "Reports any calls to a variable arity method where the call has a primitive array in the variable arity parameter position (for example, `System.out.printf(\"%s\", new int[]{1, 2, 3})`). Such a primitive-array argument may be confusing, as it will be wrapped as a single-element array, rather than each individual element being boxed, as might be expected.\n\n**Example:**\n\n\n String.format(\"%s\", new int[]{1, 2, 3});\n\nAfter the quick-fix is applied:\n\n\n String.format(\"%s\", (Object) new int[]{1, 2, 3});\n\nThis inspection depends on the Java feature 'Variable arity methods', which is available since Java 5." }, "defaultConfiguration": { - "enabled": false, + "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "UseOfStringTokenizer", + "suppressToolId": "PrimitiveArrayArgumentToVarargsMethod", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -37705,8 +37705,8 @@ "relationships": [ { "target": { - "id": "Java/Internationalization", - "index": 6, + "id": "Java/Probable bugs", + "index": 15, "toolComponent": { "name": "QDJVM" } @@ -37750,39 +37750,6 @@ } ] }, - { - "id": "AccessToNonThreadSafeStaticFieldFromInstance", - "shortDescription": { - "text": "Non-thread-safe 'static' field access" - }, - "fullDescription": { - "text": "Reports access to 'static' fields that are of a non-thread-safe type. When a 'static' field is accessed from an instance method or a non-synchronized block, multiple threads can access that field. This can lead to unspecified side effects, like exceptions and incorrect results. Example: 'class Sample {\n private static final SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n String method() {\n return df.format(\"\");\n }\n }' You can specify which types should be considered not thread-safe. Only fields with these exact types or initialized with these exact types are reported, because there may exist thread-safe subclasses of these types.", - "markdown": "Reports access to `static` fields that are of a non-thread-safe type.\n\n\nWhen a `static` field is accessed from an instance method or a non-synchronized block,\nmultiple threads can access that field.\nThis can lead to unspecified side effects, like exceptions and incorrect results.\n\n**Example:**\n\n\n class Sample {\n private static final SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n String method() {\n return df.format(\"\");\n }\n }\n\n\nYou can specify which types should be considered not thread-safe.\nOnly fields with these exact types or initialized with these exact types are reported,\nbecause there may exist thread-safe subclasses of these types." - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "AccessToNonThreadSafeStaticField", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Java/Threading issues", - "index": 29, - "toolComponent": { - "name": "QDJVM" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, { "id": "BigDecimalEquals", "shortDescription": { @@ -37805,7 +37772,40 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, + "toolComponent": { + "name": "QDJVM" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AccessToNonThreadSafeStaticFieldFromInstance", + "shortDescription": { + "text": "Non-thread-safe 'static' field access" + }, + "fullDescription": { + "text": "Reports access to 'static' fields that are of a non-thread-safe type. When a 'static' field is accessed from an instance method or a non-synchronized block, multiple threads can access that field. This can lead to unspecified side effects, like exceptions and incorrect results. Example: 'class Sample {\n private static final SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n String method() {\n return df.format(\"\");\n }\n }' You can specify which types should be considered not thread-safe. Only fields with these exact types or initialized with these exact types are reported, because there may exist thread-safe subclasses of these types.", + "markdown": "Reports access to `static` fields that are of a non-thread-safe type.\n\n\nWhen a `static` field is accessed from an instance method or a non-synchronized block,\nmultiple threads can access that field.\nThis can lead to unspecified side effects, like exceptions and incorrect results.\n\n**Example:**\n\n\n class Sample {\n private static final SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n String method() {\n return df.format(\"\");\n }\n }\n\n\nYou can specify which types should be considered not thread-safe.\nOnly fields with these exact types or initialized with these exact types are reported,\nbecause there may exist thread-safe subclasses of these types." + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "AccessToNonThreadSafeStaticField", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Java/Threading issues", + "index": 29, "toolComponent": { "name": "QDJVM" } @@ -37904,7 +37904,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -38036,7 +38036,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -38543,19 +38543,19 @@ ] }, { - "id": "ThreadWithDefaultRunMethod", + "id": "ThreeNegationsPerMethod", "shortDescription": { - "text": "Instantiating a 'Thread' with default 'run()' method" + "text": "Method with more than three negations" }, "fullDescription": { - "text": "Reports instantiations of 'Thread' or an inheritor without specifying a 'Runnable' parameter or overriding the 'run()' method. Such threads do nothing useful. Example: 'new Thread().start();'", - "markdown": "Reports instantiations of `Thread` or an inheritor without specifying a `Runnable` parameter or overriding the `run()` method. Such threads do nothing useful.\n\n**Example:**\n\n\n new Thread().start();\n" + "text": "Reports methods with three or more negations. Such methods may be confusing. Example: 'void doSmth(int a, int b, boolean flag1, boolean flag2) {\n if (!flag && !flag2) {\n if (a != b) {\n doOther();\n }\n }\n }' Without negations, the method becomes easier to understand: 'void doSmth(int a, int b, boolean flag1, boolean flag2) {\n if (flag1 || flag2 || a == b) return;\n doOther();\n }' Configure the inspection: Use the Ignore negations in 'equals()' methods option to disable the inspection within 'equals()' methods. Use the Ignore negations in 'assert' statements to disable the inspection within 'assert' statements.", + "markdown": "Reports methods with three or more negations. Such methods may be confusing.\n\n**Example:**\n\n\n void doSmth(int a, int b, boolean flag1, boolean flag2) {\n if (!flag && !flag2) {\n if (a != b) {\n doOther();\n }\n }\n }\n\nWithout negations, the method becomes easier to understand:\n\n\n void doSmth(int a, int b, boolean flag1, boolean flag2) {\n if (flag1 || flag2 || a == b) return;\n doOther();\n }\n\nConfigure the inspection:\n\n* Use the **Ignore negations in 'equals()' methods** option to disable the inspection within `equals()` methods.\n* Use the **Ignore negations in 'assert' statements** to disable the inspection within `assert` statements." }, "defaultConfiguration": { - "enabled": true, + "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "InstantiatingAThreadWithDefaultRunMethod", + "suppressToolId": "MethodWithMoreThanThreeNegations", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -38563,8 +38563,8 @@ "relationships": [ { "target": { - "id": "Java/Threading issues", - "index": 29, + "id": "Java/Method metrics", + "index": 135, "toolComponent": { "name": "QDJVM" } @@ -38576,19 +38576,19 @@ ] }, { - "id": "ThreeNegationsPerMethod", + "id": "ThreadWithDefaultRunMethod", "shortDescription": { - "text": "Method with more than three negations" + "text": "Instantiating a 'Thread' with default 'run()' method" }, "fullDescription": { - "text": "Reports methods with three or more negations. Such methods may be confusing. Example: 'void doSmth(int a, int b, boolean flag1, boolean flag2) {\n if (!flag && !flag2) {\n if (a != b) {\n doOther();\n }\n }\n }' Without negations, the method becomes easier to understand: 'void doSmth(int a, int b, boolean flag1, boolean flag2) {\n if (flag1 || flag2 || a == b) return;\n doOther();\n }' Configure the inspection: Use the Ignore negations in 'equals()' methods option to disable the inspection within 'equals()' methods. Use the Ignore negations in 'assert' statements to disable the inspection within 'assert' statements.", - "markdown": "Reports methods with three or more negations. Such methods may be confusing.\n\n**Example:**\n\n\n void doSmth(int a, int b, boolean flag1, boolean flag2) {\n if (!flag && !flag2) {\n if (a != b) {\n doOther();\n }\n }\n }\n\nWithout negations, the method becomes easier to understand:\n\n\n void doSmth(int a, int b, boolean flag1, boolean flag2) {\n if (flag1 || flag2 || a == b) return;\n doOther();\n }\n\nConfigure the inspection:\n\n* Use the **Ignore negations in 'equals()' methods** option to disable the inspection within `equals()` methods.\n* Use the **Ignore negations in 'assert' statements** to disable the inspection within `assert` statements." + "text": "Reports instantiations of 'Thread' or an inheritor without specifying a 'Runnable' parameter or overriding the 'run()' method. Such threads do nothing useful. Example: 'new Thread().start();'", + "markdown": "Reports instantiations of `Thread` or an inheritor without specifying a `Runnable` parameter or overriding the `run()` method. Such threads do nothing useful.\n\n**Example:**\n\n\n new Thread().start();\n" }, "defaultConfiguration": { - "enabled": false, + "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "MethodWithMoreThanThreeNegations", + "suppressToolId": "InstantiatingAThreadWithDefaultRunMethod", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -38596,8 +38596,8 @@ "relationships": [ { "target": { - "id": "Java/Method metrics", - "index": 135, + "id": "Java/Threading issues", + "index": 29, "toolComponent": { "name": "QDJVM" } @@ -38963,7 +38963,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -39433,7 +39433,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -39445,28 +39445,28 @@ ] }, { - "id": "SequencedCollectionMethodCanBeUsed", + "id": "PublicField", "shortDescription": { - "text": "SequencedCollection method can be used" + "text": "'public' field" }, "fullDescription": { - "text": "Reports collection API method calls that can be simplified using 'SequencedCollection' methods. The following conversions are supported: 'list.add(0, element)' → 'list.addFirst(element);' 'list.get(0)' → 'list.getFirst();' 'list.get(list.size() - 1)' → 'list.getLast();' 'list.remove(0)' → 'list.removeFirst();' 'list.remove(list.size() - 1)' → 'list.removeLast();' 'collection.iterator().next()' → 'collection.getFirst();' This inspection depends on the Java feature 'Sequenced Collections', which is available since Java 21. New in 2023.3", - "markdown": "Reports collection API method calls that can be simplified using `SequencedCollection` methods.\n\nThe following conversions are supported:\n\n* `list.add(0, element)` → `list.addFirst(element);`\n* `list.get(0)` → `list.getFirst();`\n* `list.get(list.size() - 1)` → `list.getLast();`\n* `list.remove(0)` → `list.removeFirst();`\n* `list.remove(list.size() - 1)` → `list.removeLast();`\n* `collection.iterator().next()` → `collection.getFirst();`\n\nThis inspection depends on the Java feature 'Sequenced Collections', which is available since Java 21.\n\nNew in 2023.3" + "text": "Reports 'public' fields. Constants (fields marked with 'static' and 'final') are not reported. Example: 'class Main {\n public String name;\n }' After the quick-fix is applied: 'class Main {\n private String name;\n\n public String getName() {\n return name;\n }\n\n public void setName(String name) {\n this.name = name;\n }\n }' Configure the inspection: Use the Ignore If Annotated By list to specify annotations to ignore. The inspection will ignore fields with any of these annotations. Use the Ignore 'public final' fields of an enum option to ignore 'public final' fields of the 'enum' type.", + "markdown": "Reports `public` fields. Constants (fields marked with `static` and `final`) are not reported.\n\n**Example:**\n\n\n class Main {\n public String name;\n }\n\nAfter the quick-fix is applied:\n\n\n class Main {\n private String name;\n\n public String getName() {\n return name;\n }\n\n public void setName(String name) {\n this.name = name;\n }\n }\n\nConfigure the inspection:\n\n* Use the **Ignore If Annotated By** list to specify annotations to ignore. The inspection will ignore fields with any of these annotations.\n* Use the **Ignore 'public final' fields of an enum** option to ignore `public final` fields of the `enum` type." }, "defaultConfiguration": { "enabled": false, - "level": "warning", + "level": "note", "parameters": { - "suppressToolId": "SequencedCollectionMethodCanBeUsed", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "PublicField", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" } }, "relationships": [ { "target": { - "id": "Java/Java language level migration aids/Java 21", - "index": 195, + "id": "Java/Encapsulation", + "index": 128, "toolComponent": { "name": "QDJVM" } @@ -39478,28 +39478,28 @@ ] }, { - "id": "PublicField", + "id": "SequencedCollectionMethodCanBeUsed", "shortDescription": { - "text": "'public' field" + "text": "SequencedCollection method can be used" }, "fullDescription": { - "text": "Reports 'public' fields. Constants (fields marked with 'static' and 'final') are not reported. Example: 'class Main {\n public String name;\n }' After the quick-fix is applied: 'class Main {\n private String name;\n\n public String getName() {\n return name;\n }\n\n public void setName(String name) {\n this.name = name;\n }\n }' Configure the inspection: Use the Ignore If Annotated By list to specify annotations to ignore. The inspection will ignore fields with any of these annotations. Use the Ignore 'public final' fields of an enum option to ignore 'public final' fields of the 'enum' type.", - "markdown": "Reports `public` fields. Constants (fields marked with `static` and `final`) are not reported.\n\n**Example:**\n\n\n class Main {\n public String name;\n }\n\nAfter the quick-fix is applied:\n\n\n class Main {\n private String name;\n\n public String getName() {\n return name;\n }\n\n public void setName(String name) {\n this.name = name;\n }\n }\n\nConfigure the inspection:\n\n* Use the **Ignore If Annotated By** list to specify annotations to ignore. The inspection will ignore fields with any of these annotations.\n* Use the **Ignore 'public final' fields of an enum** option to ignore `public final` fields of the `enum` type." + "text": "Reports collection API method calls that can be simplified using 'SequencedCollection' methods. The following conversions are supported: 'list.add(0, element)' → 'list.addFirst(element);' 'list.get(0)' → 'list.getFirst();' 'list.get(list.size() - 1)' → 'list.getLast();' 'list.remove(0)' → 'list.removeFirst();' 'list.remove(list.size() - 1)' → 'list.removeLast();' 'collection.iterator().next()' → 'collection.getFirst();' This inspection depends on the Java feature 'Sequenced Collections', which is available since Java 21. New in 2023.3", + "markdown": "Reports collection API method calls that can be simplified using `SequencedCollection` methods.\n\nThe following conversions are supported:\n\n* `list.add(0, element)` → `list.addFirst(element);`\n* `list.get(0)` → `list.getFirst();`\n* `list.get(list.size() - 1)` → `list.getLast();`\n* `list.remove(0)` → `list.removeFirst();`\n* `list.remove(list.size() - 1)` → `list.removeLast();`\n* `collection.iterator().next()` → `collection.getFirst();`\n\nThis inspection depends on the Java feature 'Sequenced Collections', which is available since Java 21.\n\nNew in 2023.3" }, "defaultConfiguration": { "enabled": false, - "level": "note", + "level": "warning", "parameters": { - "suppressToolId": "PublicField", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" + "suppressToolId": "SequencedCollectionMethodCanBeUsed", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { - "id": "Java/Encapsulation", - "index": 128, + "id": "Java/Java language level migration aids/Java 21", + "index": 195, "toolComponent": { "name": "QDJVM" } @@ -39997,7 +39997,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -40665,7 +40665,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -40698,7 +40698,7 @@ { "target": { "id": "Java/Numeric issues", - "index": 30, + "index": 31, "toolComponent": { "name": "QDJVM" } @@ -40776,28 +40776,28 @@ ] }, { - "id": "FinalMethodInFinalClass", + "id": "UnnecessaryBlockStatement", "shortDescription": { - "text": "'final' method in 'final' class" + "text": "Unnecessary code block" }, "fullDescription": { - "text": "Reports 'final' methods in 'final' classes. Since 'final' classes cannot be inherited, marking a method as 'final' may be unnecessary and confusing. Example: 'record Bar(int a, int b) {\n public final int sum() { \n return a + b;\n }\n}'\n After the quick-fix is applied: 'record Bar(int a, int b) {\n public int sum() { \n return a + b;\n }\n}' As shown in the example, a class can be marked as 'final' explicitly or implicitly.", - "markdown": "Reports `final` methods in `final` classes.\n\nSince `final` classes cannot be inherited, marking a method as `final`\nmay be unnecessary and confusing.\n\n**Example:**\n\n record Bar(int a, int b) {\n public final int sum() { \n return a + b;\n }\n }\n\nAfter the quick-fix is applied:\n\n record Bar(int a, int b) {\n public int sum() { \n return a + b;\n }\n }\n\nAs shown in the example, a class can be marked as `final` explicitly or implicitly." + "text": "Reports code blocks that are redundant to the semantics of the program and can be replaced with their contents. The code blocks that are the bodies of 'if', 'do', 'while', or 'for' statements will not be reported by this inspection. Example: 'void foo() {\n { // unnecessary\n int result = call();\n analyze(result);\n } // unnecessary\n }' Configure the inspection: Use the Ignore branches of 'switch' statements option to ignore the code blocks that are used as branches of switch statements.", + "markdown": "Reports code blocks that are redundant to the semantics of the program and can be replaced with their contents.\n\nThe code blocks that are the bodies of `if`, `do`,\n`while`, or `for` statements will not be reported by this\ninspection.\n\nExample:\n\n\n void foo() {\n { // unnecessary\n int result = call();\n analyze(result);\n } // unnecessary\n }\n\nConfigure the inspection:\n\n\nUse the **Ignore branches of 'switch' statements** option to ignore the code blocks that are used as branches of switch statements." }, "defaultConfiguration": { "enabled": false, - "level": "warning", + "level": "note", "parameters": { - "suppressToolId": "FinalMethodInFinalClass", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "UnnecessaryCodeBlock", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" } }, "relationships": [ { "target": { - "id": "Java/Declaration redundancy", - "index": 13, + "id": "Java/Code style issues", + "index": 11, "toolComponent": { "name": "QDJVM" } @@ -40809,28 +40809,28 @@ ] }, { - "id": "UnnecessaryBlockStatement", + "id": "FinalMethodInFinalClass", "shortDescription": { - "text": "Unnecessary code block" + "text": "'final' method in 'final' class" }, "fullDescription": { - "text": "Reports code blocks that are redundant to the semantics of the program and can be replaced with their contents. The code blocks that are the bodies of 'if', 'do', 'while', or 'for' statements will not be reported by this inspection. Example: 'void foo() {\n { // unnecessary\n int result = call();\n analyze(result);\n } // unnecessary\n }' Configure the inspection: Use the Ignore branches of 'switch' statements option to ignore the code blocks that are used as branches of switch statements.", - "markdown": "Reports code blocks that are redundant to the semantics of the program and can be replaced with their contents.\n\nThe code blocks that are the bodies of `if`, `do`,\n`while`, or `for` statements will not be reported by this\ninspection.\n\nExample:\n\n\n void foo() {\n { // unnecessary\n int result = call();\n analyze(result);\n } // unnecessary\n }\n\nConfigure the inspection:\n\n\nUse the **Ignore branches of 'switch' statements** option to ignore the code blocks that are used as branches of switch statements." + "text": "Reports 'final' methods in 'final' classes. Since 'final' classes cannot be inherited, marking a method as 'final' may be unnecessary and confusing. Example: 'record Bar(int a, int b) {\n public final int sum() { \n return a + b;\n }\n}'\n After the quick-fix is applied: 'record Bar(int a, int b) {\n public int sum() { \n return a + b;\n }\n}' As shown in the example, a class can be marked as 'final' explicitly or implicitly.", + "markdown": "Reports `final` methods in `final` classes.\n\nSince `final` classes cannot be inherited, marking a method as `final`\nmay be unnecessary and confusing.\n\n**Example:**\n\n record Bar(int a, int b) {\n public final int sum() { \n return a + b;\n }\n }\n\nAfter the quick-fix is applied:\n\n record Bar(int a, int b) {\n public int sum() { \n return a + b;\n }\n }\n\nAs shown in the example, a class can be marked as `final` explicitly or implicitly." }, "defaultConfiguration": { "enabled": false, - "level": "note", + "level": "warning", "parameters": { - "suppressToolId": "UnnecessaryCodeBlock", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" + "suppressToolId": "FinalMethodInFinalClass", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { - "id": "Java/Code style issues", - "index": 11, + "id": "Java/Declaration redundancy", + "index": 13, "toolComponent": { "name": "QDJVM" } @@ -40995,7 +40995,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -41007,19 +41007,19 @@ ] }, { - "id": "EqualsAndHashcode", + "id": "IteratorHasNextCallsIteratorNext", "shortDescription": { - "text": "'equals()' and 'hashCode()' not paired" + "text": "'Iterator.hasNext()' which calls 'next()'" }, "fullDescription": { - "text": "Reports classes that override the 'equals()' method but do not override the 'hashCode()' method or vice versa, which can potentially lead to problems when the class is added to a 'Collection' or a 'HashMap'. The quick-fix generates the default implementation for an absent method. Example: 'class StringHolder {\n String s;\n\n @Override public int hashCode() {\n return s != null ? s.hashCode() : 0;\n }\n}' After the quick-fix is applied: 'class StringHolder {\n String s;\n\n @Override public int hashCode() {\n return s != null ? s.hashCode() : 0;\n }\n\n @Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof StringHolder)) return false;\n\n StringHolder holder = (StringHolder)o;\n\n if (s != null ? !s.equals(holder.s) : holder.s != null) return false;\n\n return true;\n }\n}'", - "markdown": "Reports classes that override the `equals()` method but do not override the `hashCode()` method or vice versa, which can potentially lead to problems when the class is added to a `Collection` or a `HashMap`.\n\nThe quick-fix generates the default implementation for an absent method.\n\nExample:\n\n\n class StringHolder {\n String s;\n\n @Override public int hashCode() {\n return s != null ? s.hashCode() : 0;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class StringHolder {\n String s;\n\n @Override public int hashCode() {\n return s != null ? s.hashCode() : 0;\n }\n\n @Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof StringHolder)) return false;\n\n StringHolder holder = (StringHolder)o;\n\n if (s != null ? !s.equals(holder.s) : holder.s != null) return false;\n\n return true;\n }\n }\n" + "text": "Reports implementations of 'Iterator.hasNext()' or 'ListIterator.hasPrevious()' that call 'Iterator.next()' or 'ListIterator.previous()' on the iterator instance. Such calls are almost certainly an error, as methods like 'hasNext()' should not modify the iterators state, while 'next()' should. Example: 'class MyIterator implements Iterator {\n public boolean hasNext() {\n return next() != null;\n }\n }'", + "markdown": "Reports implementations of `Iterator.hasNext()` or `ListIterator.hasPrevious()` that call `Iterator.next()` or `ListIterator.previous()` on the iterator instance. Such calls are almost certainly an error, as methods like `hasNext()` should not modify the iterators state, while `next()` should.\n\n**Example:**\n\n\n class MyIterator implements Iterator {\n public boolean hasNext() {\n return next() != null;\n }\n }\n" }, "defaultConfiguration": { - "enabled": false, + "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "EqualsAndHashcode", + "suppressToolId": "IteratorHasNextCallsIteratorNext", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -41040,19 +41040,19 @@ ] }, { - "id": "IteratorHasNextCallsIteratorNext", + "id": "EqualsAndHashcode", "shortDescription": { - "text": "'Iterator.hasNext()' which calls 'next()'" + "text": "'equals()' and 'hashCode()' not paired" }, "fullDescription": { - "text": "Reports implementations of 'Iterator.hasNext()' or 'ListIterator.hasPrevious()' that call 'Iterator.next()' or 'ListIterator.previous()' on the iterator instance. Such calls are almost certainly an error, as methods like 'hasNext()' should not modify the iterators state, while 'next()' should. Example: 'class MyIterator implements Iterator {\n public boolean hasNext() {\n return next() != null;\n }\n }'", - "markdown": "Reports implementations of `Iterator.hasNext()` or `ListIterator.hasPrevious()` that call `Iterator.next()` or `ListIterator.previous()` on the iterator instance. Such calls are almost certainly an error, as methods like `hasNext()` should not modify the iterators state, while `next()` should.\n\n**Example:**\n\n\n class MyIterator implements Iterator {\n public boolean hasNext() {\n return next() != null;\n }\n }\n" + "text": "Reports classes that override the 'equals()' method but do not override the 'hashCode()' method or vice versa, which can potentially lead to problems when the class is added to a 'Collection' or a 'HashMap'. The quick-fix generates the default implementation for an absent method. Example: 'class StringHolder {\n String s;\n\n @Override public int hashCode() {\n return s != null ? s.hashCode() : 0;\n }\n}' After the quick-fix is applied: 'class StringHolder {\n String s;\n\n @Override public int hashCode() {\n return s != null ? s.hashCode() : 0;\n }\n\n @Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof StringHolder)) return false;\n\n StringHolder holder = (StringHolder)o;\n\n if (s != null ? !s.equals(holder.s) : holder.s != null) return false;\n\n return true;\n }\n}'", + "markdown": "Reports classes that override the `equals()` method but do not override the `hashCode()` method or vice versa, which can potentially lead to problems when the class is added to a `Collection` or a `HashMap`.\n\nThe quick-fix generates the default implementation for an absent method.\n\nExample:\n\n\n class StringHolder {\n String s;\n\n @Override public int hashCode() {\n return s != null ? s.hashCode() : 0;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class StringHolder {\n String s;\n\n @Override public int hashCode() {\n return s != null ? s.hashCode() : 0;\n }\n\n @Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof StringHolder)) return false;\n\n StringHolder holder = (StringHolder)o;\n\n if (s != null ? !s.equals(holder.s) : holder.s != null) return false;\n\n return true;\n }\n }\n" }, "defaultConfiguration": { - "enabled": true, + "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "IteratorHasNextCallsIteratorNext", + "suppressToolId": "EqualsAndHashcode", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -41196,7 +41196,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -41427,73 +41427,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, - "toolComponent": { - "name": "QDJVM" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "MethodWithMultipleLoops", - "shortDescription": { - "text": "Method with multiple loops" - }, - "fullDescription": { - "text": "Reports methods that contain more than one loop statement. Example: The method below will be reported because it contains two loops: 'void methodWithTwoLoops(int n1, int n2) {\n for (int i = 0; i < n1; i++) {\n System.out.println(i);\n }\n\n int j = 0;\n while (j < n2) {\n System.out.println(j);\n j++;\n }\n }' The following method will also be reported because it contains a nested loop: 'void methodWithNestedLoop(int n1, int n2) {\n for (int i = 0; i < n1; i++) {\n for (int j = 0; j < n2; j++) {\n System.out.println(i + j);\n }\n }\n }'", - "markdown": "Reports methods that contain more than one loop statement.\n\n**Example:**\n\nThe method below will be reported because it contains two loops:\n\n\n void methodWithTwoLoops(int n1, int n2) {\n for (int i = 0; i < n1; i++) {\n System.out.println(i);\n }\n\n int j = 0;\n while (j < n2) {\n System.out.println(j);\n j++;\n }\n }\n\nThe following method will also be reported because it contains a nested loop:\n\n\n void methodWithNestedLoop(int n1, int n2) {\n for (int i = 0; i < n1; i++) {\n for (int j = 0; j < n2; j++) {\n System.out.println(i + j);\n }\n }\n }\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "MethodWithMultipleLoops", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Java/Method metrics", - "index": 135, - "toolComponent": { - "name": "QDJVM" - } - }, - "kinds": [ - "superset" - ] - } - ] - }, - { - "id": "NegativelyNamedBooleanVariable", - "shortDescription": { - "text": "Negatively named boolean variable" - }, - "fullDescription": { - "text": "Reports negatively named variables, for example: 'disabled', 'hidden', or 'isNotChanged'. Usually, inverting the 'boolean' value and removing the negation from the name makes the code easier to understand. Example: 'boolean disabled = false;'", - "markdown": "Reports negatively named variables, for example: `disabled`, `hidden`, or `isNotChanged`.\n\nUsually, inverting the `boolean` value and removing the negation from the name makes the code easier to understand.\n\nExample:\n\n\n boolean disabled = false;\n" - }, - "defaultConfiguration": { - "enabled": false, - "level": "warning", - "parameters": { - "suppressToolId": "NegativelyNamedBooleanVariable", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" - } - }, - "relationships": [ - { - "target": { - "id": "Java/Data flow", - "index": 65, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -41540,6 +41474,72 @@ } ] }, + { + "id": "NegativelyNamedBooleanVariable", + "shortDescription": { + "text": "Negatively named boolean variable" + }, + "fullDescription": { + "text": "Reports negatively named variables, for example: 'disabled', 'hidden', or 'isNotChanged'. Usually, inverting the 'boolean' value and removing the negation from the name makes the code easier to understand. Example: 'boolean disabled = false;'", + "markdown": "Reports negatively named variables, for example: `disabled`, `hidden`, or `isNotChanged`.\n\nUsually, inverting the `boolean` value and removing the negation from the name makes the code easier to understand.\n\nExample:\n\n\n boolean disabled = false;\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NegativelyNamedBooleanVariable", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Java/Data flow", + "index": 65, + "toolComponent": { + "name": "QDJVM" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MethodWithMultipleLoops", + "shortDescription": { + "text": "Method with multiple loops" + }, + "fullDescription": { + "text": "Reports methods that contain more than one loop statement. Example: The method below will be reported because it contains two loops: 'void methodWithTwoLoops(int n1, int n2) {\n for (int i = 0; i < n1; i++) {\n System.out.println(i);\n }\n\n int j = 0;\n while (j < n2) {\n System.out.println(j);\n j++;\n }\n }' The following method will also be reported because it contains a nested loop: 'void methodWithNestedLoop(int n1, int n2) {\n for (int i = 0; i < n1; i++) {\n for (int j = 0; j < n2; j++) {\n System.out.println(i + j);\n }\n }\n }'", + "markdown": "Reports methods that contain more than one loop statement.\n\n**Example:**\n\nThe method below will be reported because it contains two loops:\n\n\n void methodWithTwoLoops(int n1, int n2) {\n for (int i = 0; i < n1; i++) {\n System.out.println(i);\n }\n\n int j = 0;\n while (j < n2) {\n System.out.println(j);\n j++;\n }\n }\n\nThe following method will also be reported because it contains a nested loop:\n\n\n void methodWithNestedLoop(int n1, int n2) {\n for (int i = 0; i < n1; i++) {\n for (int j = 0; j < n2; j++) {\n System.out.println(i + j);\n }\n }\n }\n" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MethodWithMultipleLoops", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" + } + }, + "relationships": [ + { + "target": { + "id": "Java/Method metrics", + "index": 135, + "toolComponent": { + "name": "QDJVM" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, { "id": "SleepWhileHoldingLock", "shortDescription": { @@ -41859,7 +41859,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -41937,22 +41937,19 @@ ] }, { - "id": "NullArgumentToVariableArgMethod", + "id": "ModuleWithTooFewClasses", "shortDescription": { - "text": "Confusing argument to varargs method" + "text": "Module with too few classes" }, "fullDescription": { - "text": "Reports calls to variable arity methods that have a single argument in the vararg parameter position, which is either a 'null' or an array of a subtype of the vararg parameter. Such an argument may be confusing as it is unclear if a varargs or non-varargs call is desired. Example: 'String[] ss = new String[]{\"foo\", \"bar\"};\n System.out.printf(\"%s\", ss);' In this example only the first element of the array will be printed, not the entire array. This inspection depends on the Java feature 'Variable arity methods', which is available since Java 5.", - "markdown": "Reports calls to variable arity methods that have a single argument in the vararg parameter position, which is either a `null` or an array of a subtype of the vararg parameter. Such an argument may be confusing as it is unclear if a varargs or non-varargs call is desired.\n\n**Example:**\n\n\n String[] ss = new String[]{\"foo\", \"bar\"};\n System.out.printf(\"%s\", ss);\n\nIn this example only the first element of the array will be printed, not the entire array.\n\nThis inspection depends on the Java feature 'Variable arity methods', which is available since Java 5." + "text": "Reports modules that contain too few classes. Overly small modules may indicate a too fragmented design. Java, Kotlin and Groovy classes are counted. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor. Use the Minimum number of classes field to specify the minimum number of classes a module may have.", + "markdown": "Reports modules that contain too few classes. Overly small modules may indicate a too fragmented design. Java, Kotlin and Groovy classes are counted.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor.\n\nUse the **Minimum number of classes** field to specify the minimum number of classes a module may have." }, "defaultConfiguration": { - "enabled": true, + "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "ConfusingArgumentToVarargsMethod", - "cweIds": [ - 628 - ], + "suppressToolId": "ModuleWithTooFewClasses", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -41960,8 +41957,8 @@ "relationships": [ { "target": { - "id": "Java/Probable bugs", - "index": 15, + "id": "Java/Modularization issues", + "index": 76, "toolComponent": { "name": "QDJVM" } @@ -41973,19 +41970,22 @@ ] }, { - "id": "ModuleWithTooFewClasses", + "id": "NullArgumentToVariableArgMethod", "shortDescription": { - "text": "Module with too few classes" + "text": "Confusing argument to varargs method" }, "fullDescription": { - "text": "Reports modules that contain too few classes. Overly small modules may indicate a too fragmented design. Java, Kotlin and Groovy classes are counted. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor. Use the Minimum number of classes field to specify the minimum number of classes a module may have.", - "markdown": "Reports modules that contain too few classes. Overly small modules may indicate a too fragmented design. Java, Kotlin and Groovy classes are counted.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor.\n\nUse the **Minimum number of classes** field to specify the minimum number of classes a module may have." + "text": "Reports calls to variable arity methods that have a single argument in the vararg parameter position, which is either a 'null' or an array of a subtype of the vararg parameter. Such an argument may be confusing as it is unclear if a varargs or non-varargs call is desired. Example: 'String[] ss = new String[]{\"foo\", \"bar\"};\n System.out.printf(\"%s\", ss);' In this example only the first element of the array will be printed, not the entire array. This inspection depends on the Java feature 'Variable arity methods', which is available since Java 5.", + "markdown": "Reports calls to variable arity methods that have a single argument in the vararg parameter position, which is either a `null` or an array of a subtype of the vararg parameter. Such an argument may be confusing as it is unclear if a varargs or non-varargs call is desired.\n\n**Example:**\n\n\n String[] ss = new String[]{\"foo\", \"bar\"};\n System.out.printf(\"%s\", ss);\n\nIn this example only the first element of the array will be printed, not the entire array.\n\nThis inspection depends on the Java feature 'Variable arity methods', which is available since Java 5." }, "defaultConfiguration": { - "enabled": false, + "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "ModuleWithTooFewClasses", + "suppressToolId": "ConfusingArgumentToVarargsMethod", + "cweIds": [ + 628 + ], "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -41993,8 +41993,8 @@ "relationships": [ { "target": { - "id": "Java/Modularization issues", - "index": 76, + "id": "Java/Probable bugs", + "index": 15, "toolComponent": { "name": "QDJVM" } @@ -42159,7 +42159,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -42237,19 +42237,19 @@ ] }, { - "id": "ReplaceNullCheck", + "id": "NoExplicitFinalizeCalls", "shortDescription": { - "text": "Null check can be replaced with method call" + "text": "'finalize()' called explicitly" }, "fullDescription": { - "text": "Reports 'null' checks that can be replaced with a call to a static method from 'Objects' or 'Stream'. Example: 'if (message == null) {\n application.messageStorage().save(new EmptyMessage());\n } else {\n application.messageStorage().save(message);\n }' After the quick-fix is applied: 'application.messageStorage()\n .save(Objects.requireNonNullElseGet(message, () -> new EmptyMessage()));' Use the Don't warn if the replacement is longer than the original option to ignore the cases when the replacement is longer than the original code. New in 2017.3", - "markdown": "Reports `null` checks that can be replaced with a call to a static method from `Objects` or `Stream`.\n\n**Example:**\n\n\n if (message == null) {\n application.messageStorage().save(new EmptyMessage());\n } else {\n application.messageStorage().save(message);\n }\n\nAfter the quick-fix is applied:\n\n\n application.messageStorage()\n .save(Objects.requireNonNullElseGet(message, () -> new EmptyMessage()));\n\n\nUse the **Don't warn if the replacement is longer than the original** option to ignore the cases when the replacement is longer than the\noriginal code.\n\nNew in 2017.3" + "text": "Reports calls to 'Object.finalize()'. Calling 'Object.finalize()' explicitly may result in objects being placed in an inconsistent state. The garbage collector automatically calls this method on an object when it determines that there are no references to this object. The inspection doesn't report calls to 'super.finalize()' from within implementations of 'finalize()' as they're benign. Example: 'MyObject m = new MyObject();\n m.finalize();\n System.gc()'", + "markdown": "Reports calls to `Object.finalize()`.\n\nCalling `Object.finalize()` explicitly may result in objects being placed in an\ninconsistent state.\nThe garbage collector automatically calls this method on an object when it determines that there are no references to this object.\n\nThe inspection doesn't report calls to `super.finalize()` from within implementations of `finalize()` as\nthey're benign.\n\n**Example:**\n\n\n MyObject m = new MyObject();\n m.finalize();\n System.gc()\n" }, "defaultConfiguration": { - "enabled": false, + "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "ReplaceNullCheck", + "suppressToolId": "FinalizeCalledExplicitly", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -42257,8 +42257,8 @@ "relationships": [ { "target": { - "id": "Java/Java language level migration aids/Java 9", - "index": 87, + "id": "Java/Finalization", + "index": 75, "toolComponent": { "name": "QDJVM" } @@ -42270,19 +42270,19 @@ ] }, { - "id": "NoExplicitFinalizeCalls", + "id": "StaticImport", "shortDescription": { - "text": "'finalize()' called explicitly" + "text": "Static import" }, "fullDescription": { - "text": "Reports calls to 'Object.finalize()'. Calling 'Object.finalize()' explicitly may result in objects being placed in an inconsistent state. The garbage collector automatically calls this method on an object when it determines that there are no references to this object. The inspection doesn't report calls to 'super.finalize()' from within implementations of 'finalize()' as they're benign. Example: 'MyObject m = new MyObject();\n m.finalize();\n System.gc()'", - "markdown": "Reports calls to `Object.finalize()`.\n\nCalling `Object.finalize()` explicitly may result in objects being placed in an\ninconsistent state.\nThe garbage collector automatically calls this method on an object when it determines that there are no references to this object.\n\nThe inspection doesn't report calls to `super.finalize()` from within implementations of `finalize()` as\nthey're benign.\n\n**Example:**\n\n\n MyObject m = new MyObject();\n m.finalize();\n System.gc()\n" + "text": "Reports 'import static' statements. Such 'import' statements are not supported under Java 1.4 or earlier JVMs. Configure the inspection: Use the table below to specify the classes that will be ignored by the inspection when used in an 'import static' statement. Use the Ignore single field static imports checkbox to ignore single-field 'import static' statements. Use the Ignore single method static imports checkbox to ignore single-method 'import static' statements.", + "markdown": "Reports `import static` statements.\n\nSuch `import` statements are not supported under Java 1.4 or earlier JVMs.\n\nConfigure the inspection:\n\n* Use the table below to specify the classes that will be ignored by the inspection when used in an `import static` statement.\n* Use the **Ignore single field static imports** checkbox to ignore single-field `import static` statements.\n* Use the **Ignore single method static imports** checkbox to ignore single-method `import static` statements." }, "defaultConfiguration": { - "enabled": true, + "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "FinalizeCalledExplicitly", + "suppressToolId": "StaticImport", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -42290,8 +42290,8 @@ "relationships": [ { "target": { - "id": "Java/Finalization", - "index": 75, + "id": "Java/Imports", + "index": 24, "toolComponent": { "name": "QDJVM" } @@ -42303,19 +42303,19 @@ ] }, { - "id": "StaticImport", + "id": "ReplaceNullCheck", "shortDescription": { - "text": "Static import" + "text": "Null check can be replaced with method call" }, "fullDescription": { - "text": "Reports 'import static' statements. Such 'import' statements are not supported under Java 1.4 or earlier JVMs. Configure the inspection: Use the table below to specify the classes that will be ignored by the inspection when used in an 'import static' statement. Use the Ignore single field static imports checkbox to ignore single-field 'import static' statements. Use the Ignore single method static imports checkbox to ignore single-method 'import static' statements.", - "markdown": "Reports `import static` statements.\n\nSuch `import` statements are not supported under Java 1.4 or earlier JVMs.\n\nConfigure the inspection:\n\n* Use the table below to specify the classes that will be ignored by the inspection when used in an `import static` statement.\n* Use the **Ignore single field static imports** checkbox to ignore single-field `import static` statements.\n* Use the **Ignore single method static imports** checkbox to ignore single-method `import static` statements." + "text": "Reports 'null' checks that can be replaced with a call to a static method from 'Objects' or 'Stream'. Example: 'if (message == null) {\n application.messageStorage().save(new EmptyMessage());\n } else {\n application.messageStorage().save(message);\n }' After the quick-fix is applied: 'application.messageStorage()\n .save(Objects.requireNonNullElseGet(message, () -> new EmptyMessage()));' Use the Don't warn if the replacement is longer than the original option to ignore the cases when the replacement is longer than the original code. New in 2017.3", + "markdown": "Reports `null` checks that can be replaced with a call to a static method from `Objects` or `Stream`.\n\n**Example:**\n\n\n if (message == null) {\n application.messageStorage().save(new EmptyMessage());\n } else {\n application.messageStorage().save(message);\n }\n\nAfter the quick-fix is applied:\n\n\n application.messageStorage()\n .save(Objects.requireNonNullElseGet(message, () -> new EmptyMessage()));\n\n\nUse the **Don't warn if the replacement is longer than the original** option to ignore the cases when the replacement is longer than the\noriginal code.\n\nNew in 2017.3" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "StaticImport", + "suppressToolId": "ReplaceNullCheck", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -42323,8 +42323,8 @@ "relationships": [ { "target": { - "id": "Java/Imports", - "index": 24, + "id": "Java/Java language level migration aids/Java 9", + "index": 87, "toolComponent": { "name": "QDJVM" } @@ -42357,7 +42357,7 @@ { "target": { "id": "Java/Control flow issues", - "index": 31, + "index": 30, "toolComponent": { "name": "QDJVM" } @@ -44616,7 +44616,7 @@ { "target": { "id": "Groovy/Probable bugs", - "index": 60, + "index": 61, "toolComponent": { "name": "QDJVM" } @@ -44682,7 +44682,7 @@ { "target": { "id": "Groovy/Probable bugs", - "index": 60, + "index": 61, "toolComponent": { "name": "QDJVM" } @@ -44847,7 +44847,7 @@ { "target": { "id": "Groovy/Probable bugs", - "index": 60, + "index": 61, "toolComponent": { "name": "QDJVM" } @@ -45519,19 +45519,19 @@ ] }, { - "id": "GrReassignedInClosureLocalVar", + "id": "GroovyMethodParameterCount", "shortDescription": { - "text": "Local variable is reassigned in closure or anonymous class" + "text": "Method with too many parameters" }, "fullDescription": { - "text": "Reports local variables assigned to expression with different type inside of closure or anonymous class. Example: 'int sum = 0\n [1, 2, 3].each { sum += 'as' }\n println(sum)' As a result, the 'integer' variable sum is reassigned to a 'String' expression.", - "markdown": "Reports local variables assigned to expression with different type inside of closure or anonymous class.\n\n**Example:**\n\n\n int sum = 0\n [1, 2, 3].each { sum += 'as' }\n println(sum)\n\nAs a result, the `integer` variable **sum** is reassigned to a `String` expression." + "text": "Reports methods with too many parameters. Method with too many parameters is a good sign that refactoring is necessary. Methods whose signatures are inherited from library classes are ignored by this inspection. Use the Maximum number of parameters: field to specify the maximum acceptable number of parameters a method might have.", + "markdown": "Reports methods with too many parameters. Method with too many parameters is a good sign that refactoring is necessary. Methods whose signatures are inherited from library classes are ignored by this inspection.\n\n\nUse the **Maximum number of parameters:** field to specify the maximum acceptable number of parameters a method might have." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "GrReassignedInClosureLocalVar", + "suppressToolId": "GroovyMethodParameterCount", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -45539,8 +45539,8 @@ "relationships": [ { "target": { - "id": "Groovy/Potentially confusing code constructs", - "index": 118, + "id": "Groovy/Method metrics", + "index": 149, "toolComponent": { "name": "QDJVM" } @@ -45552,19 +45552,19 @@ ] }, { - "id": "GroovyMethodParameterCount", + "id": "GrReassignedInClosureLocalVar", "shortDescription": { - "text": "Method with too many parameters" + "text": "Local variable is reassigned in closure or anonymous class" }, "fullDescription": { - "text": "Reports methods with too many parameters. Method with too many parameters is a good sign that refactoring is necessary. Methods whose signatures are inherited from library classes are ignored by this inspection. Use the Maximum number of parameters: field to specify the maximum acceptable number of parameters a method might have.", - "markdown": "Reports methods with too many parameters. Method with too many parameters is a good sign that refactoring is necessary. Methods whose signatures are inherited from library classes are ignored by this inspection.\n\n\nUse the **Maximum number of parameters:** field to specify the maximum acceptable number of parameters a method might have." + "text": "Reports local variables assigned to expression with different type inside of closure or anonymous class. Example: 'int sum = 0\n [1, 2, 3].each { sum += 'as' }\n println(sum)' As a result, the 'integer' variable sum is reassigned to a 'String' expression.", + "markdown": "Reports local variables assigned to expression with different type inside of closure or anonymous class.\n\n**Example:**\n\n\n int sum = 0\n [1, 2, 3].each { sum += 'as' }\n println(sum)\n\nAs a result, the `integer` variable **sum** is reassigned to a `String` expression." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "GroovyMethodParameterCount", + "suppressToolId": "GrReassignedInClosureLocalVar", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -45572,8 +45572,8 @@ "relationships": [ { "target": { - "id": "Groovy/Method metrics", - "index": 149, + "id": "Groovy/Potentially confusing code constructs", + "index": 118, "toolComponent": { "name": "QDJVM" } @@ -45639,7 +45639,7 @@ { "target": { "id": "Groovy/Probable bugs", - "index": 60, + "index": 61, "toolComponent": { "name": "QDJVM" } @@ -46035,7 +46035,7 @@ { "target": { "id": "Groovy/Probable bugs", - "index": 60, + "index": 61, "toolComponent": { "name": "QDJVM" } @@ -46563,7 +46563,7 @@ { "target": { "id": "Groovy/Probable bugs", - "index": 60, + "index": 61, "toolComponent": { "name": "QDJVM" } @@ -47190,7 +47190,7 @@ { "target": { "id": "Groovy/Probable bugs", - "index": 60, + "index": 61, "toolComponent": { "name": "QDJVM" } @@ -47235,28 +47235,28 @@ ] }, { - "id": "UnnecessaryQualifiedReference", + "id": "ChangeToMethod", "shortDescription": { - "text": "Unnecessary qualified reference" + "text": "Operator invocation can be replaced with method call" }, "fullDescription": { - "text": "Reports fully qualified references, which can be replaced with import. Example: 'def swingBuilder = new groovy.swing.SwingBuilder()' After the quick-fix is applied: 'import groovy.swing.SwingBuilder\n \n def swingBuilder = new SwingBuilder()'", - "markdown": "Reports fully qualified references, which can be replaced with import.\n\n**Example:**\n\n\n def swingBuilder = new groovy.swing.SwingBuilder()\n\nAfter the quick-fix is applied:\n\n\n import groovy.swing.SwingBuilder\n \n def swingBuilder = new SwingBuilder()\n" + "text": "Reports operator invocations that can be replaced with method calls. Example: 'a + b' After the quick-fix is applied: 'a.plus(b)'", + "markdown": "Reports operator invocations that can be replaced with method calls.\n\n**Example:**\n\n\n a + b\n\nAfter the quick-fix is applied:\n\n\n a.plus(b)\n" }, "defaultConfiguration": { "enabled": false, - "level": "warning", + "level": "note", "parameters": { - "suppressToolId": "UnnecessaryQualifiedReference", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "ChangeToMethod", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info" } }, "relationships": [ { "target": { - "id": "Groovy/Potentially confusing code constructs", - "index": 118, + "id": "Groovy/Style", + "index": 92, "toolComponent": { "name": "QDJVM" } @@ -47268,28 +47268,28 @@ ] }, { - "id": "ChangeToMethod", + "id": "UnnecessaryQualifiedReference", "shortDescription": { - "text": "Operator invocation can be replaced with method call" + "text": "Unnecessary qualified reference" }, "fullDescription": { - "text": "Reports operator invocations that can be replaced with method calls. Example: 'a + b' After the quick-fix is applied: 'a.plus(b)'", - "markdown": "Reports operator invocations that can be replaced with method calls.\n\n**Example:**\n\n\n a + b\n\nAfter the quick-fix is applied:\n\n\n a.plus(b)\n" + "text": "Reports fully qualified references, which can be replaced with import. Example: 'def swingBuilder = new groovy.swing.SwingBuilder()' After the quick-fix is applied: 'import groovy.swing.SwingBuilder\n \n def swingBuilder = new SwingBuilder()'", + "markdown": "Reports fully qualified references, which can be replaced with import.\n\n**Example:**\n\n\n def swingBuilder = new groovy.swing.SwingBuilder()\n\nAfter the quick-fix is applied:\n\n\n import groovy.swing.SwingBuilder\n \n def swingBuilder = new SwingBuilder()\n" }, "defaultConfiguration": { "enabled": false, - "level": "note", + "level": "warning", "parameters": { - "suppressToolId": "ChangeToMethod", - "ideaSeverity": "INFORMATION", - "qodanaSeverity": "Info" + "suppressToolId": "UnnecessaryQualifiedReference", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { - "id": "Groovy/Style", - "index": 92, + "id": "Groovy/Potentially confusing code constructs", + "index": 118, "toolComponent": { "name": "QDJVM" } @@ -47388,7 +47388,7 @@ { "target": { "id": "Groovy/Probable bugs", - "index": 60, + "index": 61, "toolComponent": { "name": "QDJVM" } @@ -47454,7 +47454,7 @@ { "target": { "id": "Groovy/Probable bugs", - "index": 60, + "index": 61, "toolComponent": { "name": "QDJVM" } @@ -47487,7 +47487,7 @@ { "target": { "id": "Groovy/Probable bugs", - "index": 60, + "index": 61, "toolComponent": { "name": "QDJVM" } @@ -47520,7 +47520,7 @@ { "target": { "id": "Groovy/Probable bugs", - "index": 60, + "index": 61, "toolComponent": { "name": "QDJVM" } @@ -47982,7 +47982,7 @@ { "target": { "id": "Groovy/Probable bugs", - "index": 60, + "index": 61, "toolComponent": { "name": "QDJVM" } @@ -48048,7 +48048,7 @@ { "target": { "id": "Groovy/Probable bugs", - "index": 60, + "index": 61, "toolComponent": { "name": "QDJVM" } @@ -48378,7 +48378,7 @@ { "target": { "id": "Groovy/Probable bugs", - "index": 60, + "index": 61, "toolComponent": { "name": "QDJVM" } @@ -48444,7 +48444,7 @@ { "target": { "id": "Groovy/Probable bugs", - "index": 60, + "index": 61, "toolComponent": { "name": "QDJVM" } @@ -48642,7 +48642,7 @@ { "target": { "id": "Groovy/Probable bugs", - "index": 60, + "index": 61, "toolComponent": { "name": "QDJVM" } @@ -48741,7 +48741,7 @@ { "target": { "id": "Groovy/Probable bugs", - "index": 60, + "index": 61, "toolComponent": { "name": "QDJVM" } @@ -48959,23 +48959,23 @@ "isComprehensive": false }, { - "name": "org.jetbrains.idea.maven", + "name": "com.intellij.persistence", "version": "242.24640", "rules": [ { - "id": "MavenDuplicatePluginInspection", + "id": "MongoDBJsonDuplicatePropertyKeys", "shortDescription": { - "text": "Duplicate plugin declaration" + "text": "Duplicate keys in object literals" }, "fullDescription": { - "text": "Reports the duplication of the plugin declaration in pom.xml", - "markdown": "Reports the duplication of the plugin declaration in pom.xml" + "text": "Reports a duplicate key in an object literal.", + "markdown": "Reports a duplicate key in an object literal." }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "MavenDuplicatePluginInspection", + "suppressToolId": "MongoDBJsonDuplicatePropertyKeys", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -48983,7 +48983,7 @@ "relationships": [ { "target": { - "id": "Maven", + "id": "JSON and JSON5", "index": 25, "toolComponent": { "name": "QDJVM" @@ -48996,19 +48996,23 @@ ] }, { - "id": "MavenPropertyInParent", + "id": "SqlSourceToSinkFlow", "shortDescription": { - "text": "Usage of properties in parent description" + "text": "Non-safe string is used as SQL" }, "fullDescription": { - "text": "Reports that the usage of properties in modules parent definition is prohibited", - "markdown": "Reports that the usage of properties in modules parent definition is prohibited" + "text": "Reports cases for Java and Kotlin languages when a non-safe string is passed to a method as a SQL query. It can be a cause of SQL injections. The list of methods is taken from Settings - Language Injections for 'SQL', 'JPA QL', 'Hibernate QL' and 'PostgreSQL' A safe object is: a string literal, interface instance, or enum object, int and its wrapper, boolean and its wrapper, class object a result of a call of a method, whose receiver and arguments are safe a private field in the same file, which is assigned only with a string literal and has a safe initializer a final field in the same file, which has a safe initializer a local variable which is assigned from safe-objects This field, local variable, or parameter must not be passed as arguments to methods or used as a qualifier or must be a primitive, its wrapper or immutable. Static final fields are considered as safe. The analysis is performed only inside one file. Example: 'public void save(String sql) {\n JdbcTemplate jdbcTemplate = new JdbcTemplate();\n jdbcTemplate.queryForList(sql);\n }'\n New in 2023.2", + "markdown": "Reports cases for Java and Kotlin languages when a non-safe string is passed to a method as a SQL query. It can be a cause of SQL injections. The list of methods is taken from **Settings** - **Language Injections** for `SQL`, `JPA QL`, `Hibernate QL` and `PostgreSQL`\n\n\nA safe object is:\n\n* a string literal, interface instance, or enum object, int and its wrapper, boolean and its wrapper, class object\n* a result of a call of a method, whose receiver and arguments are safe\n* a private field in the same file, which is assigned only with a string literal and has a safe initializer\n* a final field in the same file, which has a safe initializer\n* a local variable which is assigned from safe-objects\nThis field, local variable, or parameter must not be passed as arguments to methods or used as a qualifier or must be a primitive, its wrapper or immutable.\n\nStatic final fields are considered as safe.\n\n\nThe analysis is performed only inside one file.\nExample:\n\n\n public void save(String sql) {\n JdbcTemplate jdbcTemplate = new JdbcTemplate();\n jdbcTemplate.queryForList(sql);\n }\n\nNew in 2023.2" }, "defaultConfiguration": { - "enabled": false, + "enabled": true, "level": "warning", "parameters": { - "suppressToolId": "MavenPropertyInParent", + "suppressToolId": "SqlSourceToSinkFlow", + "cweIds": [ + 89, + 564 + ], "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -49016,8 +49020,8 @@ "relationships": [ { "target": { - "id": "Maven", - "index": 25, + "id": "JVM languages", + "index": 3, "toolComponent": { "name": "QDJVM" } @@ -49027,21 +49031,33 @@ ] } ] - }, + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.jetbrains.idea.maven", + "version": "242.24640", + "rules": [ { - "id": "MavenDuplicateDependenciesInspection", + "id": "MavenDuplicatePluginInspection", "shortDescription": { - "text": "Duplicate Dependencies" + "text": "Duplicate plugin declaration" }, "fullDescription": { - "text": "Reports duplicate dependencies", - "markdown": "Reports duplicate dependencies" + "text": "Reports the duplication of the plugin declaration in pom.xml", + "markdown": "Reports the duplication of the plugin declaration in pom.xml" }, "defaultConfiguration": { "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "MavenDuplicateDependenciesInspection", + "suppressToolId": "MavenDuplicatePluginInspection", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -49050,7 +49066,7 @@ { "target": { "id": "Maven", - "index": 25, + "index": 26, "toolComponent": { "name": "QDJVM" } @@ -49062,28 +49078,28 @@ ] }, { - "id": "MavenModelInspection", + "id": "MavenPropertyInParent", "shortDescription": { - "text": "Maven Model Inspection" + "text": "Usage of properties in parent description" }, "fullDescription": { - "text": "Reports resolution problems in a Maven model", - "markdown": "Reports resolution problems in a Maven model" + "text": "Reports that the usage of properties in modules parent definition is prohibited", + "markdown": "Reports that the usage of properties in modules parent definition is prohibited" }, "defaultConfiguration": { "enabled": false, - "level": "error", + "level": "warning", "parameters": { - "suppressToolId": "MavenModelInspection", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" + "suppressToolId": "MavenPropertyInParent", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { "id": "Maven", - "index": 25, + "index": 26, "toolComponent": { "name": "QDJVM" } @@ -49095,28 +49111,28 @@ ] }, { - "id": "MavenParentMissedVersionInspection", + "id": "MavenDuplicateDependenciesInspection", "shortDescription": { - "text": "Parent version missed" + "text": "Duplicate Dependencies" }, "fullDescription": { - "text": "Reports the absence of the parent version element for versions that do not support consumer POM feature", - "markdown": "Reports the absence of the parent version element for versions that do not support consumer POM feature" + "text": "Reports duplicate dependencies", + "markdown": "Reports duplicate dependencies" }, "defaultConfiguration": { "enabled": false, - "level": "error", + "level": "warning", "parameters": { - "suppressToolId": "MavenParentMissedVersionInspection", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" + "suppressToolId": "MavenDuplicateDependenciesInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { "id": "Maven", - "index": 25, + "index": 26, "toolComponent": { "name": "QDJVM" } @@ -49128,28 +49144,28 @@ ] }, { - "id": "MavenRedundantGroupId", + "id": "MavenModelInspection", "shortDescription": { - "text": "Redundant groupId" + "text": "Maven Model Inspection" }, "fullDescription": { - "text": "Reports the unnecessary definition since it is already defined in the parent pom.xml", - "markdown": "Reports the unnecessary \\ definition since it is already defined in the parent pom.xml" + "text": "Reports resolution problems in a Maven model", + "markdown": "Reports resolution problems in a Maven model" }, "defaultConfiguration": { "enabled": false, - "level": "warning", + "level": "error", "parameters": { - "suppressToolId": "MavenRedundantGroupId", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "MavenModelInspection", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" } }, "relationships": [ { "target": { "id": "Maven", - "index": 25, + "index": 26, "toolComponent": { "name": "QDJVM" } @@ -49159,41 +49175,29 @@ ] } ] - } - ], - "language": "en-US", - "contents": [ - "localizedData", - "nonLocalizedData" - ], - "isComprehensive": false - }, - { - "name": "com.intellij.persistence", - "version": "242.24640", - "rules": [ + }, { - "id": "MongoDBJsonDuplicatePropertyKeys", + "id": "MavenParentMissedVersionInspection", "shortDescription": { - "text": "Duplicate keys in object literals" + "text": "Parent version missed" }, "fullDescription": { - "text": "Reports a duplicate key in an object literal.", - "markdown": "Reports a duplicate key in an object literal." + "text": "Reports the absence of the parent version element for versions that do not support consumer POM feature", + "markdown": "Reports the absence of the parent version element for versions that do not support consumer POM feature" }, "defaultConfiguration": { "enabled": false, - "level": "warning", + "level": "error", "parameters": { - "suppressToolId": "MongoDBJsonDuplicatePropertyKeys", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "MavenParentMissedVersionInspection", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" } }, "relationships": [ { "target": { - "id": "JSON and JSON5", + "id": "Maven", "index": 26, "toolComponent": { "name": "QDJVM" @@ -49206,23 +49210,19 @@ ] }, { - "id": "SqlSourceToSinkFlow", + "id": "MavenRedundantGroupId", "shortDescription": { - "text": "Non-safe string is used as SQL" + "text": "Redundant groupId" }, "fullDescription": { - "text": "Reports cases for Java and Kotlin languages when a non-safe string is passed to a method as a SQL query. It can be a cause of SQL injections. The list of methods is taken from Settings - Language Injections for 'SQL', 'JPA QL', 'Hibernate QL' and 'PostgreSQL' A safe object is: a string literal, interface instance, or enum object, int and its wrapper, boolean and its wrapper, class object a result of a call of a method, whose receiver and arguments are safe a private field in the same file, which is assigned only with a string literal and has a safe initializer a final field in the same file, which has a safe initializer a local variable which is assigned from safe-objects This field, local variable, or parameter must not be passed as arguments to methods or used as a qualifier or must be a primitive, its wrapper or immutable. Static final fields are considered as safe. The analysis is performed only inside one file. Example: 'public void save(String sql) {\n JdbcTemplate jdbcTemplate = new JdbcTemplate();\n jdbcTemplate.queryForList(sql);\n }'\n New in 2023.2", - "markdown": "Reports cases for Java and Kotlin languages when a non-safe string is passed to a method as a SQL query. It can be a cause of SQL injections. The list of methods is taken from **Settings** - **Language Injections** for `SQL`, `JPA QL`, `Hibernate QL` and `PostgreSQL`\n\n\nA safe object is:\n\n* a string literal, interface instance, or enum object, int and its wrapper, boolean and its wrapper, class object\n* a result of a call of a method, whose receiver and arguments are safe\n* a private field in the same file, which is assigned only with a string literal and has a safe initializer\n* a final field in the same file, which has a safe initializer\n* a local variable which is assigned from safe-objects\nThis field, local variable, or parameter must not be passed as arguments to methods or used as a qualifier or must be a primitive, its wrapper or immutable.\n\nStatic final fields are considered as safe.\n\n\nThe analysis is performed only inside one file.\nExample:\n\n\n public void save(String sql) {\n JdbcTemplate jdbcTemplate = new JdbcTemplate();\n jdbcTemplate.queryForList(sql);\n }\n\nNew in 2023.2" + "text": "Reports the unnecessary definition since it is already defined in the parent pom.xml", + "markdown": "Reports the unnecessary \\ definition since it is already defined in the parent pom.xml" }, "defaultConfiguration": { - "enabled": true, + "enabled": false, "level": "warning", "parameters": { - "suppressToolId": "SqlSourceToSinkFlow", - "cweIds": [ - 89, - 564 - ], + "suppressToolId": "MavenRedundantGroupId", "ideaSeverity": "WARNING", "qodanaSeverity": "High" } @@ -49230,8 +49230,8 @@ "relationships": [ { "target": { - "id": "JVM languages", - "index": 3, + "id": "Maven", + "index": 26, "toolComponent": { "name": "QDJVM" } @@ -52117,7 +52117,7 @@ { "target": { "id": "General", - "index": 48, + "index": 50, "toolComponent": { "name": "QDJVM" } @@ -52150,7 +52150,7 @@ { "target": { "id": "General", - "index": 48, + "index": 50, "toolComponent": { "name": "QDJVM" } @@ -52216,7 +52216,7 @@ { "target": { "id": "General", - "index": 48, + "index": 50, "toolComponent": { "name": "QDJVM" } @@ -52513,7 +52513,7 @@ { "target": { "id": "General", - "index": 48, + "index": 50, "toolComponent": { "name": "QDJVM" } @@ -52579,7 +52579,7 @@ { "target": { "id": "JSON and JSON5", - "index": 26, + "index": 25, "toolComponent": { "name": "QDJVM" } @@ -52612,7 +52612,7 @@ { "target": { "id": "General", - "index": 48, + "index": 50, "toolComponent": { "name": "QDJVM" } @@ -52744,7 +52744,7 @@ { "target": { "id": "JSON and JSON5", - "index": 26, + "index": 25, "toolComponent": { "name": "QDJVM" } @@ -52777,7 +52777,7 @@ { "target": { "id": "JSON and JSON5", - "index": 26, + "index": 25, "toolComponent": { "name": "QDJVM" } @@ -53041,7 +53041,7 @@ { "target": { "id": "General", - "index": 48, + "index": 50, "toolComponent": { "name": "QDJVM" } @@ -53239,7 +53239,7 @@ { "target": { "id": "General", - "index": 48, + "index": 50, "toolComponent": { "name": "QDJVM" } @@ -53272,7 +53272,7 @@ { "target": { "id": "General", - "index": 48, + "index": 50, "toolComponent": { "name": "QDJVM" } @@ -53338,7 +53338,7 @@ { "target": { "id": "General", - "index": 48, + "index": 50, "toolComponent": { "name": "QDJVM" } @@ -53767,7 +53767,7 @@ { "target": { "id": "JSON and JSON5", - "index": 26, + "index": 25, "toolComponent": { "name": "QDJVM" } @@ -53866,7 +53866,7 @@ { "target": { "id": "JSON and JSON5", - "index": 26, + "index": 25, "toolComponent": { "name": "QDJVM" } @@ -53965,7 +53965,7 @@ { "target": { "id": "General", - "index": 48, + "index": 50, "toolComponent": { "name": "QDJVM" } @@ -53998,7 +53998,7 @@ { "target": { "id": "JSON and JSON5", - "index": 26, + "index": 25, "toolComponent": { "name": "QDJVM" } @@ -54538,7 +54538,7 @@ { "target": { "id": "JavaScript and TypeScript/TypeScript", - "index": 103, + "index": 102, "toolComponent": { "name": "QDJVM" } @@ -54802,7 +54802,7 @@ { "target": { "id": "JavaScript and TypeScript/TypeScript", - "index": 103, + "index": 102, "toolComponent": { "name": "QDJVM" } @@ -55165,7 +55165,7 @@ { "target": { "id": "JavaScript and TypeScript/TypeScript", - "index": 103, + "index": 102, "toolComponent": { "name": "QDJVM" } @@ -55198,7 +55198,7 @@ { "target": { "id": "JavaScript and TypeScript/TypeScript", - "index": 103, + "index": 102, "toolComponent": { "name": "QDJVM" } @@ -55495,7 +55495,7 @@ { "target": { "id": "JavaScript and TypeScript/TypeScript", - "index": 103, + "index": 102, "toolComponent": { "name": "QDJVM" } @@ -56419,7 +56419,7 @@ { "target": { "id": "JavaScript and TypeScript/Imports and dependencies", - "index": 172, + "index": 174, "toolComponent": { "name": "QDJVM" } @@ -56782,7 +56782,7 @@ { "target": { "id": "JavaScript and TypeScript/TypeScript", - "index": 103, + "index": 102, "toolComponent": { "name": "QDJVM" } @@ -57310,7 +57310,7 @@ { "target": { "id": "JavaScript and TypeScript/TypeScript", - "index": 103, + "index": 102, "toolComponent": { "name": "QDJVM" } @@ -57508,7 +57508,7 @@ { "target": { "id": "JavaScript and TypeScript/TypeScript", - "index": 103, + "index": 102, "toolComponent": { "name": "QDJVM" } @@ -58048,28 +58048,28 @@ ] }, { - "id": "ES6PossiblyAsyncFunction", + "id": "TextLabelInSwitchStatementJS", "shortDescription": { - "text": "'await' in non-async function" + "text": "Text label in 'switch' statement" }, "fullDescription": { - "text": "Reports a usage of 'await' in a function that was possibly intended to be async but is actually missing the 'async' modifier. Although 'await' can be used as an identifier, it is likely that it was intended to be used as an operator, so the containing function should be made 'async'.", - "markdown": "Reports a usage of `await` in a function that was possibly intended to be async but is actually missing the `async` modifier. Although `await` can be used as an identifier, it is likely that it was intended to be used as an operator, so the containing function should be made `async`." + "text": "Reports a labeled statement inside a 'switch' statement, which often results from a typo. Example: 'switch(x)\n {\n case 1:\n case2: //typo!\n case 3:\n break;\n }'", + "markdown": "Reports a labeled statement inside a `switch` statement, which often results from a typo.\n\nExample:\n\n\n switch(x)\n {\n case 1:\n case2: //typo!\n case 3:\n break;\n }\n" }, "defaultConfiguration": { "enabled": false, - "level": "note", + "level": "warning", "parameters": { - "suppressToolId": "ES6PossiblyAsyncFunction", - "ideaSeverity": "WEAK WARNING", - "qodanaSeverity": "Moderate" + "suppressToolId": "TextLabelInSwitchStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { - "id": "JavaScript and TypeScript/Async code and promises", - "index": 182, + "id": "JavaScript and TypeScript/Switch statement issues", + "index": 137, "toolComponent": { "name": "QDJVM" } @@ -58081,28 +58081,28 @@ ] }, { - "id": "TextLabelInSwitchStatementJS", + "id": "ES6PossiblyAsyncFunction", "shortDescription": { - "text": "Text label in 'switch' statement" + "text": "'await' in non-async function" }, "fullDescription": { - "text": "Reports a labeled statement inside a 'switch' statement, which often results from a typo. Example: 'switch(x)\n {\n case 1:\n case2: //typo!\n case 3:\n break;\n }'", - "markdown": "Reports a labeled statement inside a `switch` statement, which often results from a typo.\n\nExample:\n\n\n switch(x)\n {\n case 1:\n case2: //typo!\n case 3:\n break;\n }\n" + "text": "Reports a usage of 'await' in a function that was possibly intended to be async but is actually missing the 'async' modifier. Although 'await' can be used as an identifier, it is likely that it was intended to be used as an operator, so the containing function should be made 'async'.", + "markdown": "Reports a usage of `await` in a function that was possibly intended to be async but is actually missing the `async` modifier. Although `await` can be used as an identifier, it is likely that it was intended to be used as an operator, so the containing function should be made `async`." }, "defaultConfiguration": { "enabled": false, - "level": "warning", + "level": "note", "parameters": { - "suppressToolId": "TextLabelInSwitchStatementJS", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "ES6PossiblyAsyncFunction", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate" } }, "relationships": [ { "target": { - "id": "JavaScript and TypeScript/Switch statement issues", - "index": 137, + "id": "JavaScript and TypeScript/Async code and promises", + "index": 182, "toolComponent": { "name": "QDJVM" } @@ -58234,7 +58234,7 @@ { "target": { "id": "JavaScript and TypeScript/Imports and dependencies", - "index": 172, + "index": 174, "toolComponent": { "name": "QDJVM" } @@ -58597,7 +58597,7 @@ { "target": { "id": "JavaScript and TypeScript/TypeScript", - "index": 103, + "index": 102, "toolComponent": { "name": "QDJVM" } @@ -58927,7 +58927,7 @@ { "target": { "id": "JavaScript and TypeScript/TypeScript", - "index": 103, + "index": 102, "toolComponent": { "name": "QDJVM" } @@ -58960,7 +58960,7 @@ { "target": { "id": "JavaScript and TypeScript/Imports and dependencies", - "index": 172, + "index": 174, "toolComponent": { "name": "QDJVM" } @@ -59323,7 +59323,7 @@ { "target": { "id": "JavaScript and TypeScript/TypeScript", - "index": 103, + "index": 102, "toolComponent": { "name": "QDJVM" } @@ -59422,7 +59422,7 @@ { "target": { "id": "JavaScript and TypeScript/TypeScript", - "index": 103, + "index": 102, "toolComponent": { "name": "QDJVM" } @@ -59653,7 +59653,7 @@ { "target": { "id": "JavaScript and TypeScript/TypeScript", - "index": 103, + "index": 102, "toolComponent": { "name": "QDJVM" } @@ -59851,7 +59851,7 @@ { "target": { "id": "JavaScript and TypeScript/Imports and dependencies", - "index": 172, + "index": 174, "toolComponent": { "name": "QDJVM" } @@ -60016,7 +60016,7 @@ { "target": { "id": "JavaScript and TypeScript/TypeScript", - "index": 103, + "index": 102, "toolComponent": { "name": "QDJVM" } @@ -60049,7 +60049,7 @@ { "target": { "id": "JavaScript and TypeScript/TypeScript", - "index": 103, + "index": 102, "toolComponent": { "name": "QDJVM" } @@ -60181,7 +60181,7 @@ { "target": { "id": "JavaScript and TypeScript/TypeScript", - "index": 103, + "index": 102, "toolComponent": { "name": "QDJVM" } @@ -60280,7 +60280,7 @@ { "target": { "id": "JavaScript and TypeScript/Imports and dependencies", - "index": 172, + "index": 174, "toolComponent": { "name": "QDJVM" } @@ -60412,7 +60412,7 @@ { "target": { "id": "JavaScript and TypeScript/TypeScript", - "index": 103, + "index": 102, "toolComponent": { "name": "QDJVM" } @@ -60610,7 +60610,7 @@ { "target": { "id": "JavaScript and TypeScript/Imports and dependencies", - "index": 172, + "index": 174, "toolComponent": { "name": "QDJVM" } @@ -60742,7 +60742,7 @@ { "target": { "id": "JavaScript and TypeScript/TypeScript", - "index": 103, + "index": 102, "toolComponent": { "name": "QDJVM" } @@ -61978,7 +61978,7 @@ { "target": { "id": "Gradle/Probable bugs", - "index": 50, + "index": 49, "toolComponent": { "name": "QDJVM" } @@ -62044,7 +62044,7 @@ { "target": { "id": "Gradle/Probable bugs", - "index": 50, + "index": 49, "toolComponent": { "name": "QDJVM" } @@ -62110,7 +62110,7 @@ { "target": { "id": "Gradle/Probable bugs", - "index": 50, + "index": 49, "toolComponent": { "name": "QDJVM" } @@ -62143,7 +62143,7 @@ { "target": { "id": "Gradle/Probable bugs", - "index": 50, + "index": 49, "toolComponent": { "name": "QDJVM" } @@ -62209,7 +62209,7 @@ { "target": { "id": "Gradle/Probable bugs", - "index": 50, + "index": 49, "toolComponent": { "name": "QDJVM" } @@ -65701,28 +65701,28 @@ ] }, { - "id": "InspectionDescriptionNotFoundInspection", + "id": "PluginXmlValidity", "shortDescription": { - "text": "Inspection description checker" + "text": "Plugin.xml validity" }, "fullDescription": { - "text": "Reports inspections that are missing an HTML description file, i.e. a file containing a text like this. The Create description file quick-fix creates a template HTML description file.", - "markdown": "Reports inspections that are missing an HTML description file, i.e. a file containing a text like this.\n\n\nThe **Create description file** quick-fix creates a template HTML description file." + "text": "Reports problems in 'plugin.xml'. Invalid configuration can lead to problems at runtime.", + "markdown": "Reports problems in `plugin.xml`.\n\n\nInvalid configuration can lead to problems at runtime." }, "defaultConfiguration": { "enabled": false, - "level": "warning", + "level": "error", "parameters": { - "suppressToolId": "InspectionDescriptionNotFoundInspection", - "ideaSeverity": "WARNING", - "qodanaSeverity": "High" + "suppressToolId": "PluginXmlValidity", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical" } }, "relationships": [ { "target": { - "id": "Plugin DevKit/Description file", - "index": 140, + "id": "Plugin DevKit/Plugin descriptor", + "index": 84, "toolComponent": { "name": "QDJVM" } @@ -65734,28 +65734,28 @@ ] }, { - "id": "PluginXmlValidity", + "id": "InspectionDescriptionNotFoundInspection", "shortDescription": { - "text": "Plugin.xml validity" + "text": "Inspection description checker" }, "fullDescription": { - "text": "Reports problems in 'plugin.xml'. Invalid configuration can lead to problems at runtime.", - "markdown": "Reports problems in `plugin.xml`.\n\n\nInvalid configuration can lead to problems at runtime." + "text": "Reports inspections that are missing an HTML description file, i.e. a file containing a text like this. The Create description file quick-fix creates a template HTML description file.", + "markdown": "Reports inspections that are missing an HTML description file, i.e. a file containing a text like this.\n\n\nThe **Create description file** quick-fix creates a template HTML description file." }, "defaultConfiguration": { "enabled": false, - "level": "error", + "level": "warning", "parameters": { - "suppressToolId": "PluginXmlValidity", - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical" + "suppressToolId": "InspectionDescriptionNotFoundInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High" } }, "relationships": [ { "target": { - "id": "Plugin DevKit/Plugin descriptor", - "index": 84, + "id": "Plugin DevKit/Description file", + "index": 140, "toolComponent": { "name": "QDJVM" } @@ -66859,7 +66859,7 @@ { "target": { "id": "CSS/Probable bugs", - "index": 102, + "index": 103, "toolComponent": { "name": "QDJVM" } @@ -66991,7 +66991,7 @@ { "target": { "id": "CSS/Probable bugs", - "index": 102, + "index": 103, "toolComponent": { "name": "QDJVM" } @@ -67321,7 +67321,7 @@ { "target": { "id": "CSS/Probable bugs", - "index": 102, + "index": 103, "toolComponent": { "name": "QDJVM" } @@ -67828,7 +67828,7 @@ { "target": { "id": "HTTP Client", - "index": 81, + "index": 79, "toolComponent": { "name": "QDJVM" } @@ -67861,7 +67861,7 @@ { "target": { "id": "HTTP Client", - "index": 81, + "index": 79, "toolComponent": { "name": "QDJVM" } @@ -67927,7 +67927,7 @@ { "target": { "id": "HTTP Client", - "index": 81, + "index": 79, "toolComponent": { "name": "QDJVM" } @@ -67960,7 +67960,7 @@ { "target": { "id": "HTTP Client", - "index": 81, + "index": 79, "toolComponent": { "name": "QDJVM" } @@ -67993,7 +67993,7 @@ { "target": { "id": "HTTP Client", - "index": 81, + "index": 79, "toolComponent": { "name": "QDJVM" } @@ -68026,7 +68026,7 @@ { "target": { "id": "HTTP Client", - "index": 81, + "index": 79, "toolComponent": { "name": "QDJVM" } @@ -68059,7 +68059,7 @@ { "target": { "id": "HTTP Client", - "index": 81, + "index": 79, "toolComponent": { "name": "QDJVM" } @@ -68092,7 +68092,7 @@ { "target": { "id": "HTTP Client", - "index": 81, + "index": 79, "toolComponent": { "name": "QDJVM" } @@ -68125,7 +68125,7 @@ { "target": { "id": "HTTP Client", - "index": 81, + "index": 79, "toolComponent": { "name": "QDJVM" } @@ -68158,7 +68158,7 @@ { "target": { "id": "HTTP Client", - "index": 81, + "index": 79, "toolComponent": { "name": "QDJVM" } @@ -68191,7 +68191,7 @@ { "target": { "id": "HTTP Client", - "index": 81, + "index": 79, "toolComponent": { "name": "QDJVM" } @@ -68224,7 +68224,7 @@ { "target": { "id": "HTTP Client", - "index": 81, + "index": 79, "toolComponent": { "name": "QDJVM" } @@ -71746,7 +71746,7 @@ { "target": { "id": "General", - "index": 48, + "index": 50, "toolComponent": { "name": "QDJVM" } @@ -71812,7 +71812,7 @@ { "target": { "id": "General", - "index": 48, + "index": 50, "toolComponent": { "name": "QDJVM" } @@ -71878,7 +71878,7 @@ { "target": { "id": "General", - "index": 48, + "index": 50, "toolComponent": { "name": "QDJVM" } @@ -73792,7 +73792,7 @@ { "target": { "id": "Spring/Spring Boot", - "index": 174, + "index": 173, "toolComponent": { "name": "QDJVM" } @@ -73825,7 +73825,7 @@ { "target": { "id": "Spring/Spring Boot", - "index": 174, + "index": 173, "toolComponent": { "name": "QDJVM" } @@ -73858,7 +73858,7 @@ { "target": { "id": "Spring/Spring Boot", - "index": 174, + "index": 173, "toolComponent": { "name": "QDJVM" } @@ -73891,7 +73891,7 @@ { "target": { "id": "Spring/Spring Boot", - "index": 174, + "index": 173, "toolComponent": { "name": "QDJVM" } @@ -73924,7 +73924,7 @@ { "target": { "id": "Spring/Spring Boot", - "index": 174, + "index": 173, "toolComponent": { "name": "QDJVM" } @@ -73957,7 +73957,7 @@ { "target": { "id": "Spring/Spring Boot", - "index": 174, + "index": 173, "toolComponent": { "name": "QDJVM" } @@ -74739,7 +74739,7 @@ }, "invocations": [ { - "startTimeUtc": "2024-12-29T22:59:38.950684667Z", + "startTimeUtc": "2024-12-29T23:02:26.952791746Z", "exitCode": 0, "executionSuccessful": true } @@ -74748,7 +74748,7 @@ "versionControlProvenance": [ { "repositoryUri": "https://github.com/1c-syntax/bsl-language-server.git", - "revisionId": "7f21ea3669a40590840d27cc811307d9322a538f", + "revisionId": "ec574967c6cfbf703e85079ac04a42159a790923", "branch": "develop", "properties": { "repoUrl": "https://github.com/1c-syntax/bsl-language-server.git", @@ -80468,9 +80468,9 @@ ], "automationDetails": { "id": "bsl-language-server/qodana/2024-12-29", - "guid": "1664837c-88f7-4888-af5c-f945889b65d2", + "guid": "37ced18d-ed5b-42a3-b4fa-c4c68bc3bb32", "properties": { - "jobUrl": "https://github.com/1c-syntax/bsl-language-server/actions/runs/12539319945", + "jobUrl": "https://github.com/1c-syntax/bsl-language-server/actions/runs/12539328004", "analysisKind": "regular" } }, @@ -80648,6 +80648,62 @@ ] } }, + { + "ruleId": "QodanaJavaSanity", + "kind": "fail", + "level": "error", + "message": { + "text": "Unresolved reference __", + "markdown": "Unresolved reference __" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/main/java/com/github/_1c_syntax/bsl/languageserver/context/DocumentContext.java", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 96, + "startColumn": 23, + "charOffset": 3925, + "charLength": 2, + "snippet": { + "text": "__" + }, + "sourceLanguage": "JAVA" + }, + "contextRegion": { + "startLine": 94, + "startColumn": 1, + "charOffset": 3830, + "charLength": 201, + "snippet": { + "text": " @Setter(onMethod = @__({@Autowired}))\n private ServerContext context;\n @Setter(onMethod = @__({@Autowired}))\n private DiagnosticComputer diagnosticComputer;\n @Setter(onMethod = @__({@Autowired}))" + }, + "sourceLanguage": "JAVA" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "bsl-language-server.main", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "40b7f8ce4ab94da2", + "equalIndicator/v1": "1f2717aab17a63f70b38e35e254c226c09158c4df7defaa8a7dd345f390e2d78" + }, + "properties": { + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "tags": [ + "JAVA" + ] + } + }, { "ruleId": "QodanaJavaSanity", "kind": "fail", @@ -81040,62 +81096,6 @@ ] } }, - { - "ruleId": "QodanaJavaSanity", - "kind": "fail", - "level": "error", - "message": { - "text": "Unresolved reference __", - "markdown": "Unresolved reference __" - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "src/main/java/com/github/_1c_syntax/bsl/languageserver/context/DocumentContext.java", - "uriBaseId": "SRCROOT" - }, - "region": { - "startLine": 103, - "startColumn": 23, - "charOffset": 4239, - "charLength": 2, - "snippet": { - "text": "__" - }, - "sourceLanguage": "JAVA" - }, - "contextRegion": { - "startLine": 101, - "startColumn": 1, - "charOffset": 4086, - "charLength": 264, - "snippet": { - "text": " @Setter(onMethod = @__({@Autowired}))\n private ObjectProvider cognitiveComplexityComputerProvider;\n @Setter(onMethod = @__({@Autowired}))\n private ObjectProvider cyclomaticComplexityComputerProvider;\n" - }, - "sourceLanguage": "JAVA" - } - }, - "logicalLocations": [ - { - "fullyQualifiedName": "bsl-language-server.main", - "kind": "module" - } - ] - } - ], - "partialFingerprints": { - "equalIndicator/v2": "cebd0ac771b406b5", - "equalIndicator/v1": "8f92f9c74e37912bae43890876605da9a6f694dc6f9d4ce2b6f0ce60cbbd415f" - }, - "properties": { - "ideaSeverity": "ERROR", - "qodanaSeverity": "Critical", - "tags": [ - "JAVA" - ] - } - }, { "ruleId": "QodanaJavaSanity", "kind": "fail", @@ -81377,6 +81377,120 @@ } } ], + "qodana.promo.results": [ + { + "ruleId": "RegExpSimplifiable", + "kind": "fail", + "level": "note", + "message": { + "text": "'[\\\\*]' can be simplified to '\\*'", + "markdown": "`[\\\\*]` can be simplified to '\\\\\\*'" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/UsingHardcodeSecretInformationDiagnostic.java", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 67, + "startColumn": 75, + "charOffset": 2811, + "charLength": 5, + "snippet": { + "text": "[\\\\*]" + }, + "sourceLanguage": "RegExp" + }, + "contextRegion": { + "startLine": 65, + "startColumn": 1, + "charOffset": 2731, + "charLength": 137, + "snippet": { + "text": " );\n\n private static final Pattern PATTERN_CHECK_PASSWORD = Pattern.compile(\"^[\\\\*]+$\", Pattern.UNICODE_CASE);\n\n @DiagnosticParameter(" + }, + "sourceLanguage": "JAVA" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "bsl-language-server.main", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a8424e531e41fa95", + "equalIndicator/v1": "a96a0536e198cbff96eebc4edc9806807b12725ac46694da2501ad5bce236c55" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "tags": [ + "RegExp" + ] + } + }, + { + "ruleId": "UnnecessaryDefault", + "kind": "fail", + "level": "warning", + "message": { + "text": "'default' branch is unnecessary", + "markdown": "`default` branch is unnecessary" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "src/main/java/com/github/_1c_syntax/bsl/languageserver/utils/expressiontree/DefaultNodeEqualityComparer.java", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 51, + "startColumn": 7, + "charOffset": 2157, + "charLength": 7, + "snippet": { + "text": "default" + }, + "sourceLanguage": "JAVA" + }, + "contextRegion": { + "startLine": 49, + "startColumn": 1, + "charOffset": 2021, + "charLength": 189, + "snippet": { + "text": " case SKIPPED_CALL_ARG -> true;\n case CALL -> callStatementsEqual((AbstractCallNode) first, (AbstractCallNode) second);\n default -> throw new IllegalStateException();\n };\n" + }, + "sourceLanguage": "JAVA" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "bsl-language-server.main", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "642082133e9a3661", + "equalIndicator/v1": "2c72370b59dde2cbf1ea29e8feac3da6f729b7114f1766f8f09a515ec88ac90f" + }, + "properties": { + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "tags": [ + "JAVA" + ] + } + } + ], "configProfile": "starter", "deviceId": "200820300000000-b1a5-d275-f8e7-faf9fd093ee8", "qodanaNewResultSummary": { diff --git a/qodana/results/sanity.json b/qodana/results/sanity.json index ac1c04eb529..a12f27912ab 100644 --- a/qodana/results/sanity.json +++ b/qodana/results/sanity.json @@ -94,6 +94,38 @@ "inspectionName": "QodanaJavaSanity" }, "hash": "100cb40fcaa53a4df7367a0520df7fcffea87d1d64b8f7d7b139171c83f5b109" +},{ + "tool": "Code Inspection", + "category": "General", + "type": "Java sanity", + "tags": [ + "JAVA", + "Sanity" + ], + "severity": "Critical", + "comment": "Unresolved reference __", + "detailsInfo": "Reports unresolved references in Java code.", + "sources": [ + { + "type": "file", + "path": "src/main/java/com/github/_1c_syntax/bsl/languageserver/context/DocumentContext.java", + "language": "JAVA", + "line": 96, + "offset": 23, + "length": 2, + "code": { + "startLine": 94, + "length": 2, + "offset": 95, + "surroundingCode": " @Setter(onMethod = @__({@Autowired}))\n private ServerContext context;\n @Setter(onMethod = @__({@Autowired}))\n private DiagnosticComputer diagnosticComputer;\n @Setter(onMethod = @__({@Autowired}))" + } + } + ], + "attributes": { + "module": "bsl-language-server.main", + "inspectionName": "QodanaJavaSanity" + }, + "hash": "1f2717aab17a63f70b38e35e254c226c09158c4df7defaa8a7dd345f390e2d78" },{ "tool": "Code Inspection", "category": "General", @@ -318,38 +350,6 @@ "inspectionName": "QodanaJavaSanity" }, "hash": "8609217f18893d5c4a3136a3e209e59b0d25dbd42057be384b68375b1354b2aa" -},{ - "tool": "Code Inspection", - "category": "General", - "type": "Java sanity", - "tags": [ - "JAVA", - "Sanity" - ], - "severity": "Critical", - "comment": "Unresolved reference __", - "detailsInfo": "Reports unresolved references in Java code.", - "sources": [ - { - "type": "file", - "path": "src/main/java/com/github/_1c_syntax/bsl/languageserver/context/DocumentContext.java", - "language": "JAVA", - "line": 103, - "offset": 23, - "length": 2, - "code": { - "startLine": 101, - "length": 2, - "offset": 153, - "surroundingCode": " @Setter(onMethod = @__({@Autowired}))\n private ObjectProvider cognitiveComplexityComputerProvider;\n @Setter(onMethod = @__({@Autowired}))\n private ObjectProvider cyclomaticComplexityComputerProvider;\n" - } - } - ], - "attributes": { - "module": "bsl-language-server.main", - "inspectionName": "QodanaJavaSanity" - }, - "hash": "8f92f9c74e37912bae43890876605da9a6f694dc6f9d4ce2b6f0ce60cbbd415f" },{ "tool": "Code Inspection", "category": "General",