Improve Message#isEmpty()
Also see having empty strings in a message as empty
This commit is contained in:
1 parent
7f065fcad1
commit
5a583e60b2
2 files changed
+7
-3
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user