WSLDistribution (@NonNls @NotNull String msId, boolean overrideCaseInsensitively) { if (msId.isEmpty()) { throw new IllegalArgumentException("WSL msId is empty"); } // reuse previously created WSLDistribution instances to avoid re-calculating Host IP / WSL IP WSLDistribution d = myMsIdToDistributionCache.get(msId); if (d == null || (overrideCaseInsensitively && !d.getMsId().equals(msId))) { synchronized (myMsIdToDistributionCache) { d = myMsIdToDistributionCache.get(msId); if (d == null || (overrideCaseInsensitively && !d.getMsId().equals(msId))) { d = new WSLDistribution(msId); myMsIdToDistributionCache.put(msId, d); } } } return d; }