Skip to content

Commit a6938ad

Browse files
committed
lower lock
1 parent 976cb93 commit a6938ad

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎common-tools/clas-io/src/main/java/org/jlab/utils/CLASResources.java‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ public class CLASResources {
1111

1212
private static volatile SchemaFactory FULL_SCHEMA = null;
1313

14-
public static synchronized SchemaFactory getFullSchema() {
15-
if (FULL_SCHEMA == null) {
16-
FULL_SCHEMA = new SchemaFactory();
17-
FULL_SCHEMA.initFromDirectory(getResourcePath("etc/bankdefs/hipo4"));
14+
public static SchemaFactory getFullSchema() {
15+
synchronized (FULL_SCHEMA) {
16+
if (FULL_SCHEMA == null) {
17+
FULL_SCHEMA = new SchemaFactory();
18+
FULL_SCHEMA.initFromDirectory(getResourcePath("etc/bankdefs/hipo4"));
19+
}
1820
}
1921
SchemaFactory s = new SchemaFactory();
2022
s.copy(FULL_SCHEMA);

0 commit comments

Comments
 (0)