jep
jep copied to clipboard
SharedInterpreter.setConfig throws JepException with empty set of shared modules
Describe the bug
in SharedInterpreter.setConfig(JepConfig config) we read
if (config.sharedModules != null) {
throw new JepException(
"sharedModules cannot be used with SharedInterpreters");
}
But if looking at JepConfig, we can see that there is more than one way to have empty set of modules: With JepConfig.setSharedModules we can also set the empty set.
This would cause an exeption.
Suggestion: I would avoid null value altogether. That simplifies code and is better style also. I could prepare a patch.
Suggestion: in JepConfig also do the same with includePath.