Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MYFACES-3697: Error while parsing Facelet-Lib hides the real reason w…

…hen logging

 - using the constructor to set the cause
 - using SAXParseException instead of SAXException

git-svn-id: https://svn.apache.org/repos/asf/myfaces/core/trunk@1448215 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
commit 9276e1db9f6e65b374b29a88d4a8686d662f9616 1 parent 6ebed8b
Udo Schnurpfeil authored
58 impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TagLibraryConfig.java
@@ -18,31 +18,6 @@
18 18 */
19 19 package org.apache.myfaces.view.facelets.compiler;
20 20
21   -import java.io.IOException;
22   -import java.io.InputStream;
23   -import java.lang.reflect.Method;
24   -import java.net.URL;
25   -import java.net.URLConnection;
26   -import java.util.Collection;
27   -import java.util.logging.Level;
28   -import java.util.logging.Logger;
29   -import java.util.regex.Pattern;
30   -
31   -import javax.faces.FacesException;
32   -import javax.faces.application.Resource;
33   -import javax.faces.application.ResourceHandler;
34   -import javax.faces.application.ViewHandler;
35   -import javax.faces.context.ExternalContext;
36   -import javax.faces.context.FacesContext;
37   -import javax.faces.view.facelets.ComponentConfig;
38   -import javax.faces.view.facelets.FaceletHandler;
39   -import javax.faces.view.facelets.Tag;
40   -import javax.faces.view.facelets.TagConfig;
41   -import javax.faces.view.facelets.TagHandler;
42   -import javax.xml.parsers.ParserConfigurationException;
43   -import javax.xml.parsers.SAXParser;
44   -import javax.xml.parsers.SAXParserFactory;
45   -
46 21 import org.apache.myfaces.config.ConfigFilesXmlValidationUtils;
47 22 import org.apache.myfaces.shared.config.MyfacesConfig;
48 23 import org.apache.myfaces.shared.util.ArrayUtils;
@@ -57,14 +32,29 @@
57 32 import org.apache.myfaces.view.facelets.tag.composite.CompositeResouceWrapper;
58 33 import org.apache.myfaces.view.facelets.util.ParameterCheck;
59 34 import org.apache.myfaces.view.facelets.util.ReflectionUtil;
60   -import org.xml.sax.Attributes;
61   -import org.xml.sax.InputSource;
62   -import org.xml.sax.Locator;
63   -import org.xml.sax.SAXException;
64   -import org.xml.sax.SAXParseException;
65   -import org.xml.sax.XMLReader;
  35 +import org.xml.sax.*;
66 36 import org.xml.sax.helpers.DefaultHandler;
67 37
  38 +import javax.faces.FacesException;
  39 +import javax.faces.application.Resource;
  40 +import javax.faces.application.ResourceHandler;
  41 +import javax.faces.application.ViewHandler;
  42 +import javax.faces.context.ExternalContext;
  43 +import javax.faces.context.FacesContext;
  44 +import javax.faces.view.facelets.*;
  45 +import javax.xml.parsers.ParserConfigurationException;
  46 +import javax.xml.parsers.SAXParser;
  47 +import javax.xml.parsers.SAXParserFactory;
  48 +import java.io.IOException;
  49 +import java.io.InputStream;
  50 +import java.lang.reflect.Method;
  51 +import java.net.URL;
  52 +import java.net.URLConnection;
  53 +import java.util.Collection;
  54 +import java.util.logging.Level;
  55 +import java.util.logging.Logger;
  56 +import java.util.regex.Pattern;
  57 +
68 58 /**
69 59 * Handles creating a {@link org.apache.myfaces.view.facelets.tag.TagLibrary TagLibrary}
70 60 * from a {@link java.net.URL URL} source.
@@ -618,10 +608,8 @@ else if ("function-signature".equals(qName))
618 608 }
619 609 catch (Exception e)
620 610 {
621   - SAXException saxe = new SAXException("Error Handling [" + this.source + "@"
622   - + this.locator.getLineNumber() + "," + this.locator.getColumnNumber() + "] <" + qName + ">");
623   - saxe.initCause(e);
624   - throw saxe;
  611 + throw new SAXParseException("Error Handling [" + this.source + "@" + this.locator.getLineNumber()
  612 + + "," + this.locator.getColumnNumber() + "] <" + qName + ">", locator, e);
625 613 }
626 614 }
627 615

0 comments on commit 9276e1d

Please sign in to comment.
Something went wrong with that request. Please try again.