From 362c4210a5bec27d05912b5407ff325d2a6c17b5 Mon Sep 17 00:00:00 2001 From: chrisly42 Date: Wed, 1 May 2019 13:07:05 +0200 Subject: [PATCH] Fixed isEmpty() for enumerables and strings and isNull() for object conversions to be applied only if it is the terminal method call as isEmpty() and isNull() return void. --- README.md | 1 + build.gradle | 1 + .../inspections/AssertThatEnumerableIsEmptyInspection.kt | 4 +++- .../AssertThatObjectIsNullOrNotNullInspection.kt | 8 +++----- .../inspections/AssertThatStringIsEmptyInspection.kt | 4 +++- .../AssertThatEnumerableIsEmptyInspectionTest.kt | 2 +- .../AssertThatObjectIsNullOrNotNullInspectionTest.kt | 2 +- .../inspections/AssertThatStringIsEmptyInspectionTest.kt | 4 ++-- .../EnumerableIsEmpty/EnumerableIsEmptyAfter.java | 2 ++ .../EnumerableIsEmpty/EnumerableIsEmptyBefore.java | 2 ++ .../ObjectIsNullOrNotNull/ObjectIsNullOrNotNullAfter.java | 1 + .../ObjectIsNullOrNotNullBefore.java | 1 + .../inspections/StringIsEmpty/StringIsEmptyAfter.java | 3 +++ .../inspections/StringIsEmpty/StringIsEmptyBefore.java | 3 +++ 14 files changed, 27 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 0a341dd..bf58809 100644 --- a/README.md +++ b/README.md @@ -345,6 +345,7 @@ Feel free to use the code (in package de.platon42.intellij.jupiter) for your pro #### V0.8 (unreleased) - Fixed missing description for JoinAssertThatStatements and detection of equivalent expressions (sorry, released it too hastily). +- Fixed ```isEmpty()``` for enumerables and strings and ```isNull()``` for object conversions to be applied only if it is the terminal method call as ```isEmpty()``` and ```isNull()``` return void. #### V0.7 (28-Apr-19) - Another fix for AssertThatGuavaOptional inspection regarding using the same family name for slightly different quick fix executions diff --git a/build.gradle b/build.gradle index 097d173..8fc348a 100644 --- a/build.gradle +++ b/build.gradle @@ -43,6 +43,7 @@ patchPluginXml {

V0.8 (unreleased)

V0.7 (28-Apr-19)