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-254: Avoid loops in set functions for cyclic structures
Date Mon, 01 May 2017 18:23:46 GMT
Repository: incubator-mnemonic
Updated Branches:
  refs/heads/master 731bb8091 -> fa04538db


MNEMONIC-254: Avoid loops in set functions for cyclic structures


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

Branch: refs/heads/master
Commit: fa04538dbd7420c7e84803826608283ab68b4081
Parents: 731bb80
Author: Johnu George <johnugeo@cisco.com>
Authored: Fri Apr 28 22:55:08 2017 -0700
Committer: Johnu George <johnugeo@cisco.com>
Committed: Fri Apr 28 22:55:08 2017 -0700

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


http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/fa04538d/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 f8b145d..7158a5c 100644
--- a/mnemonic-core/src/main/java/org/apache/mnemonic/AnnotatedDurableEntityClass.java
+++ b/mnemonic-core/src/main/java/org/apache/mnemonic/AnnotatedDurableEntityClass.java
@@ -693,11 +693,15 @@ public class AnnotatedDurableEntityClass {
               holdername, dynfieldinfo.fieldoff, dynfieldinfo.name);
           code.beginControlFlow("if (null != $1L)", dynfieldinfo.name);
           code.beginControlFlow("if ($1N)", autoreclaimname);
+          code.beginControlFlow("if (!$1N.autoReclaim())", dynfieldinfo.name);
           code.addStatement("$1N.registerAutoReclaim();", dynfieldinfo.name);
+          code.endControlFlow();
           code.nextControlFlow("else");
+          code.beginControlFlow("if ($1N.autoReclaim())", dynfieldinfo.name);
           code.addStatement("$1N.cancelAutoReclaim();", dynfieldinfo.name);
           code.endControlFlow();
           code.endControlFlow();
+          code.endControlFlow();
         }
       }
       typespecbuilder.addMethod(methodinfo.specbuilder.addCode(code.build()).build());


Mime
View raw message