You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2004/06/07 12:29:10 UTC
cvs commit: cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl AuthenticationProfileManager.java
cziegeler 2004/06/07 03:29:10
Modified: . status.xml
src/blocks/portal/java/org/apache/cocoon/portal/profile/impl
AuthenticationProfileManager.java
Log:
<action dev="CZ" type="fix" fixes-bug="29373">
Portal: Fix NPE when non-caching pipelines are used for the portal profile.
</action>
Revision Changes Path
1.356 +4 -1 cocoon-2.1/status.xml
Index: status.xml
===================================================================
RCS file: /home/cvs/cocoon-2.1/status.xml,v
retrieving revision 1.355
retrieving revision 1.356
diff -u -r1.355 -r1.356
--- status.xml 7 Jun 2004 09:53:33 -0000 1.355
+++ status.xml 7 Jun 2004 10:29:09 -0000 1.356
@@ -205,6 +205,9 @@
<changes>
<release version="@version@" date="@date@">
+ <action dev="CZ" type="fix" fixes-bug="29373">
+ Portal: Fix NPE when non-caching pipelines are used for the portal profile.
+ </action>
<action dev="CZ" type="fix">
Portal: Fix transformation of non-external html links (HTMLEventLinkTransformer)
</action>
1.20 +6 -4 cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java
Index: AuthenticationProfileManager.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- AuthenticationProfileManager.java 19 Mar 2004 14:21:06 -0000 1.19
+++ AuthenticationProfileManager.java 7 Jun 2004 10:29:10 -0000 1.20
@@ -306,8 +306,9 @@
Object result = this.checkValidity(key, parameters, forcedLoad, adapter);
- if (!(result instanceof SourceValidity))
+ if ( result != null && !(result instanceof SourceValidity)) {
return new Object[]{result, Boolean.FALSE};
+ }
SourceValidity newValidity = (SourceValidity)result;
this.lock.releaseReadLock();
@@ -316,8 +317,9 @@
// check validity again in case of another thread has already loaded
result = this.checkValidity(key, parameters, forcedLoad, adapter);
- if (!(result instanceof SourceValidity))
+ if ( result != null && !(result instanceof SourceValidity) ) {
return new Object[]{result, Boolean.FALSE};
+ }
newValidity = (SourceValidity)result;
Object object = adapter.loadProfile(key, parameters);
@@ -326,7 +328,7 @@
this.attributes.put(key, new Object[] {object, newValidity});
}
- return new Object[]{object, Boolean.TRUE};
+ return new Object[] {object, Boolean.TRUE};
} catch (ProfileException pe) {
this.getLogger().error("Error loading profile: " + pe.getMessage(), pe);
throw pe;