From: Xuan B. <med...@us...> - 2008-01-21 08:45:10
|
Update of /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/memory In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25136/src/org/tm4j/topicmap/memory Modified Files: TopicImpl.java Log Message: A little bit assertions for TopicImpl. Index: TopicImpl.java =================================================================== RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/memory/TopicImpl.java,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** TopicImpl.java 30 Apr 2007 13:53:12 -0000 1.76 --- TopicImpl.java 21 Jan 2008 08:45:09 -0000 1.77 *************** *** 1078,1081 **** --- 1078,1084 ---- mergedTopic = mergedTopic.getBaseTopic(); } + + assert m_topicMap!=null; + if (m_topicMap.getProperty(TopicMapProvider.OPT_STATIC_MERGE) .booleanValue()) { *************** *** 1584,1604 **** try { ! /* XB: ! ! It may be that ! (1) this topic is either a base topic serving for other topics or ! (2) that this topic is a merged topic having a base topic. ! ! In such cases, this topic needs to be detached from the other topics properly. ! ! */ ! ! if (!staticallyMerged()) { ! if (m_baseTopic!=null) { // We are a slave topic. We just need to sign off from our base topic. ! ((TopicImpl) m_baseTopic).removeMergedTopic(this); ! } else if ((m_mergedTopics!=null)&&!m_mergedTopics.isEmpty()) { // We are a base topic with at least one slave. ! throw new UnsupportedOperationException(); ! } ! } // If we get here, it is OK to destroy this Topic. --- 1587,1607 ---- try { ! /* XB: ! ! It may be that ! (1) this topic is either a base topic serving for other topics or ! (2) that this topic is a merged topic having a base topic. ! ! In such cases, this topic needs to be detached from the other topics properly. ! ! */ ! ! if (!staticallyMerged()) { ! if (m_baseTopic!=null) { // We are a slave topic. We just need to sign off from our base topic. ! ((TopicImpl) m_baseTopic).removeMergedTopic(this); ! } else if ((m_mergedTopics!=null)&&!m_mergedTopics.isEmpty()) { // We are a base topic with at least one slave. ! throw new UnsupportedOperationException(); ! } ! } // If we get here, it is OK to destroy this Topic. *************** *** 1717,1722 **** /* * $Log$ ! * Revision 1.76 2007/04/30 13:53:12 mediumnet ! * Convert concrete ID comparisons to more abstracted call equalsByID(). * * Revision 1.75 2007/04/20 12:23:12 mediumnet --- 1720,1728 ---- /* * $Log$ ! * Revision 1.77 2008/01/21 08:45:09 mediumnet ! * A little bit assertions for TopicImpl. ! * ! * Revision 1.76 2007/04/30 13:53:12 mediumnet ! * Convert concrete ID comparisons to more abstracted call equalsByID(). * * Revision 1.75 2007/04/20 12:23:12 mediumnet |