diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AwaitWithoutCorrespondingSignal.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AwaitWithoutCorrespondingSignal.html index 6e408d9aef82..e7ddb813c301 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/AwaitWithoutCorrespondingSignal.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AwaitWithoutCorrespondingSignal.html @@ -8,35 +8,18 @@ Only calls that target fields of the current class are reported by this inspecti
Example:
class Queue {
- // ...
- private final Lock lock = new ReentrantLock();
- private final Condition isEmpty = lock.newCondition();
- private int size = 0;
+ private final Condition isEmpty = ...;
void add(Object elem) {
- lock.lock();
- try {
- // ...
- size++;
- // isEmpty.signal();
- // ...
- } finally {
- lock.unlock();
- }
+ // ...
+ // isEmpty.signal();
+ // ...
}
void remove(Object elem) throws InterruptedException {
- lock.lock();
- try {
- // ...
- while (size <= 0) {
- isEmpty.await(); // 'await()' doesn't contain corresponding 'signal()'/'signalAll()' call
- }
- size--;
- // ...
- } finally {
- lock.unlock();
- }
+ // ...
+ isEmpty.await(); // 'await()' doesn't contain corresponding 'signal()'/'signalAll()' call
+ // ...
}
}
diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/HardcodedLineSeparators.html b/plugins/InspectionGadgets/src/inspectionDescriptions/HardcodedLineSeparators.html
index 25f7ac75877e..94be41aa7b36 100644
--- a/plugins/InspectionGadgets/src/inspectionDescriptions/HardcodedLineSeparators.html
+++ b/plugins/InspectionGadgets/src/inspectionDescriptions/HardcodedLineSeparators.html
@@ -2,6 +2,12 @@
Reports the newline (\n) or return (\r) characters in a string or
character literal. These characters are commonly used as line separators, and portability may suffer if they are hardcoded.
+Example:
+
+ void test() {
+ String str = "first\nsecond\rthird";
+ }
+
diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/VariableNotUsedInsideIf.html b/plugins/InspectionGadgets/src/inspectionDescriptions/VariableNotUsedInsideIf.html index 117c84a5f3e3..1ab0e17cda78 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/VariableNotUsedInsideIf.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/VariableNotUsedInsideIf.html @@ -1,6 +1,6 @@
-Reports any references to variables that are checked for nullity +Reports any references to variables that are checked for nullability in the condition of anif statement or
conditional expression but which are not used inside the
if statement. Usually this either means that