You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by sy...@apache.org on 2001/09/19 16:46:37 UTC
cvs commit: xml-cocoon2/src/org/apache/cocoon/selection BrowserSelectorFactory.java HeaderSelectorFactory.java HostSelectorFactory.java RequestSelectorFactory.java SessionAttributeSelectorFactory.java
sylvain 01/09/19 07:46:37
Modified: src/org/apache/cocoon/components/language/markup/xsp/java
xsp.xsl
src/org/apache/cocoon/matching BrowserMatcherFactory.java
WildcardHeaderMatcherFactory.java
WildcardParameterValueMatcherFactory.java
WildcardSessionAttributeMatcherFactory.java
src/org/apache/cocoon/selection BrowserSelectorFactory.java
HeaderSelectorFactory.java HostSelectorFactory.java
RequestSelectorFactory.java
SessionAttributeSelectorFactory.java
Log:
Fix for bug #3138 : test for null nodes in factories configuration NodeList
Revision Changes Path
1.9 +2 -2 xml-cocoon2/src/org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl
Index: xsp.xsl
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- xsp.xsl 2001/09/14 12:58:33 1.8
+++ xsp.xsl 2001/09/19 14:46:37 1.9
@@ -12,7 +12,7 @@
<!--
* @author <a href="mailto:ricardo@apache.org>Ricardo Rocha</a>
* @author <a href="sylvain.wallez@anyware-tech.com">Sylvain Wallez</a>
- * @version CVS $Revision: 1.8 $ $Date: 2001/09/14 12:58:33 $
+ * @version CVS $Revision: 1.9 $ $Date: 2001/09/19 14:46:37 $
-->
<!-- XSP Core logicsheet for the Java language -->
@@ -145,7 +145,7 @@
<xsl:for-each select="$content/namespace::*">
<xsl:variable name="ns-prefix" select="local-name(.)"/>
<xsl:variable name="ns-uri" select="string(.)"/>
- <xsl:if test="$parent-element/namespace::*[local-name(.) = $ns-prefix and string(.) = $ns-uri]">
+ <xsl:if test="($ns-prefix != 'xmlns') and $parent-element/namespace::*[local-name(.) = $ns-prefix and string(.) = $ns-uri]">
this.contentHandler.endPrefixMapping(
"<xsl:value-of select="local-name(.)"/>"
);
1.4 +3 -1 xml-cocoon2/src/org/apache/cocoon/matching/BrowserMatcherFactory.java
Index: BrowserMatcherFactory.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/matching/BrowserMatcherFactory.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- BrowserMatcherFactory.java 2001/08/20 13:55:16 1.3
+++ BrowserMatcherFactory.java 2001/09/19 14:46:37 1.4
@@ -19,7 +19,7 @@
*
* @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version CVS $Revision: 1.3 $ $Date: 2001/08/20 13:55:16 $
+ * @version CVS $Revision: 1.4 $ $Date: 2001/09/19 14:46:37 $
*/
public class BrowserMatcherFactory implements CodeFactory {
@@ -35,6 +35,8 @@
int count = conf.getLength();
for(int k = 0; k < count;k++) {
node = conf.item(k);
+ if (node == null)
+ continue;
sb.append("name=")
.append(node.getNodeName())
.append(" type=")
1.5 +3 -2 xml-cocoon2/src/org/apache/cocoon/matching/WildcardHeaderMatcherFactory.java
Index: WildcardHeaderMatcherFactory.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/matching/WildcardHeaderMatcherFactory.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- WildcardHeaderMatcherFactory.java 2001/09/18 14:47:00 1.4
+++ WildcardHeaderMatcherFactory.java 2001/09/19 14:46:37 1.5
@@ -22,7 +22,7 @@
* </table>
*
* @author <a href="mailto:haul@informatik.tu-darmstadt.de">Christian Haul</a>
- * @version CVS $Revision: 1.4 $ $Date: 2001/09/18 14:47:00 $
+ * @version CVS $Revision: 1.5 $ $Date: 2001/09/19 14:46:37 $
*/
public class WildcardHeaderMatcherFactory extends WildcardURIMatcherFactory {
@@ -62,7 +62,8 @@
int count = conf.getLength();
for(int k = 0; k < count;k++) {
Node node = conf.item(k);
- if (node.getNodeName() != null &&
+ if (node != null &&
+ node.getNodeName() != null &&
node.getNodeName().equals("parameter-name"))
{
Node textNode = node.getFirstChild();
1.5 +3 -2 xml-cocoon2/src/org/apache/cocoon/matching/WildcardParameterValueMatcherFactory.java
Index: WildcardParameterValueMatcherFactory.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/matching/WildcardParameterValueMatcherFactory.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- WildcardParameterValueMatcherFactory.java 2001/09/18 14:47:00 1.4
+++ WildcardParameterValueMatcherFactory.java 2001/09/19 14:46:37 1.5
@@ -26,7 +26,7 @@
* </table>
*
* @author <a href="mailto:haul@informatik.tu-darmstadt.de">Christian Haul</a>
- * @version CVS $Revision: 1.4 $ $Date: 2001/09/18 14:47:00 $ */
+ * @version CVS $Revision: 1.5 $ $Date: 2001/09/19 14:46:37 $ */
public class WildcardParameterValueMatcherFactory extends WildcardURIMatcherFactory {
@@ -41,7 +41,8 @@
int count = conf.getLength();
for(int k = 0; k < count;k++) {
Node node = conf.item(k);
- if (node.getNodeName() != null &&
+ if (node != null &&
+ node.getNodeName() != null &&
node.getNodeName().equals("parameter-name"))
{
Node textNode = node.getFirstChild();
1.2 +3 -2 xml-cocoon2/src/org/apache/cocoon/matching/WildcardSessionAttributeMatcherFactory.java
Index: WildcardSessionAttributeMatcherFactory.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/matching/WildcardSessionAttributeMatcherFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- WildcardSessionAttributeMatcherFactory.java 2001/09/18 14:47:00 1.1
+++ WildcardSessionAttributeMatcherFactory.java 2001/09/19 14:46:37 1.2
@@ -21,7 +21,7 @@
* </table>
*
* @author <a href="mailto:haul@informatik.tu-darmstadt.de">Christian Haul</a>
- * @version CVS $Revision: 1.1 $ $Date: 2001/09/18 14:47:00 $
+ * @version CVS $Revision: 1.2 $ $Date: 2001/09/19 14:46:37 $
*/
public class WildcardSessionAttributeMatcherFactory extends WildcardURIMatcherFactory {
@@ -37,7 +37,8 @@
int count = conf.getLength();
for(int k = 0; k < count;k++) {
Node node = conf.item(k);
- if (node.getNodeName() != null &&
+ if (node != null &&
+ node.getNodeName() != null &&
node.getNodeName().equals("attribute-name"))
{
Node textNode = node.getFirstChild();
1.3 +3 -2 xml-cocoon2/src/org/apache/cocoon/selection/BrowserSelectorFactory.java
Index: BrowserSelectorFactory.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/selection/BrowserSelectorFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- BrowserSelectorFactory.java 2001/08/20 13:55:16 1.2
+++ BrowserSelectorFactory.java 2001/09/19 14:46:37 1.3
@@ -20,7 +20,7 @@
* @author <a href="mailto:cziegeler@sundn.de">Carsten Ziegeler</a>
* @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version CVS $Revision: 1.2 $ $Date: 2001/08/20 13:55:16 $
+ * @version CVS $Revision: 1.3 $ $Date: 2001/09/19 14:46:37 $
*/
@@ -45,7 +45,8 @@
int count = conf.getLength();
for(int k = 0; k < count;k++) {
node = conf.item(k);
- if (node.getNodeName().equals("browser") &&
+ if (node != null &&
+ node.getNodeName().equals("browser") &&
node.getNodeType() == Node.ELEMENT_NODE) {
nm = node.getAttributes();
if (nm != null) {
1.5 +3 -2 xml-cocoon2/src/org/apache/cocoon/selection/HeaderSelectorFactory.java
Index: HeaderSelectorFactory.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/selection/HeaderSelectorFactory.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- HeaderSelectorFactory.java 2001/09/18 14:47:00 1.4
+++ HeaderSelectorFactory.java 2001/09/19 14:46:37 1.5
@@ -22,7 +22,7 @@
* </table>
*
* @author <a href="mailto:haul@informatik.tu-darmstadt.de">Christian Haul</a>
- * @version CVS $Revision: 1.4 $ $Date: 2001/09/18 14:47:00 $
+ * @version CVS $Revision: 1.5 $ $Date: 2001/09/19 14:46:37 $
*/
public class HeaderSelectorFactory extends ParameterSelectorFactory {
@@ -34,7 +34,8 @@
int count = conf.getLength();
for(int k = 0; k < count;k++) {
Node node = conf.item(k);
- if (node.getNodeName() != null &&
+ if (node != null &&
+ node.getNodeName() != null &&
node.getNodeName().equals("parameter-name"))
{
Node textNode = node.getFirstChild();
1.4 +3 -2 xml-cocoon2/src/org/apache/cocoon/selection/HostSelectorFactory.java
Index: HostSelectorFactory.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/selection/HostSelectorFactory.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- HostSelectorFactory.java 2001/08/20 13:55:16 1.3
+++ HostSelectorFactory.java 2001/09/19 14:46:37 1.4
@@ -32,7 +32,7 @@
* </map:select>
*
* @author <a href="mailto:cbritton@centervilletech.com">Colin Britton</a>
- * @version CVS $Revision: 1.3 $ $Date: 2001/08/20 13:55:16 $
+ * @version CVS $Revision: 1.4 $ $Date: 2001/09/19 14:46:37 $
*/
@@ -57,7 +57,8 @@
int count = conf.getLength();
for(int k = 0; k < count;k++) {
node = conf.item(k);
- if (node.getNodeName().equals("host") &&
+ if (node != null &&
+ node.getNodeName().equals("host") &&
node.getNodeType() == Node.ELEMENT_NODE) {
nm = node.getAttributes();
if (nm != null) {
1.5 +3 -2 xml-cocoon2/src/org/apache/cocoon/selection/RequestSelectorFactory.java
Index: RequestSelectorFactory.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/selection/RequestSelectorFactory.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- RequestSelectorFactory.java 2001/09/18 14:47:00 1.4
+++ RequestSelectorFactory.java 2001/09/19 14:46:37 1.5
@@ -22,7 +22,7 @@
* </table>
*
* @author <a href="mailto:haul@informatik.tu-darmstadt.de">Christian Haul</a>
- * @version CVS $Revision: 1.4 $ $Date: 2001/09/18 14:47:00 $
+ * @version CVS $Revision: 1.5 $ $Date: 2001/09/19 14:46:37 $
*/
public class RequestSelectorFactory extends ParameterSelectorFactory {
@@ -34,7 +34,8 @@
int count = conf.getLength();
for(int k = 0; k < count;k++) {
Node node = conf.item(k);
- if (node.getNodeName() != null &&
+ if (node != null &&
+ node.getNodeName() != null &&
node.getNodeName().equals("parameter-name"))
{
Node textNode = node.getFirstChild();
1.2 +4 -2 xml-cocoon2/src/org/apache/cocoon/selection/SessionAttributeSelectorFactory.java
Index: SessionAttributeSelectorFactory.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/selection/SessionAttributeSelectorFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SessionAttributeSelectorFactory.java 2001/09/18 14:47:00 1.1
+++ SessionAttributeSelectorFactory.java 2001/09/19 14:46:37 1.2
@@ -21,7 +21,8 @@
* </table>
*
* @author <a href="mailto:haul@informatik.tu-darmstadt.de">Christian Haul</a>
- * @version CVS $Revision: 1.1 $ $Date: 2001/09/18 14:47:00 $ */
+ * @version CVS $Revision: 1.2 $ $Date: 2001/09/19 14:46:37 $
+ */
public class SessionAttributeSelectorFactory extends ParameterSelectorFactory {
public String generateMethodSource (NodeList conf)
@@ -32,7 +33,8 @@
int count = conf.getLength();
for(int k = 0; k < count;k++) {
Node node = conf.item(k);
- if (node.getNodeName() != null &&
+ if (node != null &&
+ node.getNodeName() != null &&
node.getNodeName().equals("attribute-name"))
{
Node textNode = node.getFirstChild();
----------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org