Skip to content

Commit

Permalink
simple fix (see PR 687 for correct singleton)
Browse files Browse the repository at this point in the history
  • Loading branch information
kermitt2 committed Mar 19, 2021
1 parent 227dffa commit e9189e3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ public static GrobidProperties getInstance() {
* If no one is set, then it creates one. {@inheritDoc #GrobidProperties()}
*/
public static GrobidProperties getInstance(GrobidHomeFinder grobidHomeFinder) {
GROBID_HOME_PATH = grobidHomeFinder.findGrobidHomeOrFail();
synchronized (GrobidProperties.class) {
GROBID_HOME_PATH = grobidHomeFinder.findGrobidHomeOrFail();
}
return getInstance();
}

Expand Down

0 comments on commit e9189e3

Please sign in to comment.