Project

Profile

Help

Revision e9de7a36

Added by Michael Kay about 5 years ago

Fix bug 2926 - synchronize lastRememberedNumber

View differences:

latest9.6/hej/net/sf/saxon/Controller.java
223 223
     * is serially reused
224 224
     */
225 225

  
226
    private void clearPerTransformationData() {
226
    private synchronized void clearPerTransformationData() {
227 227
        userDataTable = new HashMap<String, Object>(20);
228 228
        principalResult = null;
229 229
        //principalResultURI = null;
......
2593 2593
     * @param number the number of this node
2594 2594
     */
2595 2595

  
2596
    public void setRememberedNumber(NodeInfo node, int number) {
2596
    public synchronized void setRememberedNumber(NodeInfo node, int number) {
2597 2597
        lastRememberedNode = node;
2598 2598
        lastRememberedNumber = number;
2599 2599
    }
......
2607 2607
     * @return the number of this node if known, else -1.
2608 2608
     */
2609 2609

  
2610
    public int getRememberedNumber(NodeInfo node) {
2610
    public synchronized int getRememberedNumber(NodeInfo node) {
2611 2611
        if (lastRememberedNode == node) {
2612 2612
            return lastRememberedNumber;
2613 2613
        }

Also available in: Unified diff