1 diff -ru pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlReadHandler.java pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlReadHandler.java
2 --- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlReadHandler.java 2021-04-07 11:34:22.313653786 +0100
3 +++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlReadHandler.java 2021-04-07 11:48:16.381234640 +0100
5 import java.util.HashMap;
8 -import org.apache.commons.logging.Log;
9 -import org.apache.commons.logging.LogFactory;
10 +import java.util.logging.Level;
11 +import java.util.logging.Logger;
12 import org.pentaho.reporting.libraries.resourceloader.DependencyCollector;
13 import org.pentaho.reporting.libraries.resourceloader.FactoryParameterKey;
14 import org.pentaho.reporting.libraries.resourceloader.Resource;
17 public abstract class AbstractXmlReadHandler implements XmlReadHandler
19 - private static final Log logger = LogFactory.getLog(AbstractXmlReadHandler.class);
20 + private static final Logger logger = Logger.getLogger(AbstractXmlReadHandler.class.getName());
25 final XmlReadHandler childHandler = getHandlerForChild(uri, tagName, attrs);
26 if (childHandler == null)
28 - logger.warn("Unknown tag <" + uri + ':' + tagName + ">: Start to ignore this element and all of its childs. " + getLocatorString());
29 - logger.debug(this.getClass());
30 + logger.warning("Unknown tag <" + uri + ':' + tagName + ">: Start to ignore this element and all of its childs. " + getLocatorString());
31 + logger.config(this.getClass().getName());
32 final IgnoreAnyChildReadHandler ignoreAnyChildReadHandler =
33 new IgnoreAnyChildReadHandler();
34 ignoreAnyChildReadHandler.init(getRootHandler(), uri, tagName);
35 diff -ru pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlResourceFactory.java pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlResourceFactory.java
36 --- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlResourceFactory.java 2021-04-07 11:34:22.313653786 +0100
37 +++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlResourceFactory.java 2021-04-07 11:44:15.729203631 +0100
39 import javax.xml.parsers.SAXParser;
40 import javax.xml.parsers.SAXParserFactory;
42 -import org.apache.commons.logging.Log;
43 -import org.apache.commons.logging.LogFactory;
44 +import java.util.logging.Logger;
45 import org.pentaho.reporting.libraries.resourceloader.CompoundResource;
46 import org.pentaho.reporting.libraries.resourceloader.FactoryParameterKey;
47 import org.pentaho.reporting.libraries.resourceloader.Resource;
50 public abstract class AbstractXmlResourceFactory implements ResourceFactory
52 - private static final Log logger = LogFactory.getLog(AbstractXmlResourceFactory.class);
53 + private static final Logger logger = Logger.getLogger(AbstractXmlResourceFactory.class.getName());
56 * A key for the content base.
59 catch (SAXException se)
61 - logger.debug("Comments are not supported by this SAX implementation.");
62 + logger.config("Comments are not supported by this SAX implementation.");
68 catch (SAXException e)
70 - logger.warn("No Namespace features will be available. (Yes, this is serious)");
71 + logger.warning("No Namespace features will be available. (Yes, this is serious)");
75 diff -ru pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/DomTreeResourceFactory.java pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/DomTreeResourceFactory.java
76 --- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/DomTreeResourceFactory.java 2021-04-07 11:34:22.314653798 +0100
77 +++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/DomTreeResourceFactory.java 2021-04-07 11:43:15.934442890 +0100
79 import javax.xml.parsers.DocumentBuilderFactory;
80 import javax.xml.parsers.ParserConfigurationException;
82 -import org.apache.commons.logging.Log;
83 -import org.apache.commons.logging.LogFactory;
84 +import java.util.logging.Logger;
85 import org.pentaho.reporting.libraries.resourceloader.Resource;
86 import org.pentaho.reporting.libraries.resourceloader.ResourceCreationException;
87 import org.pentaho.reporting.libraries.resourceloader.ResourceData;
92 - private static final Log logger = LogFactory.getLog(DomTreeResourceFactory.class);
93 + private static final Logger logger = Logger.getLogger(DomTreeResourceFactory.class.getName());
96 * Creates a resource by interpreting the data given in the resource-data object. If additional datastreams need to
97 diff -ru pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/LoggingErrorHandler.java pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/LoggingErrorHandler.java
98 --- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/LoggingErrorHandler.java 2021-04-07 11:34:22.313653786 +0100
99 +++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/LoggingErrorHandler.java 2021-04-07 11:49:49.117390246 +0100
102 package org.pentaho.reporting.libraries.xmlns.parser;
104 -import org.apache.commons.logging.Log;
105 -import org.apache.commons.logging.LogFactory;
106 +import java.util.logging.Level;
107 +import java.util.logging.Logger;
108 import org.xml.sax.ErrorHandler;
109 import org.xml.sax.SAXException;
110 import org.xml.sax.SAXParseException;
113 public class LoggingErrorHandler implements ErrorHandler
115 - private static final Log defaultLogContext = LogFactory.getLog(LoggingErrorHandler.class);
116 + private static final Logger defaultLogContext = Logger.getLogger(LoggingErrorHandler.class.getName());
117 /** @noinspection NonConstantLogger*/
118 - private Log logContext;
119 + private Logger logContext;
122 * Default-Constructor. Logs to a logger configured with this class name as category.
125 * @param logContext the logger that should receive the messages.
127 - public LoggingErrorHandler(final Log logContext)
128 + public LoggingErrorHandler(final Logger logContext)
130 if (logContext == null)
134 public void warning(final SAXParseException exception) throws SAXException
136 - if (logContext.isDebugEnabled())
137 + if (logContext.isLoggable(Level.CONFIG))
139 if (exception.getMessage().startsWith("URI was not reported to parser for entity"))
142 // the GNU thing complain about it ..
145 - logContext.debug("Parser-Warning", exception);
146 + logContext.severe("Parser-Warning: " + exception.getMessage());
150 @@ -115,15 +115,15 @@
152 public void error(final SAXParseException exception) throws SAXException
154 - if (logContext.isWarnEnabled())
155 + if (logContext.isLoggable(Level.WARNING))
157 - if (logContext.isDebugEnabled())
158 + if (logContext.isLoggable(Level.CONFIG))
160 - logContext.warn("Recoverable Parser-Error", exception);
161 + logContext.warning("Recoverable Parser-Error:" + exception.getMessage());
165 - logContext.warn("Recoverable Parser-Error:" + exception.getMessage());
166 + logContext.warning("Recoverable Parser-Error:" + exception.getMessage());
170 @@ -156,15 +156,15 @@
172 public void fatalError(final SAXParseException exception) throws SAXException
174 - if (logContext.isErrorEnabled())
175 + if (logContext.isLoggable(Level.SEVERE))
177 - if (logContext.isDebugEnabled())
178 + if (logContext.isLoggable(Level.CONFIG))
180 - logContext.error("Fatal Parser-Error", exception);
181 + logContext.severe("Fatal Parser-Error:" + exception.getMessage());
185 - logContext.error("Fatal Parser-Error:" + exception.getMessage());
186 + logContext.severe("Fatal Parser-Error:" + exception.getMessage());
190 diff -ru pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/ParserEntityResolver.java pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/ParserEntityResolver.java
191 --- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/ParserEntityResolver.java 2021-04-07 11:34:22.314653798 +0100
192 +++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/ParserEntityResolver.java 2021-04-07 11:43:45.602820344 +0100
195 import java.util.HashMap;
197 -import org.apache.commons.logging.Log;
198 -import org.apache.commons.logging.LogFactory;
199 +import java.util.logging.Logger;
200 import org.xml.sax.EntityResolver;
201 import org.xml.sax.InputSource;
205 public final class ParserEntityResolver implements EntityResolver
207 - private static final Log logger = LogFactory.getLog(ParserEntityResolver.class);
208 + private static final Logger logger = Logger.getLogger(ParserEntityResolver.class.getName());
211 * The hashtable for the known entities (deprecated DTDs).
216 - logger.warn("Validate location failed for " + publicID + " location: " + location);
217 + logger.warning("Validate location failed for " + publicID + " location: " + location);
225 - logger.warn("Validate location failed for " + publicID + " location: " + location);
226 + logger.warning("Validate location failed for " + publicID + " location: " + location);
232 catch (IOException ioe)
234 - logger.warn("Unable to open specified DTD", ioe);
235 + logger.warning("Unable to open specified DTD: " + ioe);
239 diff -ru pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/ResourceDataInputSource.java pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/ResourceDataInputSource.java
240 --- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/ResourceDataInputSource.java 2021-04-07 11:34:22.312653773 +0100
241 +++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/ResourceDataInputSource.java 2021-04-07 11:44:05.484073284 +0100
243 import java.io.InputStream;
246 -import org.apache.commons.logging.Log;
247 -import org.apache.commons.logging.LogFactory;
248 +import java.util.logging.Logger;
249 import org.pentaho.reporting.libraries.resourceloader.ResourceData;
250 import org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException;
251 import org.pentaho.reporting.libraries.resourceloader.ResourceManager;
254 public class ResourceDataInputSource extends InputSource
256 - private static final Log logger = LogFactory.getLog(ResourceDataInputSource.class);
257 + private static final Logger logger = Logger.getLogger(ResourceDataInputSource.class.getName());
258 private ResourceData data;
259 private long version;
260 private ResourceManager caller;
263 catch (ResourceLoadingException e)
265 - logger.error("Unable to create byte-stream: " + data.getKey());
266 + logger.severe("Unable to create byte-stream: " + data.getKey());
270 --- a/source/org/pentaho/reporting/libraries/xmlns/common/ParserUtil.java
271 +++ b/source/org/pentaho/reporting/libraries/xmlns/common/ParserUtil.java
273 import org.pentaho.reporting.libraries.xmlns.LibXmlBoot;
274 import org.xml.sax.Locator;
275 import org.xml.sax.SAXException;
276 -import org.apache.commons.logging.Log;
277 -import org.apache.commons.logging.LogFactory;
278 +import java.util.logging.Logger;
281 * Basic helper functions to ease up the process of parsing.
284 public class ParserUtil
286 - private static final Log logger = LogFactory.getLog(ParserUtil.class);
287 + private static final Logger logger = Logger.getLogger(ParserUtil.class.getName());
288 private static boolean strictParsing;
295 - logger.warn("Invalid value encountered: Expected 'true' or 'false', but got '" + text + "'");
296 + logger.warning("Invalid value encountered: Expected 'true' or 'false', but got '" + text + "'");
297 return "true".equalsIgnoreCase(text);
300 @@ -281,11 +280,11 @@
304 - logger.warn("Invalid value encountered for boolean attribute.");
305 + logger.warning("Invalid value encountered for boolean attribute.");
309 - logger.warn("Invalid value encountered for boolean attribute. [Line: " +
310 + logger.warning("Invalid value encountered for boolean attribute. [Line: " +
311 locator.getLineNumber() + " Column: " + locator.getColumnNumber() + "]");
313 return Boolean.FALSE;