We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41e3275 commit e836ce3Copy full SHA for e836ce3
common-tools/clas-detector/src/main/java/org/jlab/detector/calib/utils/RCDBProvider.java
@@ -16,11 +16,10 @@ public class RCDBProvider {
16
17
public static class RCDBManager {
18
HashMap<Integer,RCDBConstants> cache = new HashMap<>();
19
- RCDBProvider provider = new RCDBProvider();
+ RCDBProvider provider = null;
20
public synchronized RCDBConstants getConstants(int run) {
21
- if (!cache.containsKey(run)) {
22
- cache.put(run, provider.getConstants(run));
23
- }
+ if (provider == null) provider = new RCDBProvider();
+ if (!cache.containsKey(run)) cache.put(run, provider.getConstants(run));
24
return cache.get(run);
25
}
26
public Double getTorusScale(int run) {
0 commit comments