ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject ignite git commit: Fix NPE in PortableContext (affects Services tests)
Date Thu, 26 Nov 2015 16:08:44 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1956 da2df40a0 -> f88f92e75


Fix NPE in PortableContext (affects Services tests)


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f88f92e7
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f88f92e7
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f88f92e7

Branch: refs/heads/ignite-1956
Commit: f88f92e75bddd266447192def42ee8809ec61028
Parents: da2df40
Author: Pavel Tupitsyn <ptupitsyn@gridgain.com>
Authored: Thu Nov 26 19:04:11 2015 +0300
Committer: Pavel Tupitsyn <ptupitsyn@gridgain.com>
Committed: Thu Nov 26 19:04:11 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/internal/portable/PortableContext.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f88f92e7/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
index cc29e46..d82e603 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
@@ -639,7 +639,7 @@ public class PortableContext implements Externalizable {
      * @return Affinity field name or {@code null} if field name was not found.
      */
     private String affinityFieldName(Class cls) {
-        for (; cls != Object.class; cls = cls.getSuperclass()) {
+        for (; cls != Object.class && cls != null; cls = cls.getSuperclass()) {
             for (Field f : cls.getDeclaredFields()) {
                 if (f.getAnnotation(AffinityKeyMapped.class) != null)
                     return f.getName();


Mime
View raw message