Fix possible NPE in maven ModuleInfoSelector by mbien · Pull Request #9181 · apache/netbeans (original) (raw)
I guess I wonder the "polarity" should be reversed, i.e. if there's no source level, then maybe we should consider the source level to be 9+ nowadays? Or does that have some known severe impact?
like
if (sourceLevel == null || !sourceLevel.startsWith("1.")) { //NOI18N
// both sourceLevel and ideJDK are 9+
ret = hasModuleInfoCP.get();
}
?
changing the bias should be possible I think. But I am not sure why the source level query exists in the first place, if there is a module-info file, it can't be <=8 anymore which seems to be the purpose of the check.
I would prefer to keep it as is for NB 29 and consider reverting #2037 for NB 30.