cmailleux 2005/02/17 15:04:49 CET
Modified files:
war/src/java/com/codeva/webapps/webclipping Rewriter.java
Log:
Correct a null pointer exception when searching a tag and not containing
searched attribute
Revision Changes Path
1.4 +1 -1
webclipping/war/src/java/com/codeva/webapps/webclipping/Rewriter.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/webclipping/war/src/java/com/codeva/webapps/webclipping/Rewriter.java.diff?r1=1.3&r2=1.4&f=h
Index: Rewriter.java
===================================================================
RCS file:
/home/cvs/repository/webclipping/war/src/java/com/codeva/webapps/webclipping/Rewriter.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Rewriter.java 16 Feb 2005 10:46:17 -0000 1.3
+++ Rewriter.java 17 Feb 2005 14:04:48 -0000 1.4
@@ -236,7 +236,7 @@
// Get the list of attributes to ensure that is the
right tag
Attributes attributes = startTag.getAttributes();
Attribute attribute = attributes.get(attributeName);
- if
(attribute.getValue().equalsIgnoreCase(attributeValue)) {
+ if (attribute != null &&
attribute.getValue().equalsIgnoreCase(attributeValue)) {
startPos = startTag.getBegin();
endPos = startTag.findEndTag().getBegin();
outputDocument = trunk(content, startTag);