Skip to content

NullpointerException in Topic #55

@chrosim

Description

@chrosim

I am facing a NPE sometimes which is raised in the Topic.class
More specific inside the clearExpiredData Method the namedMapData.get(name) sometimes results in a null value.

private void clearExpiredData() {
        Clock clock = collaborationEngine.getClock();
        if (lastDisconnected != null) {
            Instant now = clock.instant();
            mapExpirationTimeouts.forEach((name, timeout) -> {
                if (now.isAfter(lastDisconnected.plus(timeout))) {
                    namedMapData.get(name).clear();
                }
            });
            listExpirationTimeouts.forEach((name, timeout) -> {
                if (now.isAfter(lastDisconnected.plus(timeout))) {
                    namedListData.get(name).clear();
                }
            });
        }
        lastDisconnected = null;
    }

Versions
- Vaadin version: 14.8.0
- Collaboration Engine version: 3.2.2
- Java version: 11

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions