You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2014/06/30 18:28:56 UTC

git commit: [OLINGO-293] Fix Null Pointer Exception in JPA Error Callback

Repository: olingo-odata2
Updated Branches:
  refs/heads/master 9b6e92a68 -> 418c631c8


[OLINGO-293] Fix Null Pointer Exception in JPA Error Callback


Signed-off-by: Chandan V A <ch...@sap.com>

Project: http://git-wip-us.apache.org/repos/asf/olingo-odata2/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata2/commit/418c631c
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata2/tree/418c631c
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata2/diff/418c631c

Branch: refs/heads/master
Commit: 418c631c8ec0b72fbb50e0ee88ec799b50c3a6fe
Parents: 9b6e92a
Author: Chandan V A <ch...@sap.com>
Authored: Mon Jun 30 21:58:49 2014 +0530
Committer: Chandan V A <ch...@sap.com>
Committed: Mon Jun 30 21:58:49 2014 +0530

----------------------------------------------------------------------
 .../odata2/jpa/processor/api/exception/ODataJPAErrorCallback.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/418c631c/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/exception/ODataJPAErrorCallback.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/exception/ODataJPAErrorCallback.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/exception/ODataJPAErrorCallback.java
index 6d7e737..4482f61 100644
--- a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/exception/ODataJPAErrorCallback.java
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/exception/ODataJPAErrorCallback.java
@@ -32,7 +32,7 @@ public class ODataJPAErrorCallback implements ODataErrorCallback {
     final String SEPARATOR = " : ";
 
     Throwable t = context.getException();
-    if (t instanceof ODataJPAException) {
+    if (t instanceof ODataJPAException && t.getCause() != null) {
       StringBuilder errorBuilder = new StringBuilder();
       errorBuilder.append(t.getCause().getClass().toString());
       errorBuilder.append(SEPARATOR);