Skip to content

Documentation of PersistService does not match its implementation #947

@skuzzle

Description

@skuzzle

The JavaDoc on its start() and stop() method states that nothing should happen if service is already started or stopped respectively. However, trying to call those methods twice results in an IllegalStateException being thrown by the implementation due to these checks:

public synchronized void start() {
    Preconditions.checkState(null == emFactory, "Persistence service was already initialized.");
    ...
}
public synchronized void stop() {
    Preconditions.checkState(emFactory.isOpen(), "Persistence service was already shut down.");
    ....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions