Projects >> realm-java >>a91663fae64c06a6ae9ba0dd0dd756bfe7b9014d

Chunk
Conflicting content
        }
    }

<<<<<<< HEAD
    // FIXME https://github.com/realm/realm-java/pull/2319/files
    //@Test
    public void processLocalListenersAfterRefresh() throws InterruptedException {
=======
    // This test assure that calling refresh will not trigger local listeners
    // after the Looper receives REALM_CHANGE message
    @Test
    public void processRefreshLocalListenersAfterLooperQueueStart() throws Throwable {
>>>>>>> b86a5359edf2d8ce530a87fc41dd23aa4da729bf
        // Used to validate the result
        final AtomicBoolean listenerWasCalled = new AtomicBoolean(false);
        final AtomicBoolean typeListenerWasCalled = new AtomicBoolean(false);
Solution content
        }
    }

    // This test assure that calling refresh will not trigger local listeners
    // after the Looper receivess REALM_CHANGE message
    @Test
    public void processRefreshLocalListenersAfterLooperQueueStart() throws Throwable {
        // Used to validate the result
        final AtomicBoolean listenerWasCalled = new AtomicBoolean(false);
        final AtomicBoolean typeListenerWasCalled = new AtomicBoolean(false);
File
RealmTests.java
Developer's decision
Manual
Kind of conflict
Annotation
Comment
Method signature
Chunk
Conflicting content
        if (isInTransaction()) {
            throw new IllegalStateException(BaseRealm.CANNOT_REFRESH_INSIDE_OF_TRANSACTION_MESSAGE);
        }
<<<<<<< HEAD
        sharedGroupManager.advanceRead();
        handlerController.notifyAllListeners();
=======
        if (handlerController == null) {
            // non Looper Thread, just advance the Realm
            // registering listeners is not allowed, hence nothing to notify
            sharedGroupManager.advanceRead();
        } else {
            handlerController.realm.handler.sendEmptyMessage(HandlerController.REALM_CHANGED);
        }
>>>>>>> b86a5359edf2d8ce530a87fc41dd23aa4da729bf
    }

    /**
Solution content
        if (isInTransaction()) {
            throw new IllegalStateException(BaseRealm.CANNOT_REFRESH_INSIDE_OF_TRANSACTION_MESSAGE);
        }
        if (handlerController == null) {
            // non Looper Thread, just advance the Realm
            // registering listeners is not allowed, hence nothing to notify
            sharedGroupManager.advanceRead();
        } else {
            handlerController.realm.handler.sendEmptyMessage(HandlerController.REALM_CHANGED);
        }
    }

    /**
File
BaseRealm.java
Developer's decision
Version 2
Kind of conflict
If statement
Method invocation