Author: vgritsenko Date: Sun Apr 8 16:45:44 2007 New Revision: 526620 URL: http://svn.apache.org/viewvc?view=rev&rev=526620 Log: no need to save empty just created symbol table. minor logging changes.
Modified: xml/xindice/trunk/java/src/org/apache/xindice/core/SystemCollection.java xml/xindice/trunk/java/src/org/apache/xindice/xml/SymbolTableSymbols.java Modified: xml/xindice/trunk/java/src/org/apache/xindice/core/SystemCollection.java URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/core/SystemCollection.java?view=diff&rev=526620&r1=526619&r2=526620 ============================================================================== --- xml/xindice/trunk/java/src/org/apache/xindice/core/SystemCollection.java (original) +++ xml/xindice/trunk/java/src/org/apache/xindice/core/SystemCollection.java Sun Apr 8 16:45:44 2007 @@ -80,9 +80,7 @@ Configuration sysCfg = new Configuration(sysDoc, false); setConfig(sysCfg); } catch (Exception e) { - if (log.isFatalEnabled()) { - log.fatal("FATAL ERROR: Generating System Collection '" + SYSCOL + "'", e); - } + log.fatal("Failed to generate system collection '" + SYSCOL + "'", e); // TODO: System.exit() CANNOT be good here. System.exit(1); @@ -91,8 +89,10 @@ private String getSymbolTableName(Collection col) { String name = col.getCanonicalName(); + // Strip database name int idx = name.indexOf('/', 1); name = name.substring(idx + 1); + return name.replace('/', '_'); } @@ -110,7 +110,6 @@ SymbolTable symbols = (SymbolTable) symCol.getObject(name); if (symbols == null) { symbols = new SymbolTable(); - saveSymbols(collection, symbols); } return symbols; } Modified: xml/xindice/trunk/java/src/org/apache/xindice/xml/SymbolTableSymbols.java URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/xml/SymbolTableSymbols.java?view=diff&rev=526620&r1=526619&r2=526620 ============================================================================== --- xml/xindice/trunk/java/src/org/apache/xindice/xml/SymbolTableSymbols.java (original) +++ xml/xindice/trunk/java/src/org/apache/xindice/xml/SymbolTableSymbols.java Sun Apr 8 16:45:44 2007 @@ -52,8 +52,8 @@ Element symbols = DOMParser.toDocument(SYMBOLS_DEFINITION).getDocumentElement(); streamFromXML(symbols); } catch (Exception e) { - // Should not happen - log.error("Failed to create SymbolTableSymbols", e); + // Should never happen + log.fatal("Failed to create SymbolTableSymbols", e); } }