From: Kal A. <kal...@us...> - 2004-08-29 18:25:49
|
Update of /cvsroot/tm4j/tm4web/velocity/src/java/org/tm4j/vtl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9766 Modified Files: LoadableTMImpl.java Log Message: Fixed NPE when loading a topic map from a persistent store by its base locator. Index: LoadableTMImpl.java =================================================================== RCS file: /cvsroot/tm4j/tm4web/velocity/src/java/org/tm4j/vtl/LoadableTMImpl.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** LoadableTMImpl.java 14 Aug 2004 16:15:00 -0000 1.9 --- LoadableTMImpl.java 29 Aug 2004 18:25:40 -0000 1.10 *************** *** 268,272 **** public boolean load(ServletContext servletContext) throws TopicMapProviderException, IOException, MalformedURLException, LocatorFactoryException { ! m_topicMap = m_provider.getTopicMap(m_source); if (m_topicMap == null) { --- 268,276 ---- public boolean load(ServletContext servletContext) throws TopicMapProviderException, IOException, MalformedURLException, LocatorFactoryException { ! String baseURIAddress = m_cfg.getBaseURI(); ! if (baseURIAddress != null) { ! Locator baseURI = m_provider.getLocatorFactory().createLocator("URI", baseURIAddress); ! m_topicMap = m_provider.getTopicMap(baseURI); ! } if (m_topicMap == null) { |