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
This commit is contained in:
Michael Dick 2009-01-15 20:21:45 +00:00
parent 88f288b47a
commit 696388049b
1 changed files with 9 additions and 6 deletions

View File

@ -627,7 +627,7 @@ public abstract class AbstractCFMetaDataFactory
throws IOException {
ClassArgParser cparser = newClassArgParser();
String[] clss;
Set names = new HashSet();
Set<String> names = new HashSet<String>();
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<String> 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<String> 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<String> 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();