-
Notifications
You must be signed in to change notification settings - Fork 179
[WIP] Allow IDE enable/disable escaping classpath entries in jars #4843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -978,6 +978,16 @@ private static void resolvedChainedLibraries(IPath jarPath, HashSet visited, Arr | |||||
| trace("Invalid Class-Path entry " + calledFileName + " in manifest of jar file: " + jarPath.toOSString()); //$NON-NLS-1$ //$NON-NLS-2$ | ||||||
| } | ||||||
| } else { | ||||||
| String escapePref = JavaCore.getOptions() | ||||||
| .get(JavaCore.CORE_ENABLE_ESACAPING_CP_ENTRIES_IN_JAR_MANIFEST); | ||||||
| if (JavaCore.DISABLED.equals(escapePref) && calledFileName.indexOf(DOT_DOT) != -1 | ||||||
| && hasDotDot(Path.fromPortableString(calledFileName))) { | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Question: the JavaDoc of
... and also
w.r.t. 1) I couldn't find any calls to w.r.t. to 2) The code already calls
so I would simply skip the indirection and call it directly:
Suggested change
|
||||||
| if (JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) { | ||||||
| trace("Invalid (escaping jar directory) Class-Path entry " + calledFileName //$NON-NLS-1$ | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NIT: to be able to search the log files more easily (a search for
Suggested change
|
||||||
| + " in manifest of jar file: " + jarPath.toOSString()); //$NON-NLS-1$ | ||||||
| } | ||||||
| continue; | ||||||
| } | ||||||
| IPath calledJar = directoryPath.append(new Path(calledFileName)); | ||||||
| // Ignore if segment count is Zero (https://bugs.eclipse.org/bugs/show_bug.cgi?id=308150) | ||||||
| if (calledJar.segmentCount() == 0) { | ||||||
|
|
||||||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JavaDoc is confusing:
I see that it is
DISABLEDinJavaCorePreferenceInitializer.