eclipse-jdt / eclipse.jdt.core

Eclipse Public License 2.0
164 stars 130 forks source link

Fix classpath issues in ClasspathJrt and model tests #3108

Closed stephan-herrmann closed 3 weeks ago

stephan-herrmann commented 3 weeks ago
stephan-herrmann commented 3 weeks ago

Fix test's getJCL15PlusLibraryIfNeeded()

For posterity a word on why I made this change: when running model tests with -Dcompliance=23 or any setting that doesn't include 1.8, then ClasspathTest.testBug576735a would throw NPE because in this configuration getJCL15PlusLibraryIfNeeded() returned null, simply because the requested "1.8" is not in the set of compliances specified via the system property. I'm quite sure that when explicitly requesting the JCL lib for a specific compliance, then that library should be provided (and not hardcoded "1.8"), no matter what system property was passed in.