From 82be380c1275672efdc0cd5d8bf47f75055f628f Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Fri, 26 Sep 2014 12:12:29 +0200 Subject: Store list of previously loaded URLs in CastorHashMap as Strings. URLs are inefficient. --- src/main/java/com/c2kernel/utils/CastorXMLUtility.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/c2kernel/utils') diff --git a/src/main/java/com/c2kernel/utils/CastorXMLUtility.java b/src/main/java/com/c2kernel/utils/CastorXMLUtility.java index e8e3ee4..5d279bf 100644 --- a/src/main/java/com/c2kernel/utils/CastorXMLUtility.java +++ b/src/main/java/com/c2kernel/utils/CastorXMLUtility.java @@ -76,17 +76,17 @@ public class CastorXMLUtility // init the castor mapping using the classloader of the class "CastorXMLUtility" Mapping thisMapping = new Mapping(defaultClassLoader); - HashSet loadedMapURLs = new HashSet(); + HashSet loadedMapURLs = new HashSet(); try { int wMapIdx=0; while( sTokenizer.hasMoreTokens() ) { String thisMap = sTokenizer.nextToken(); - URL thisMapURL = new URL(mapURL, thisMap); + String thisMapURL = new URL(mapURL, thisMap).toString(); wMapIdx++; if( !loadedMapURLs.contains(thisMapURL) ) { Logger.msg( 3, String.format("CastorXMLUtility.: Adding mapping file (%d/%d):[%s]", wMapIdx, wNbMap, thisMapURL)); - thisMapping.loadMapping( thisMapURL ); + thisMapping.loadMapping( new URL(thisMapURL) ); loadedMapURLs.add( thisMapURL ); } else { -- cgit v1.2.3