From 696388049b3a89248e265af7274bdb298ab91e0a Mon Sep 17 00:00:00 2001 From: Michael Dick Date: Thu, 15 Jan 2009 20:21:45 +0000 Subject: [PATCH] OPENJPA-860 improve trace. Entity class names are printed when found in orm.xml git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@734797 13f79535-47bb-0310-9956-ffa450edef68 --- .../openjpa/meta/AbstractCFMetaDataFactory.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java b/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java index eaacb7374..3050e227a 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java @@ -627,7 +627,7 @@ public abstract class AbstractCFMetaDataFactory throws IOException { ClassArgParser cparser = newClassArgParser(); String[] clss; - Set names = new HashSet(); + Set names = new HashSet(); if (files != null) { File file; for (Iterator itr = files.iterator(); itr.hasNext();) { @@ -655,9 +655,10 @@ public abstract class AbstractCFMetaDataFactory log.trace(_loc.get("scanning-file", file)); clss = cparser.parseTypeNames(new FileMetaDataIterator (file)); + List newNames = Arrays.asList(clss); if (log.isTraceEnabled()) - log.trace(_loc.get("scan-found-names", clss, file)); - names.addAll(Arrays.asList(clss)); + log.trace(_loc.get("scan-found-names", newNames, file)); + names.addAll(newNames); File f = AccessController .doPrivileged(J2DoPrivHelper .getAbsoluteFileAction(file)); @@ -714,9 +715,10 @@ public abstract class AbstractCFMetaDataFactory if (log.isTraceEnabled()) log.trace(_loc.get("scanning-url", url)); clss = cparser.parseTypeNames(new URLMetaDataIterator(url)); + List newNames = Arrays.asList(clss); if (log.isTraceEnabled()) - log.trace(_loc.get("scan-found-names", clss, url)); - names.addAll(Arrays.asList(clss)); + log.trace(_loc.get("scan-found-names", newNames, url)); + names.addAll(newNames); mapPersistentTypeNames(url, clss); } } @@ -752,9 +754,10 @@ public abstract class AbstractCFMetaDataFactory url = (URL) mitr.next(); clss = cparser.parseTypeNames(new URLMetaDataIterator (url)); + List newNames = Arrays.asList(clss); if (log.isTraceEnabled()) log.trace(_loc.get("scan-found-names", clss, rsrc)); - names.addAll(Arrays.asList(clss)); + names.addAll(newNames); mapPersistentTypeNames(url, clss); } mitr.close();