cdm/src/main/java/ucar/nc2/ft/point/SortingStationPointFeatureCache.java
private StationFeatureCopyFactory getStationFeatureCopyFactory(StationPointFeature proto) throws IOException {
        if (stationFeatCopyFactory == null) {
            synchronized (this) {
                if (stationFeatCopyFactory == null) {
                    stationFeatCopyFactory = createStationFeatureCopyFactory(proto);
                }
            }
        }

        assert stationFeatCopyFactory != null : "We screwed this up.";
        return stationFeatCopyFactory;
    }
private StationFeatureCopyFactory getStationFeatureCopyFactory(StationPointFeature proto) throws IOException {
        if (stationFeatCopyFactory == null) {
            synchronized (this) {
                if (stationFeatCopyFactory == null) {
                    stationFeatCopyFactory = createStationFeatureCopyFactory(proto);
                }
            }
        }

        assert stationFeatCopyFactory != null : "We screwed this up.";
        return stationFeatCopyFactory;
    }
private StationFeatureCopyFactory getStationFeatureCopyFactory ( StationPointFeature proto ) throws IOException { if ( stationFeatCopyFactory == null ) { synchronized ( this ) { if ( stationFeatCopyFactory == null ) { stationFeatCopyFactory = createStationFeatureCopyFactory ( proto ) ; } } } assert stationFeatCopyFactory != null : "We screwed this up." ; return stationFeatCopyFactory ; }
Double-check idiom for lazy initialization of instance fields. See Effective Java 2nd Ed, p. 283.
Double - check idiom for lazy initialization of instance fields . See Effective Java 2nd Ed p . 283 .