Avoid potential negative array index access to cached text.
[LibreOffice.git] / external / jfreereport / patches / libloader-1.1.3-remove-commons-logging.patch.1
blobfad07d59ded834543e2eb6ca22607a11c73f4b5f
1 diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/DefaultResourceManagerBackend.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/DefaultResourceManagerBackend.java
2 --- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/DefaultResourceManagerBackend.java       2021-04-07 10:55:58.343147414 +0100
3 +++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/DefaultResourceManagerBackend.java    2021-04-07 11:08:48.389599751 +0100
4 @@ -22,8 +22,8 @@
5  import java.util.Iterator;
6  import java.util.Map;
7  
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.base.config.Configuration;
13  import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
15 @@ -34,7 +34,7 @@
16   */
17  public class DefaultResourceManagerBackend implements ResourceManagerBackend
18  {
19 -  private static final Log logger = LogFactory.getLog(DefaultResourceManagerBackend.class);
20 +  private static final Logger logger = Logger.getLogger(DefaultResourceManagerBackend.class.getName());
22    private ArrayList resourceLoaders;
23    private ArrayList resourceBundleLoaders;
24 @@ -280,9 +280,9 @@
25          {
26            // ignore it, try the next factory ...
27            exception = rex;
28 -          if (logger.isDebugEnabled())
29 +          if (logger.isLoggable(Level.CONFIG))
30            {
31 -            logger.debug("Failed at " + fact.getClass() + ": ", rex);
32 +            logger.config("Failed at " + fact.getClass() + ": " + rex);
33            }
34          }
35        }
36 @@ -413,7 +413,7 @@
37      {
38        throw new UnrecognizedLoaderException("Invalid key: No resource-loader registered for schema: " + key.getSchema());
39      }
40 -    logger.debug("Loaded " + key);
41 +    logger.config("Loaded " + key);
42      return loader.load(key);
43    }
45 @@ -451,7 +451,7 @@
46            ResourceLoader.class);
47        if (loader != null)
48        {
49 -        //Log.debug("Registering loader for " + loader.getSchema());
50 +        //Log.config("Registering loader for " + loader.getSchema());
51          registerLoader(loader);
52        }
53      }
54 @@ -465,7 +465,7 @@
55            ResourceManager.class, ResourceBundleLoader.class);
56        if (loader != null)
57        {
58 -        //Log.debug("Registering loader for " + loader.getSchema());
59 +        //Log.config("Registering loader for " + loader.getSchema());
60          registerBundleLoader(loader);
61        }
62      }
63 diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/factory/drawable/DrawableWrapper.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/factory/drawable/DrawableWrapper.java
64 --- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/factory/drawable/DrawableWrapper.java    2021-04-07 10:55:58.342147402 +0100
65 +++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/factory/drawable/DrawableWrapper.java 2021-04-07 11:05:40.206289803 +0100
66 @@ -27,8 +27,8 @@
67  import java.util.Collections;
68  import java.util.Map;
70 -import org.apache.commons.logging.Log;
71 -import org.apache.commons.logging.LogFactory;
72 +import java.util.logging.Level;
73 +import java.util.logging.Logger;
75  /**
76   * Creation-Date: 05.12.2007, 19:15:56
77 @@ -37,7 +37,7 @@
78   */
79  public class DrawableWrapper
80  {
81 -  private static final Log logger = LogFactory.getLog(DrawableWrapper.class);
82 +  private static final Logger logger = Logger.getLogger(DrawableWrapper.class.getName());
83    private static final Map drawables = Collections.synchronizedMap(new HashMap());
85    private Object backend;
86 @@ -67,9 +67,9 @@
87            Modifier.isAbstract(modifiers) ||
88            Modifier.isStatic(modifiers))
89        {
90 -        if (logger.isWarnEnabled())
91 +        if (logger.isLoggable(Level.WARNING))
92          {
93 -          logger.warn("DrawMethod is not valid: " + aClass + '#' + drawMethod);
94 +          logger.warning("DrawMethod is not valid: " + aClass + '#' + drawMethod);
95          }
96          drawMethod = null;
97        }
98 @@ -77,9 +77,9 @@
99      catch (NoSuchMethodException e)
100      {
101        // ignore exception
102 -      if (logger.isWarnEnabled())
103 +      if (logger.isLoggable(Level.WARNING))
104        {
105 -        logger.warn("The object is not a drawable: " + aClass);
106 +        logger.warning("The object is not a drawable: " + aClass);
107        }
108        drawMethod = null;
109      }
110 @@ -141,9 +141,9 @@
111      }
112      catch (Exception e)
113      {
114 -      if (logger.isDebugEnabled())
115 +      if (logger.isLoggable(Level.CONFIG))
116        {
117 -        logger.warn("Invoking draw failed:", e);
118 +        logger.warning("Invoking draw failed: " + e);
119        }
120      }
121    }
122 @@ -167,9 +167,9 @@
123      }
124      catch (Exception e)
125      {
126 -      if (logger.isWarnEnabled())
127 +      if (logger.isLoggable(Level.WARNING))
128        {
129 -        logger.warn("Invoking getPreferredSize failed:", e);
130 +        logger.warning("Invoking getPreferredSize failed: " + e);
131        }
132        return null;
133      }
134 @@ -193,9 +193,9 @@
135      }
136      catch (Exception e)
137      {
138 -      if (logger.isWarnEnabled())
139 +      if (logger.isLoggable(Level.WARNING))
140        {
141 -        logger.warn("Invoking isKeepAspectRatio failed:", e);
142 +        logger.warning("Invoking isKeepAspectRatio failed: " + e);
143        }
144        return false;
145      }
146 diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/file/FileResourceLoader.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/file/FileResourceLoader.java
147 --- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/file/FileResourceLoader.java      2021-04-07 10:55:58.344147426 +0100
148 +++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/file/FileResourceLoader.java   2021-04-07 11:03:22.711602044 +0100
149 @@ -24,8 +24,7 @@
150  import java.util.HashMap;
151  import java.util.Map;
153 -import org.apache.commons.logging.Log;
154 -import org.apache.commons.logging.LogFactory;
155 +import java.util.logging.Logger;
156  import org.pentaho.reporting.libraries.resourceloader.ResourceData;
157  import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
158  import org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException;
159 @@ -43,7 +42,7 @@
160  public class FileResourceLoader implements ResourceLoader
162    public static final String SCHEMA_NAME = FileResourceLoader.class.getName();
163 -  private static final Log logger = LogFactory.getLog(FileResourceLoader.class);
164 +  private static final Logger logger = Logger.getLogger(FileResourceLoader.class.getName());
166    public FileResourceLoader()
167    {
168 @@ -210,7 +209,7 @@
169      }
171      // Log information
172 -    logger.debug("Serializing a File Resource Key...");
173 +    logger.config("Serializing a File Resource Key...");
174      if (key.getParent() != null)
175      {
176        throw new ResourceException
177 @@ -224,7 +223,7 @@
178        final String strIdentifier = file.getCanonicalPath();
179        final String result = ResourceKeyUtils.createStringResourceKey
180            (key.getSchema().toString(), strIdentifier, key.getFactoryParameters());
181 -      logger.debug("Serialized File Resource Key: [" + result + "]");
182 +      logger.config("Serialized File Resource Key: [" + result + "]");
183        return result;
184      }
185      catch (IOException ioe)
186 diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/raw/RawResourceLoader.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/raw/RawResourceLoader.java
187 --- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/raw/RawResourceLoader.java        2021-04-07 10:55:58.343147414 +0100
188 +++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/raw/RawResourceLoader.java     2021-04-07 11:01:56.064538444 +0100
189 @@ -21,8 +21,7 @@
190  import java.util.HashMap;
191  import java.util.Map;
193 -import org.apache.commons.logging.Log;
194 -import org.apache.commons.logging.LogFactory;
195 +import java.util.logging.Logger;
196  import org.pentaho.reporting.libraries.resourceloader.ResourceData;
197  import org.pentaho.reporting.libraries.resourceloader.ResourceException;
198  import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
199 diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/resource/ClassloaderResourceLoader.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/resource/ClassloaderResourceLoader.java
200 --- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/resource/ClassloaderResourceLoader.java   2021-04-07 10:55:58.343147414 +0100
201 +++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/resource/ClassloaderResourceLoader.java        2021-04-07 11:03:14.370499656 +0100
202 @@ -21,8 +21,7 @@
203  import java.util.Map;
204  import java.net.URL;
206 -import org.apache.commons.logging.Log;
207 -import org.apache.commons.logging.LogFactory;
208 +import java.util.logging.Logger;
209  import org.pentaho.reporting.libraries.resourceloader.ResourceData;
210  import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
211  import org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException;
212 @@ -41,7 +40,7 @@
213  public class ClassloaderResourceLoader implements ResourceLoader
215    public static final String SCHEMA_NAME = ClassloaderResourceLoader.class.getName();
216 -  private static final Log logger = LogFactory.getLog(ClassloaderResourceLoader.class);
217 +  private static final Logger logger = Logger.getLogger(ClassloaderResourceLoader.class.getName());
219    public ClassloaderResourceLoader()
220    {
221 @@ -197,7 +196,7 @@
222      }
224      // Log information
225 -    logger.debug("Serializing a Classloader Resource Key...");
226 +    logger.config("Serializing a Classloader Resource Key...");
227      if (key.getParent() != null)
228      {
229        throw new ResourceException
230 @@ -207,7 +206,7 @@
231      // Serialize the key
232      final String result = ResourceKeyUtils.createStringResourceKey(key.getSchema().toString(),
233          (String) key.getIdentifier(), key.getFactoryParameters());
234 -    logger.debug("Serialized Classloader Resource Key: [" + result + "]");
235 +    logger.config("Serialized Classloader Resource Key: [" + result + "]");
236      return result;
237    }
239 diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/URLResourceLoader.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/URLResourceLoader.java
240 --- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/URLResourceLoader.java    2021-04-07 10:55:58.344147426 +0100
241 +++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/URLResourceLoader.java 2021-04-07 11:03:41.998838804 +0100
242 @@ -22,8 +22,7 @@
243  import java.util.HashMap;
244  import java.util.Map;
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.ResourceKey;
251  import org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException;
252 @@ -40,7 +39,7 @@
253  public class URLResourceLoader implements ResourceLoader
255    public static final String SCHEMA_NAME = URLResourceLoader.class.getName();
256 -  private static final Log logger = LogFactory.getLog(URLResourceLoader.class);
257 +  private static final Logger logger = Logger.getLogger(URLResourceLoader.class.getName());
259    public URLResourceLoader()
260    {
261 @@ -188,10 +187,10 @@
262      }
264      // Log information
265 -    logger.debug("Serializing a Classloader Resource Key...");
266 +    logger.config("Serializing a Classloader Resource Key...");
267      if (key.getParent() != null)
268      {
269 -      logger.warn("Serializing a Classloader Resource Key which contains a parent: key=[" + bundleKey + "] parent=["
270 +      logger.warning("Serializing a Classloader Resource Key which contains a parent: key=[" + bundleKey + "] parent=["
271            + key.getParent() + "]");
272      }
274 @@ -199,7 +198,7 @@
275      final URL url = (URL) key.getIdentifier();
276      final String result = ResourceKeyUtils.createStringResourceKey
277          (key.getSchema().toString(), url.toExternalForm(), key.getFactoryParameters());
278 -    logger.debug("Serialized Classloader Resource Key: [" + result + "]");
279 +    logger.config("Serialized Classloader Resource Key: [" + result + "]");
280      return result;
281    }
283 diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/zip/ZipResourceLoader.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/zip/ZipResourceLoader.java
284 --- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/zip/ZipResourceLoader.java        2021-04-07 10:55:58.344147426 +0100
285 +++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/zip/ZipResourceLoader.java     2021-04-07 11:02:18.522814132 +0100
286 @@ -21,8 +21,7 @@
287  import java.util.HashMap;
288  import java.util.Map;
290 -import org.apache.commons.logging.Log;
291 -import org.apache.commons.logging.LogFactory;
292 +import java.util.logging.Logger;
293  import org.pentaho.reporting.libraries.resourceloader.ResourceData;
294  import org.pentaho.reporting.libraries.resourceloader.ResourceException;
295  import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
296 @@ -40,7 +39,7 @@
297  public class ZipResourceLoader implements ResourceLoader
299    public static final String SCHEMA_NAME = ZipResourceLoader.class.getName();
300 -  private static final Log logger = LogFactory.getLog(ZipResourceLoader.class);
301 +  private static final Logger logger = Logger.getLogger(ZipResourceLoader.class.getName());
303    public ZipResourceLoader()
304    {
305 diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHCacheModule.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHCacheModule.java
306 --- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHCacheModule.java 2021-04-07 10:55:58.345147438 +0100
307 +++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHCacheModule.java      2021-04-07 10:58:52.758288370 +0100
308 @@ -20,8 +20,7 @@
309  import org.pentaho.reporting.libraries.base.boot.AbstractModule;
310  import org.pentaho.reporting.libraries.base.boot.ModuleInitializeException;
311  import org.pentaho.reporting.libraries.base.boot.SubSystem;
312 -import org.apache.commons.logging.Log;
313 -import org.apache.commons.logging.LogFactory;
314 +import java.util.logging.Logger;
316  /**
317   * Creation-Date: 13.04.2006, 16:29:07
318 @@ -30,7 +29,7 @@
319   */
320  public class EHCacheModule extends AbstractModule
322 -  public static final Log CACHE_MONITOR = LogFactory.getLog(EHCacheModule.class.getName() + "#CacheLog"); 
323 +  public static final Logger CACHE_MONITOR = Logger.getLogger(EHCacheModule.class.getName() + "#CacheLog"); 
325    public EHCacheModule() throws ModuleInitializeException
326    {
327 diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceFactoryCache.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceFactoryCache.java
328 --- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceFactoryCache.java        2021-04-07 10:55:58.345147438 +0100
329 +++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceFactoryCache.java     2021-04-07 10:59:17.251589016 +0100
330 @@ -20,8 +20,8 @@
331  import net.sf.ehcache.Cache;
332  import net.sf.ehcache.CacheException;
333  import net.sf.ehcache.Element;
334 -import org.apache.commons.logging.Log;
335 -import org.apache.commons.logging.LogFactory;
336 +import java.util.logging.Level;
337 +import java.util.logging.Logger;
338  import org.pentaho.reporting.libraries.resourceloader.Resource;
339  import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
340  import org.pentaho.reporting.libraries.resourceloader.cache.ResourceFactoryCache;
341 @@ -110,7 +109,7 @@
342      }
343    }
345 -  private static final Log logger = LogFactory.getLog(EHResourceFactoryCache.class);
346 +  private static final Logger logger = Logger.getLogger(EHResourceFactoryCache.class.getName());
347    private Cache factoryCache;
349    public EHResourceFactoryCache(final Cache factoryCache)
350 @@ -128,16 +128,16 @@
351        final Resource res = getInternal(key, target[i]);
352        if (res != null)
353        {
354 -        if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
355 +        if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
356          {
357 -          EHCacheModule.CACHE_MONITOR.debug("Res  Cache Hit  " + key);
358 +          EHCacheModule.CACHE_MONITOR.config("Res  Cache Hit  " + key);
359          }
360          return res;
361        }
362      }
363 -    if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
364 +    if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
365      {
366 -      EHCacheModule.CACHE_MONITOR.debug("Res  Cache Miss  " + key);
367 +      EHCacheModule.CACHE_MONITOR.config("Res  Cache Miss  " + key);
368      }
369      return null;
370    }
371 @@ -168,9 +168,9 @@
372      }
373      catch (CacheException e)
374      {
375 -      if (logger.isDebugEnabled())
376 +      if (logger.isLoggable(Level.CONFIG))
377        {
378 -        logger.debug("Failed to retrieve resource for key " + key, e);
379 +        logger.config("Failed to retrieve resource for key " + key + ": " + e);
380        }
381        return null;
382      }
383 @@ -185,9 +185,9 @@
384      }
385      catch (Exception e)
386      {
387 -      if (logger.isDebugEnabled())
388 +      if (logger.isLoggable(Level.CONFIG))
389        {
390 -        logger.debug("Failed to store resource for key " + source, e);
391 +        logger.config("Failed to store resource for key " + source + ": " + e);
392        }
393        // ignore ... the object is not serializable ..
394      }
395 diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/ResourceKeyUtils.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/ResourceKeyUtils.java
396 --- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/ResourceKeyUtils.java    2021-04-07 10:55:58.342147402 +0100
397 +++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/ResourceKeyUtils.java 2021-04-07 11:06:27.248867251 +0100
398 @@ -27,8 +27,8 @@
399  import java.util.Iterator;
400  import java.util.Map;
402 -import org.apache.commons.logging.Log;
403 -import org.apache.commons.logging.LogFactory;
404 +import java.util.logging.Level;
405 +import java.util.logging.Logger;
406  import org.pentaho.reporting.libraries.base.util.CSVQuoter;
407  import org.pentaho.reporting.libraries.base.util.CSVTokenizer;
408  import org.pentaho.reporting.libraries.base.util.IOUtils;
409 @@ -42,7 +42,7 @@
411    private static final String DELIMITER = ";";
412    private static final String SERIALIZATION_PREFIX = "resourcekey:";
413 -  private static final Log logger = LogFactory.getLog(ResourceManager.class);
414 +  private static final Logger logger = Logger.getLogger(ResourceManager.class.getName());
416    /**
417     * Returns a string representation of the ResourceKey based on the pieces that are passed as parameters
418 @@ -169,7 +169,7 @@
420        sb.append(quoter.doQuoting(entrySb.toString()));
421      }
422 -    logger.debug("Converted ResourceKey's Factory Parameters to String: [" + sb.toString() + "]");
423 +    logger.config("Converted ResourceKey's Factory Parameters to String: [" + sb.toString() + "]");
424      return sb.toString();
425    }
427 @@ -226,9 +226,9 @@
428        params.put(key, value);
429      }
431 -    if (logger.isDebugEnabled())
432 +    if (logger.isLoggable(Level.CONFIG))
433      {
434 -      logger.debug("Converted ResourceKey's Factory Parameter String to a Map: [" + factoryParameters
435 +      logger.config("Converted ResourceKey's Factory Parameter String to a Map: [" + factoryParameters
436            + "] -> map of size " + params.size());
437      }
438      return params;
439 @@ -369,7 +369,7 @@
440        }
441        catch (IOException e)
442        {
443 -        logger.error("Error closing input stream", e);
444 +        logger.severe("Error closing input stream: " + e);
445        }
446      }
447    }
448 diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/ResourceManager.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/ResourceManager.java
449 --- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/ResourceManager.java     2021-04-07 10:55:58.344147426 +0100
450 +++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/ResourceManager.java  2021-04-07 11:07:50.557889876 +0100
451 @@ -22,8 +22,8 @@
452  import java.util.Map;
453  import java.util.Set;
455 -import org.apache.commons.logging.Log;
456 -import org.apache.commons.logging.LogFactory;
457 +import java.util.logging.Level;
458 +import java.util.logging.Logger;
459  import org.pentaho.reporting.libraries.base.config.Configuration;
460  import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
461  import org.pentaho.reporting.libraries.resourceloader.cache.BundleCacheResourceWrapper;
462 @@ -57,7 +57,7 @@
463   */
464  public final class ResourceManager
466 -  private static final Log logger = LogFactory.getLog(ResourceManager.class);
467 +  private static final Logger logger = Logger.getLogger(ResourceManager.class.getName());
468    private ResourceManagerBackend backend;
470    public static final String BUNDLE_LOADER_PREFIX = "org.pentaho.reporting.libraries.resourceloader.bundle.loader.";
471 @@ -273,7 +273,7 @@
472      final ResourceBundleData bundle = loadResourceBundle(key);
473      if (bundle != null)
474      {
475 -      logger.debug("Loaded bundle for key " + key);
476 +      logger.config("Loaded bundle for key " + key);
477        return bundle;
478      }
479      final ResourceKey parent = key.getParent();
480 @@ -283,7 +283,7 @@
481        final ResourceBundleData parentData = loadResourceBundle(parent);
482        if (parentData != null)
483        {
484 -        logger.debug("Loaded bundle for key (derivate) " + key);
485 +        logger.config("Loaded bundle for key (derivate) " + key);
486          return parentData.deriveData(key);
487        }
488      }
489 @@ -400,9 +400,9 @@
490        newResource = backend.create(derivedManager, resourceBundleData, context, target);
491        if (isResourceCacheable(newResource))
492        {
493 -        if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
494 +        if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
495          {
496 -          EHCacheModule.CACHE_MONITOR.debug("Storing created bundle-resource for key: " + key);
497 +          EHCacheModule.CACHE_MONITOR.config("Storing created bundle-resource for key: " + key);
498          }
499          factoryCache.put(newResource);
500          if (key != newResource.getSource())
501 @@ -412,9 +412,9 @@
502        }
503        else
504        {
505 -        if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
506 +        if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
507          {
508 -          EHCacheModule.CACHE_MONITOR.debug("Created bundle-resource is not cacheable for " + key);
509 +          EHCacheModule.CACHE_MONITOR.config("Created bundle-resource is not cacheable for " + key);
510          }
511        }
512      }
513 @@ -423,17 +423,17 @@
514        newResource = backend.create(this, loadedData, context, target);
515        if (isResourceCacheable(newResource))
516        {
517 -        if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
518 +        if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
519          {
520 -          EHCacheModule.CACHE_MONITOR.debug("Storing created resource for key: " + key);
521 +          EHCacheModule.CACHE_MONITOR.config("Storing created resource for key: " + key);
522          }
523          factoryCache.put(newResource);
524        }
525        else
526        {
527 -        if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
528 +        if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
529          {
530 -          EHCacheModule.CACHE_MONITOR.debug("Created resource is not cacheable for " + key);
531 +          EHCacheModule.CACHE_MONITOR.config("Created resource is not cacheable for " + key);
532          }
533        }
534      }
535 @@ -556,7 +556,7 @@
536        {
537          if (failedModules.contains(dataCacheProviderClass) == false)
538          {
539 -          logger.warn("Failed to create data cache: " + e.getLocalizedMessage());
540 +          logger.warning("Failed to create data cache: " + e.getLocalizedMessage());
541            failedModules.add(dataCacheProviderClass);
542          }
543        }
544 @@ -593,7 +593,7 @@
545          {
546            if (failedModules.contains(dataCacheProviderClass) == false)
547            {
548 -            logger.warn("Failed to create data cache: " + e.getLocalizedMessage());
549 +            logger.warning("Failed to create data cache: " + e.getLocalizedMessage());
550              failedModules.add(dataCacheProviderClass);
551            }
552          }
553 @@ -630,7 +630,7 @@
554          {
555            if (failedModules.contains(cacheProviderClass) == false)
556            {
557 -            logger.warn("Failed to create factory cache: " + e.getLocalizedMessage());
558 +            logger.warning("Failed to create factory cache: " + e.getLocalizedMessage());
559              failedModules.add(cacheProviderClass);
560            }
561          }
562 --- a/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceBundleDataCache.java
563 +++ b/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceBundleDataCache.java
564 @@ -17,6 +17,7 @@
566  package org.pentaho.reporting.libraries.resourceloader.modules.cache.ehcache;
568 +import java.util.logging.Level;
569  import net.sf.ehcache.Cache;
570  import net.sf.ehcache.CacheException;
571  import net.sf.ehcache.Element;
572 @@ -64,17 +65,17 @@
573        final Element element = dataCache.get((Object) key);
574        if (element != null)
575        {
576 -        if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
577 +        if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
578          {
579 -          EHCacheModule.CACHE_MONITOR.debug("Bund Cache Hit  " + key);
580 +          EHCacheModule.CACHE_MONITOR.config("Bund Cache Hit  " + key);
581          }
582          return (ResourceBundleDataCacheEntry) element.getObjectValue();
583        }
584        else
585        {
586 -        if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
587 +        if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
588          {
589 -          EHCacheModule.CACHE_MONITOR.debug("Bund Cache Miss " + key);
590 +          EHCacheModule.CACHE_MONITOR.config("Bund Cache Miss " + key);
591          }
592          return null;
593        }
594 @@ -101,9 +102,9 @@
595      final Object keyObject = data.getBundleKey();
596      final Object valueObject = new DefaultResourceBundleDataCacheEntry(cdata, caller);
597      final Element element = new Element(keyObject, valueObject);
598 -    if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
599 +    if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
600      {
601 -      EHCacheModule.CACHE_MONITOR.debug("Storing Bundle " + keyObject);
602 +      EHCacheModule.CACHE_MONITOR.config("Storing Bundle " + keyObject);
603      }
604      dataCache.put(element);
605      return cdata;
606 --- a/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceDataCache.java
607 +++ b/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceDataCache.java
608 @@ -17,6 +17,7 @@
610  package org.pentaho.reporting.libraries.resourceloader.modules.cache.ehcache;
612 +import java.util.logging.Level;
613  import net.sf.ehcache.Cache;
614  import net.sf.ehcache.CacheException;
615  import net.sf.ehcache.Element;
616 @@ -64,15 +65,15 @@
617        final Element element = dataCache.get((Object) key);
618        if (element != null)
619        {
620 -        if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
621 +        if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
622          {
623 -          EHCacheModule.CACHE_MONITOR.debug("Data Cache Hit  " + key);
624 +          EHCacheModule.CACHE_MONITOR.config("Data Cache Hit  " + key);
625          }
626          return (ResourceDataCacheEntry) element.getObjectValue();
627        }
628 -      if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
629 +      if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
630        {
631 -        EHCacheModule.CACHE_MONITOR.debug("Data Cache Miss " + key);
632 +        EHCacheModule.CACHE_MONITOR.config("Data Cache Miss " + key);
633        }
634        return null;
635      }