details:   https://code.openbravo.com/erp/devel/pi/rev/598eb4e615e8
changeset: 15158:598eb4e615e8
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Mon Jan 16 18:40:37 2012 +0100
summary:   Small reformatting

details:   https://code.openbravo.com/erp/devel/pi/rev/e8943696044b
changeset: 15159:e8943696044b
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Mon Jan 16 18:40:51 2012 +0100
summary:   Prevent concurrent modification error

diffstat:

 src/org/openbravo/base/model/Entity.java                |  3 ++-
 src/org/openbravo/dal/security/EntityAccessChecker.java |  2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 873a6c512e0e -r e8943696044b src/org/openbravo/base/model/Entity.java
--- a/src/org/openbravo/base/model/Entity.java  Mon Jan 16 18:39:38 2012 +0100
+++ b/src/org/openbravo/base/model/Entity.java  Mon Jan 16 18:40:51 2012 +0100
@@ -149,8 +149,9 @@
       if (p.isParent()) {
         parentProperties.add(p);
       }
-      if (p.isOrderByProperty())
+      if (p.isOrderByProperty()) {
         orderByProperties.add(p);
+      }
     }
 
     Collections.sort(identifierProperties, new Comparator<Property>() {
diff -r 873a6c512e0e -r e8943696044b 
src/org/openbravo/dal/security/EntityAccessChecker.java
--- a/src/org/openbravo/dal/security/EntityAccessChecker.java   Mon Jan 16 
18:39:38 2012 +0100
+++ b/src/org/openbravo/dal/security/EntityAccessChecker.java   Mon Jan 16 
18:40:51 2012 +0100
@@ -167,7 +167,7 @@
       }
 
       // and compute the derived readable
-      for (final Entity e : readableEntities) {
+      for (final Entity e : new ArrayList<Entity>(readableEntities)) {
         for (final Property p : e.getProperties()) {
           if (p.getTargetEntity() != null && 
!readableEntities.contains(p.getTargetEntity())) {
             derivedReadableEntities.add(p.getTargetEntity());

------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to