You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2020/07/22 07:04:27 UTC
[isis] 03/09: ISIS-2222: fixes specificatoin implementations (they
were backwards)
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 4be81539b20121937a66a7ca1ab2f26926f6da3f
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Jul 22 07:09:37 2020 +0100
ISIS-2222: fixes specificatoin implementations (they were backwards)
---
.../Property/mustSatisfy/OfRetirementAgeSpecification.java | 4 ++--
.../annotDomain/Property/mustSatisfy/OfWorkingAgeSpecification.java | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mustSatisfy/OfRetirementAgeSpecification.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mustSatisfy/OfRetirementAgeSpecification.java
index 76c26b6..3b2c901 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mustSatisfy/OfRetirementAgeSpecification.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mustSatisfy/OfRetirementAgeSpecification.java
@@ -6,9 +6,9 @@ import org.apache.isis.applib.spec.AbstractSpecification;
public class OfRetirementAgeSpecification extends AbstractSpecification<Integer> {
@Override
public String satisfiesSafely(Integer candidate) {
- return candidate >= 18 && candidate <= 65
+ return candidate > 65
? null
- : "Not of working age [18-65]";
+ : "Not of retirement age (66 and older)";
}
}
//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mustSatisfy/OfWorkingAgeSpecification.java b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mustSatisfy/OfWorkingAgeSpecification.java
index 5a800c6..5597abd 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mustSatisfy/OfWorkingAgeSpecification.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotDomain/Property/mustSatisfy/OfWorkingAgeSpecification.java
@@ -6,9 +6,9 @@ import org.apache.isis.applib.spec.AbstractSpecification;
public class OfWorkingAgeSpecification extends AbstractSpecification<Integer> {
@Override
public String satisfiesSafely(Integer candidate) {
- return candidate > 65
+ return candidate >= 18 && candidate <= 65
? null
- : "Not of retirement age (66 and older)";
+ : "Not of working age [18-65]";
}
}
//end::class[]