mnemonic-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject incubator-mnemonic git commit: MNEMONIC-72: Incorrect comparison chunk&buffer canonical name with type string
Date Tue, 28 Jun 2016 20:56:17 GMT
Repository: incubator-mnemonic
Updated Branches:
  refs/heads/master 3251359dc -> 750846d1c


MNEMONIC-72: Incorrect comparison chunk&buffer canonical name with type string


Project: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/commit/750846d1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/tree/750846d1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/diff/750846d1

Branch: refs/heads/master
Commit: 750846d1c9dfe94d93717b8c1eaed93ec990475c
Parents: 3251359
Author: Wang, Gang(Gary) <gang1.wang@intel.com>
Authored: Tue Jun 28 13:53:04 2016 -0700
Committer: Wang, Gang(Gary) <gang1.wang@intel.com>
Committed: Tue Jun 28 13:53:04 2016 -0700

----------------------------------------------------------------------
 .../org/apache/mnemonic/AnnotatedDurableEntityClass.java     | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/750846d1/mnemonic-core/src/main/java/org/apache/mnemonic/AnnotatedDurableEntityClass.java
----------------------------------------------------------------------
diff --git a/mnemonic-core/src/main/java/org/apache/mnemonic/AnnotatedDurableEntityClass.java
b/mnemonic-core/src/main/java/org/apache/mnemonic/AnnotatedDurableEntityClass.java
index 1876551..702484c 100644
--- a/mnemonic-core/src/main/java/org/apache/mnemonic/AnnotatedDurableEntityClass.java
+++ b/mnemonic-core/src/main/java/org/apache/mnemonic/AnnotatedDurableEntityClass.java
@@ -483,7 +483,7 @@ public class AnnotatedDurableEntityClass {
         code.addStatement(codefmt, unsafename, holdername, dynfieldinfo.fieldoff,
             transTypeToUnsafeMethod(ftname, true));
       } else {
-        if (methodinfo.rettype.toString().equals(MemChunkHolder.class.getCanonicalName()))
{
+        if (methodinfo.rettype.toString().startsWith(MemChunkHolder.class.getCanonicalName()))
{
           code.beginControlFlow("if (null == $1N)", dynfieldinfo.name);
           code.addStatement("long phandler = $1N.getAddress($2N.get() + $3L)", unsafename,
holdername,
               dynfieldinfo.fieldoff);
@@ -493,7 +493,7 @@ public class AnnotatedDurableEntityClass {
           code.endControlFlow();
           code.endControlFlow();
           code.addStatement("return $1N", dynfieldinfo.name);
-        }  else if (methodinfo.rettype.toString().equals(MemBufferHolder.class.getCanonicalName()))
{
+        }  else if (methodinfo.rettype.toString().startsWith(MemBufferHolder.class.getCanonicalName()))
{
           code.beginControlFlow("if (null == $1N)", dynfieldinfo.name);
           code.addStatement("long phandler = $1N.getAddress($2N.get() + $3L)", unsafename,
holdername,
               dynfieldinfo.fieldoff);
@@ -600,7 +600,7 @@ public class AnnotatedDurableEntityClass {
           throw new AnnotationProcessingException(null, "%s's setter has no second parameters
for non primitive type.",
               name);
         }
-        if (valtname.toString().equals(MemChunkHolder.class.getCanonicalName())) {
+        if (valtname.toString().startsWith(MemChunkHolder.class.getCanonicalName())) {
           code.beginControlFlow("if ($1L && null != $2L())", arg1, gsetterName(name,
true));
           code.addStatement("$1N.destroy()", dynfieldinfo.name);
           code.addStatement("$1N = null", dynfieldinfo.name);
@@ -612,7 +612,7 @@ public class AnnotatedDurableEntityClass {
           code.addStatement("$1N = $2L", dynfieldinfo.name, arg0);
           code.addStatement("$1N.putLong($2N.get() + $3L, null == $4N ? 0L : $5N.getChunkHandler($4N))",
               unsafename, holdername, dynfieldinfo.fieldoff, dynfieldinfo.name, allocname);
-        } else if (valtname.toString().equals(MemBufferHolder.class.getCanonicalName()))
{
+        } else if (valtname.toString().startsWith(MemBufferHolder.class.getCanonicalName()))
{
           code.beginControlFlow("if ($1L && null != $2L())", arg1, gsetterName(name,
true));
           code.addStatement("$1N.destroy()", dynfieldinfo.name);
           code.addStatement("$1N = null", dynfieldinfo.name);


Mime
View raw message