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 2015/03/28 10:08:13 UTC
[1/2] isis git commit: ExceptionRecognizerComposite: NPE if container
is null
Repository: isis
Updated Branches:
refs/heads/master e9d63719a -> 0be6486e8
ExceptionRecognizerComposite: NPE if container is null
I have implemented ApplicationTenancy.
When directly introducing the URL of an entity whose access is forbidden for me (i.e., http://localhost:8080/entity/KIT_:L_2) throws a NullPointerException.
Perhaps the root cause is different.
But simply by evaluating if is null, it properly shows the error message ("Not authorized or no such object") instead of a HTTP 500 with a NullPointerException in the log.
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/d3b8decc
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/d3b8decc
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/d3b8decc
Branch: refs/heads/master
Commit: d3b8deccb8cab77c6a358c56386dfa00544ee938
Parents: dd1754e
Author: Óscar Bou <o....@gesconsultor.com>
Authored: Sat Mar 28 02:24:47 2015 +0100
Committer: Óscar Bou <o....@gesconsultor.com>
Committed: Sat Mar 28 02:24:47 2015 +0100
----------------------------------------------------------------------
.../applib/services/exceprecog/ExceptionRecognizerComposite.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/d3b8decc/core/applib/src/main/java/org/apache/isis/applib/services/exceprecog/ExceptionRecognizerComposite.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/exceprecog/ExceptionRecognizerComposite.java b/core/applib/src/main/java/org/apache/isis/applib/services/exceprecog/ExceptionRecognizerComposite.java
index dcdd2d2..9232744 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/exceprecog/ExceptionRecognizerComposite.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/exceprecog/ExceptionRecognizerComposite.java
@@ -117,7 +117,8 @@ public class ExceptionRecognizerComposite implements ExceptionRecognizer2 {
private void injectServicesIfNecessary() {
if(!injected) {
for (final ExceptionRecognizer ers : exceptionRecognizers) {
- container.injectServicesInto(ers);
+ if (container != null)
+ container.injectServicesInto(ers);
}
injected = true;
}
[2/2] isis git commit: ISIS-1108: adding NPE guard to allow for the
usage of ExceptionRecognizerComposite whereby it is simply instantiated and
used as a wrapper around other instances of ExceptionRecognizer that have
already been injected into.
Posted by da...@apache.org.
ISIS-1108: adding NPE guard to allow for the usage of ExceptionRecognizerComposite whereby it is simply instantiated and used as a wrapper around other instances of ExceptionRecognizer that have already been injected into.
This is done in several places in the Wicket viewer: EntityPropertiesForm, ActionPanel, WebRequestCycleForIsis
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/0be6486e
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/0be6486e
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/0be6486e
Branch: refs/heads/master
Commit: 0be6486e8e853cf85f0f4acf3fbbdffbdd85b273
Parents: e9d6371 d3b8dec
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sat Mar 28 09:00:13 2015 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sat Mar 28 09:02:43 2015 +0000
----------------------------------------------------------------------
.../applib/services/exceprecog/ExceptionRecognizerComposite.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------