diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-09-26 12:12:29 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-09-26 12:12:29 +0200 |
| commit | 82be380c1275672efdc0cd5d8bf47f75055f628f (patch) | |
| tree | 2215b32d7ac703a845f0f667a336d154be32a88b /src | |
| parent | eb89b02143904370926a64e016bbbef43b1e3894 (diff) | |
Store list of previously loaded URLs in CastorHashMap as Strings. URLs
are inefficient.
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/java/com/c2kernel/utils/CastorXMLUtility.java | 6 |
1 files changed, 3 insertions, 3 deletions
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<URL> loadedMapURLs = new HashSet<URL>();
+ HashSet<String> loadedMapURLs = new HashSet<String>();
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.<init>: Adding mapping file (%d/%d):[%s]", wMapIdx, wNbMap, thisMapURL));
- thisMapping.loadMapping( thisMapURL );
+ thisMapping.loadMapping( new URL(thisMapURL) );
loadedMapURLs.add( thisMapURL );
}
else {
|
