package org.chtijbug.drools.platform.core.droolslistener;

import org.chtijbug.drools.entity.history.HistoryEvent;
import org.chtijbug.drools.runtime.DroolsChtijbugException;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by nheron on 07/06/15.
 */
public class SessionHistoryListener implements PlatformHistoryListener{

    private List<HistoryEvent> historyEvents= new ArrayList<>();

    public SessionHistoryListener() {
    }

    public List<HistoryEvent> getHistoryEvents() {
        return historyEvents;
    }

    @Override
    public void shutdown() {
        this.historyEvents.clear();

    }

    @Override
    public void fireEvent(HistoryEvent newHistoryEvent) throws DroolsChtijbugException {
        if (this.historyEvents!=null){
            this.historyEvents.add(newHistoryEvent);
        }
    }
}

@@ -197,16 +197,45 @@
 ayList;%0A
+import java.util.LinkedList;%0A
 import j
@@ -415,21 +415,22 @@
 ts= new 
-Array
+Linked
 List%3C%3E()

Update SessioHistoryListener to create a LinkedList