summaryrefslogtreecommitdiffstats
path: root/external/jfreereport/patches/libxml-1.1.3-remove-commons-logging.patch.1
blob: ecec88c480ab984fca837f009c19db4b0edaaec4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
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
--- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlReadHandler.java	2021-04-07 11:34:22.313653786 +0100
+++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlReadHandler.java	2021-04-07 11:48:16.381234640 +0100
@@ -20,8 +20,8 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 import org.pentaho.reporting.libraries.resourceloader.DependencyCollector;
 import org.pentaho.reporting.libraries.resourceloader.FactoryParameterKey;
 import org.pentaho.reporting.libraries.resourceloader.Resource;
@@ -40,7 +40,7 @@
  */
 public abstract class AbstractXmlReadHandler implements XmlReadHandler
 {
-  private static final Log logger = LogFactory.getLog(AbstractXmlReadHandler.class);
+  private static final Logger logger = Logger.getLogger(AbstractXmlReadHandler.class.getName());
 
   /**
    * The root handler.
@@ -120,8 +120,8 @@
       final XmlReadHandler childHandler = getHandlerForChild(uri, tagName, attrs);
       if (childHandler == null)
       {
-        logger.warn("Unknown tag <" + uri + ':' + tagName + ">: Start to ignore this element and all of its childs. " + getLocatorString());
-        logger.debug(this.getClass());
+        logger.warning("Unknown tag <" + uri + ':' + tagName + ">: Start to ignore this element and all of its childs. " + getLocatorString());
+        logger.config(this.getClass().getName());
         final IgnoreAnyChildReadHandler ignoreAnyChildReadHandler =
             new IgnoreAnyChildReadHandler();
         ignoreAnyChildReadHandler.init(getRootHandler(), uri, tagName);
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
--- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlResourceFactory.java	2021-04-07 11:34:22.313653786 +0100
+++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlResourceFactory.java	2021-04-07 11:44:15.729203631 +0100
@@ -26,8 +26,7 @@
 import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
 import org.pentaho.reporting.libraries.resourceloader.CompoundResource;
 import org.pentaho.reporting.libraries.resourceloader.FactoryParameterKey;
 import org.pentaho.reporting.libraries.resourceloader.Resource;
@@ -56,7 +55,7 @@
  */
 public abstract class AbstractXmlResourceFactory implements ResourceFactory
 {
-  private static final Log logger = LogFactory.getLog(AbstractXmlResourceFactory.class);
+  private static final Logger logger = Logger.getLogger(AbstractXmlResourceFactory.class.getName());
 
   /**
    * A key for the content base.
@@ -115,7 +114,7 @@
     }
     catch (SAXException se)
     {
-      logger.debug("Comments are not supported by this SAX implementation.");
+      logger.config("Comments are not supported by this SAX implementation.");
     }
 
     try
@@ -133,7 +132,7 @@
     }
     catch (SAXException e)
     {
-      logger.warn("No Namespace features will be available. (Yes, this is serious)");
+      logger.warning("No Namespace features will be available. (Yes, this is serious)");
     }
   }
 
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
--- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/DomTreeResourceFactory.java	2021-04-07 11:34:22.314653798 +0100
+++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/DomTreeResourceFactory.java	2021-04-07 11:43:15.934442890 +0100
@@ -22,8 +22,7 @@
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
 import org.pentaho.reporting.libraries.resourceloader.Resource;
 import org.pentaho.reporting.libraries.resourceloader.ResourceCreationException;
 import org.pentaho.reporting.libraries.resourceloader.ResourceData;
@@ -61,7 +60,7 @@
     }
   }
 
-  private static final Log logger = LogFactory.getLog(DomTreeResourceFactory.class);
+  private static final Logger logger = Logger.getLogger(DomTreeResourceFactory.class.getName());
 
   /**
    * Creates a resource by interpreting the data given in the resource-data object. If additional datastreams need to
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
--- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/LoggingErrorHandler.java	2021-04-07 11:34:22.313653786 +0100
+++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/LoggingErrorHandler.java	2021-04-07 11:49:49.117390246 +0100
@@ -17,8 +17,8 @@
 
 package org.pentaho.reporting.libraries.xmlns.parser;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 import org.xml.sax.ErrorHandler;
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXParseException;
@@ -30,9 +30,9 @@
  */
 public class LoggingErrorHandler implements ErrorHandler
 {
-  private static final Log defaultLogContext = LogFactory.getLog(LoggingErrorHandler.class);
+  private static final Logger defaultLogContext = Logger.getLogger(LoggingErrorHandler.class.getName());
   /** @noinspection NonConstantLogger*/
-  private Log logContext;
+  private Logger logContext;
 
   /**
    * Default-Constructor. Logs to a logger configured with this class name as category.
@@ -47,7 +47,7 @@
    *
    * @param logContext the logger that should receive the messages.
    */
-  public LoggingErrorHandler(final Log logContext)
+  public LoggingErrorHandler(final Logger logContext)
   {
     if (logContext == null)
     {
@@ -78,7 +78,7 @@
    */
   public void warning(final SAXParseException exception) throws SAXException
   {
-    if (logContext.isDebugEnabled())
+    if (logContext.isLoggable(Level.CONFIG))
     {
       if (exception.getMessage().startsWith("URI was not reported to parser for entity"))
       {
@@ -86,7 +86,7 @@
         // the GNU thing complain about it ..
         return;
       }
-      logContext.debug("Parser-Warning", exception);
+      logContext.severe("Parser-Warning: " + exception.getMessage());
     }
   }
 
@@ -115,15 +115,15 @@
    */
   public void error(final SAXParseException exception) throws SAXException
   {
-    if (logContext.isWarnEnabled())
+    if (logContext.isLoggable(Level.WARNING))
     {
-      if (logContext.isDebugEnabled())
+      if (logContext.isLoggable(Level.CONFIG))
       {
-        logContext.warn("Recoverable Parser-Error", exception);
+        logContext.warning("Recoverable Parser-Error:" + exception.getMessage());
       }
       else
       {
-        logContext.warn("Recoverable Parser-Error:" + exception.getMessage());
+        logContext.warning("Recoverable Parser-Error:" + exception.getMessage());
       }
     }
   }
@@ -156,15 +156,15 @@
    */
   public void fatalError(final SAXParseException exception) throws SAXException
   {
-    if (logContext.isErrorEnabled())
+    if (logContext.isLoggable(Level.SEVERE))
     {
-      if (logContext.isDebugEnabled())
+      if (logContext.isLoggable(Level.CONFIG))
       {
-        logContext.error("Fatal Parser-Error", exception);
+        logContext.severe("Fatal Parser-Error:" + exception.getMessage());
       }
       else
       {
-        logContext.error("Fatal Parser-Error:" + exception.getMessage());
+        logContext.severe("Fatal Parser-Error:" + exception.getMessage());
       }
     }
   }
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
--- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/ParserEntityResolver.java	2021-04-07 11:34:22.314653798 +0100
+++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/ParserEntityResolver.java	2021-04-07 11:43:45.602820344 +0100
@@ -22,8 +22,7 @@
 import java.net.URL;
 import java.util.HashMap;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
 import org.xml.sax.EntityResolver;
 import org.xml.sax.InputSource;
 
@@ -34,7 +33,7 @@
  */
 public final class ParserEntityResolver implements EntityResolver
 {
-  private static final Log logger = LogFactory.getLog(ParserEntityResolver.class);
+  private static final Logger logger = Logger.getLogger(ParserEntityResolver.class.getName());
 
   /**
    * The hashtable for the known entities (deprecated DTDs).
@@ -75,7 +74,7 @@
     }
     else
     {
-      logger.warn("Validate location failed for " + publicID + " location: " + location);
+      logger.warning("Validate location failed for " + publicID + " location: " + location);
       return false;
     }
   }
@@ -101,7 +100,7 @@
     }
     else
     {
-      logger.warn("Validate location failed for " + publicID + " location: " + location);
+      logger.warning("Validate location failed for " + publicID + " location: " + location);
       return false;
     }
   }
@@ -195,7 +194,7 @@
     }
     catch (IOException ioe)
     {
-      logger.warn("Unable to open specified DTD", ioe);
+      logger.warning("Unable to open specified DTD: " + ioe);
     }
     return null;
   }
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
--- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/ResourceDataInputSource.java	2021-04-07 11:34:22.312653773 +0100
+++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/ResourceDataInputSource.java	2021-04-07 11:44:05.484073284 +0100
@@ -20,8 +20,7 @@
 import java.io.InputStream;
 import java.net.URL;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
 import org.pentaho.reporting.libraries.resourceloader.ResourceData;
 import org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException;
 import org.pentaho.reporting.libraries.resourceloader.ResourceManager;
@@ -34,7 +33,7 @@
  */
 public class ResourceDataInputSource extends InputSource
 {
-  private static final Log logger = LogFactory.getLog(ResourceDataInputSource.class);
+  private static final Logger logger = Logger.getLogger(ResourceDataInputSource.class.getName());
   private ResourceData data;
   private long version;
   private ResourceManager caller;
@@ -103,7 +102,7 @@
     }
     catch (ResourceLoadingException e)
     {
-      logger.error("Unable to create byte-stream: " + data.getKey());
+      logger.severe("Unable to create byte-stream: " + data.getKey());
       return null;
     }
   }
--- a/source/org/pentaho/reporting/libraries/xmlns/common/ParserUtil.java
+++ b/source/org/pentaho/reporting/libraries/xmlns/common/ParserUtil.java
@@ -21,8 +21,7 @@
 import org.pentaho.reporting.libraries.xmlns.LibXmlBoot;
 import org.xml.sax.Locator;
 import org.xml.sax.SAXException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
 
 /**
  * Basic helper functions to ease up the process of parsing.
@@ -31,7 +30,7 @@
  */
 public class ParserUtil
 {
-  private static final Log logger = LogFactory.getLog(ParserUtil.class);
+  private static final Logger logger = Logger.getLogger(ParserUtil.class.getName());
   private static boolean strictParsing;
 
   static
@@ -243,7 +242,7 @@
         return false;
       }
 
-      logger.warn("Invalid value encountered: Expected 'true' or 'false', but got '" + text + "'");
+      logger.warning("Invalid value encountered: Expected 'true' or 'false', but got '" + text + "'");
       return "true".equalsIgnoreCase(text);
     }
   }
@@ -281,11 +280,11 @@
 
     if (locator == null)
     {
-      logger.warn("Invalid value encountered for boolean attribute.");
+      logger.warning("Invalid value encountered for boolean attribute.");
     }
     else
     {
-      logger.warn("Invalid value encountered for boolean attribute. [Line: " +
+      logger.warning("Invalid value encountered for boolean attribute. [Line: " +
           locator.getLineNumber() + " Column: " + locator.getColumnNumber() + "]");
     }
     return Boolean.FALSE;