Changeset 316 for trunk


Ignore:
Timestamp:
12/14/11 13:44:46 (13 years ago)
Author:
sherbold
Message:
  • fixed bug in de.ugoe.cs.eventbench.models.Trie.getContextSuffix() which now handles null values correctly. Test case de.ugoe.cs.eventbench.models.TrieTest?.testGetContextSuffix_5() should now run without failures
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/EventBenchCore/src/de/ugoe/cs/eventbench/models/Trie.java

    r258 r316  
    250250         */ 
    251251        public List<T> getContextSuffix(List<T> context) { 
    252                 List<T> contextSuffix = new LinkedList<T>(context); // defensive copy 
     252                List<T> contextSuffix; 
     253                if( context!=null ) { 
     254                        contextSuffix = new LinkedList<T>(context); // defensive copy 
     255                } else { 
     256                        contextSuffix = new LinkedList<T>(); 
     257                } 
    253258                boolean suffixFound = false; 
    254259 
Note: See TracChangeset for help on using the changeset viewer.