Improve Message#isEmpty()

Also see having empty strings in a message as empty
This commit is contained in:
Thijs Wiefferink committed 2017-02-04 21:44:29 +01:00
1 parent 7f065fcad1
commit 5a583e60b2
2 files changed
+7 -3

No files matched your search

+1 -2
View File
@@ -26,7 +26,6 @@
<version>1.8-R0.1-SNAPSHOT</version>
<type>jar</type>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<!-- Google Gson, only used for the tests -->
@@ -74,7 +73,7 @@
</build>
</profile>
<!-- Produce javadoc files, activate by using -Djavadoc -->
<!-- Produce javadoc files, activate by using -Djavadoc=path/to/directory -->
<profile>
<id>generate-javadoc</id>
<activation>
@@ -201,7 +201,12 @@ public class Message {
* @return true if the message is empty, otherwise false
*/
public boolean isEmpty() {
return message.isEmpty();
for(String part : message) {
if(!part.isEmpty()) {
return false;
}
}
return true;
}
/**