JSEC-39 - had AuthenticationInfo and AuthorizationInfo extend Serializable.  Also updated the NOTICE file to reflect Dr. Heinz Kabut's permission for us to use his source code to seed our SoftHashMap implementation.

git-svn-id: https://svn.apache.org/repos/asf/incubator/jsecurity/trunk@733419 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/NOTICE.txt b/NOTICE.txt
index e3de044..fbe4f1e 100644
--- a/NOTICE.txt
+++ b/NOTICE.txt
@@ -3,3 +3,14 @@
 

 This product includes software developed at

 The Apache Software Foundation (http://www.apache.org/).

+

+This product includes a org.jsecurity.util.SoftHashMap

+implementation based on initial ideas from Dr. Hienz Kabutz's

+public posted version found here:

+    http://www.javaspecialists.eu/archive/Issue015.html)

+with continued modifications.  Per Heinz Kabutz: "you have my

+express permission to publish it in Apache JSecurity - please

+leave a link in the source code pointing to my website:

+    http://www.javaspecialists.eu

+

+

diff --git a/core/src/org/jsecurity/authc/AuthenticationInfo.java b/core/src/org/jsecurity/authc/AuthenticationInfo.java
index eacc7d6..ab2e3b0 100644
--- a/core/src/org/jsecurity/authc/AuthenticationInfo.java
+++ b/core/src/org/jsecurity/authc/AuthenticationInfo.java
@@ -21,6 +21,8 @@
 
 import org.jsecurity.subject.PrincipalCollection;
 
+import java.io.Serializable;
+
 /**
  * <code>AuthenticationInfo</code> represents a Subject's (aka user's) stored account information relevant to the
  * authentication/log-in process only.
@@ -55,7 +57,7 @@
  * @see Account
  * @since 0.9
  */
-public interface AuthenticationInfo {
+public interface AuthenticationInfo extends Serializable {
 
     /**
      * Returns all principals associated with the corresponding Subject.  Each principal is an identifying piece of
diff --git a/core/src/org/jsecurity/authz/AuthorizationInfo.java b/core/src/org/jsecurity/authz/AuthorizationInfo.java
index 726c200..7811306 100644
--- a/core/src/org/jsecurity/authz/AuthorizationInfo.java
+++ b/core/src/org/jsecurity/authz/AuthorizationInfo.java
@@ -18,6 +18,7 @@
  */
 package org.jsecurity.authz;
 
+import java.io.Serializable;
 import java.util.Collection;
 
 /**
@@ -56,7 +57,7 @@
  * @see org.jsecurity.authc.Account
  * @since 0.9
  */
-public interface AuthorizationInfo {
+public interface AuthorizationInfo extends Serializable {
 
     /**
      * Returns the names of all roles assigned to a corresponding Subject.
diff --git a/core/src/org/jsecurity/util/SoftHashMap.java b/core/src/org/jsecurity/util/SoftHashMap.java
index 0b67f2f..55ba66b 100644
--- a/core/src/org/jsecurity/util/SoftHashMap.java
+++ b/core/src/org/jsecurity/util/SoftHashMap.java
@@ -140,17 +140,14 @@
     public V put(K key, V value) {
         processQueue(); // throw out garbage collected values first
         SoftValue<V, K> sv = new SoftValue<V, K>(value, key, queue);
-        return map.put(key, sv).get();
+        SoftValue<V, K> previous = map.put(key, sv);
+        return previous != null ? previous.get() : null;
     }
 
     public V remove(Object key) {
         processQueue(); // throw out garbage collected values first
         SoftValue<V, K> raw = map.remove(key);
-        V removed = null;
-        if (raw != null) {
-            removed = raw.get();
-        }
-        return removed;
+        return raw != null ? raw.get() : null;
     }
 
     public void clear() {
diff --git a/jsecurity.ipr b/jsecurity.ipr
index 25187c8..54dcac3 100644
--- a/jsecurity.ipr
+++ b/jsecurity.ipr
@@ -528,9 +528,12 @@
       <jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" />
     </library>
     <library name="quickstart-libs">
-      <CLASSES />
+      <CLASSES>
+        <root url="file://$PROJECT_DIR$/lib/samples" />
+      </CLASSES>
       <JAVADOC />
       <SOURCES />
+      <jarDirectory url="file://$PROJECT_DIR$/lib/samples" recursive="false" />
     </library>
   </component>
 </project>