浏览代码

AbstractBasicAclEntry improved compatibility with Hibernate, as per http://forum.springframework.org/viewtopic.php?t=3949.

Ben Alex 20 年之前
父节点
当前提交
df91d352cb
共有 2 个文件被更改,包括 9 次插入2 次删除
  1. 8 2
      core/src/main/java/org/acegisecurity/acl/basic/AbstractBasicAclEntry.java
  2. 1 0
      doc/xdocs/changes.xml

+ 8 - 2
core/src/main/java/org/acegisecurity/acl/basic/AbstractBasicAclEntry.java

@@ -1,4 +1,4 @@
-/* Copyright 2004 Acegi Technology Pty Limited
+/* Copyright 2004, 2005 Acegi Technology Pty Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -76,7 +76,13 @@ public abstract class AbstractBasicAclEntry implements BasicAclEntry {
         this.mask = mask;
     }
 
-    protected AbstractBasicAclEntry() {}
+    /**
+     * A protected constructor for use by Hibernate.
+     */
+    protected AbstractBasicAclEntry() {
+        validPermissions = getValidPermissions();
+        Arrays.sort(validPermissions);
+    }
 
     //~ Methods ================================================================
 

+ 1 - 0
doc/xdocs/changes.xml

@@ -29,6 +29,7 @@
       <action dev="benalex" type="fix">SecurityEnforcementFilter caused NullPointerException when anonymous authentication used with BasicProcessingFilterEntryPoint</action>
       <action dev="benalex" type="fix">FilterChainProxy now supports replacement of ServletRequest and ServetResponse by Filter beans</action>
       <action dev="benalex" type="update">ContextHolderAwareRequestWrapper methods returns null if user is anonymous</action>
+      <action dev="benalex" type="update">AbstractBasicAclEntry improved compatibility with Hibernate</action>
     </release>
     <release version="0.8.0" date="2005-03-03">
       <action dev="benalex" type="add">Added Digest Authentication support (RFC 2617 and RFC 2069)</action>