Documentation of PersistService does not match its implementation
Open
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 1.7k
- Avg merge
- 11m
- Merged PRs (30d)
- 2
Description
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:
``` java
public synchronized void start() {
Preconditions.checkState(null == emFactory, "Persistence service was already initialized.");
...
}
```
``` java
public synchronized void stop() {
Preconditions.checkState(emFactory.isOpen(), "Persistence service was already shut down.");
....
```
Contributor guide
Assessment
This issue has not been assessed yet.