jep icon indicating copy to clipboard operation
jep copied to clipboard

SharedInterpreter.setConfig throws JepException with empty set of shared modules

Open Reissner opened this issue 5 years ago • 0 comments

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.

Reissner avatar May 08 '20 08:05 Reissner