From f877a44a6391005960ab3a1517e6d2f8ab781ac7 Mon Sep 17 00:00:00 2001 From: "Richard G. Curtis" Date: Mon, 18 Jan 2010 22:24:44 +0000 Subject: [PATCH] OPENJPA-1470: Change INFO messages in PCEnhancer to TRACE messages. git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@900589 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/openjpa/enhance/PCEnhancer.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java b/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java index 60969e6a5..e4789644a 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java @@ -501,16 +501,18 @@ public class PCEnhancer { return ENHANCE_INTERFACE; // check if already enhanced - Class[] interfaces = _managedType.getDeclaredInterfaceTypes(); - for (int i = 0; i < interfaces.length; i++) { - if (interfaces[i].getName().equals(PCTYPE.getName())) { - if (_log.isInfoEnabled()) - _log.info(_loc.get("pc-type", _managedType.getType(), _managedType.getType().getClassLoader())); + ClassLoader loader = _managedType.getType().getClassLoader(); + for (Class iface : _managedType.getDeclaredInterfaceTypes()) { + if (iface.getName().equals(PCTYPE.getName())) { + if (_log.isTraceEnabled()) { + _log.trace(_loc.get("pc-type", _managedType.getType(), loader)); + } return ENHANCE_NONE; } } - if (_log.isInfoEnabled()) - _log.info(_loc.get("enhance-start", _managedType.getType(), _managedType.getType().getClassLoader())); + if (_log.isTraceEnabled()) { + _log.trace(_loc.get("enhance-start", _managedType.getType(), loader)); + } configureBCs(); @@ -539,7 +541,7 @@ public class PCEnhancer { } if (_log.isWarnEnabled()) - _log.warn(_loc.get("pers-aware", _managedType.getType(), _managedType.getType().getClassLoader())); + _log.warn(_loc.get("pers-aware", _managedType.getType(), loader)); return ENHANCE_AWARE; } catch (OpenJPAException ke) { throw ke;