This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/causeway.git
The following commit(s) were added to refs/heads/master by this push:
new 5152409deb CAUSEWAY-3790: fixes invalid use of equals in
ConsentAbstract
5152409deb is described below
commit 5152409debcef94e0dd1dc1296496bb9a4cc2fed
Author: Andi Huber <[email protected]>
AuthorDate: Wed Jun 26 11:25:04 2024 +0200
CAUSEWAY-3790: fixes invalid use of equals in ConsentAbstract
---
.../org/apache/causeway/core/metamodel/consent/ConsentAbstract.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/consent/ConsentAbstract.java
b/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/consent/ConsentAbstract.java
index 04b87db2e3..63d3014ebb 100644
---
a/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/consent/ConsentAbstract.java
+++
b/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/consent/ConsentAbstract.java
@@ -23,6 +23,8 @@ import java.util.Optional;
import org.springframework.lang.Nullable;
+import org.apache.causeway.commons.internal.base._Strings;
+
public abstract class ConsentAbstract implements Serializable, Consent {
private static final long serialVersionUID = 1L;
@@ -108,7 +110,8 @@ public abstract class ConsentAbstract implements
Serializable, Consent {
*/
@Override
public boolean isAllowed() {
- return this.reason == null || this.reason.equals("");
+ return this.reason == null
+ || _Strings.isEmpty(this.reason.string());
}
/**