}
return result;
}
public NbJavaModule tryGetModule() {
JavaExtension javaExt = tryGetJavaExtension();
if (javaExt == null) {
return null;
}
if (!javaExt.hasEverBeenLoaded()) {
NbJavaModule result = initialModule;
if (result != null) {
return result;
}
// Else: This means that some other thread noticed that
// javaExt has been loaded and set initialModule to null.
}
// This reference is no longer needed, allow it to be garbage collected.
initialModule = null;
return javaExt.getCurrentModel().getMainModule();
}