Bug 553276

Summary: If directory has spaces, then add API baseline doesn't work
Product: [Eclipse Project] PDE Reporter: Vikas Chandra <Vikas.Chandra>
Component: API ToolsAssignee: Vikas Chandra <Vikas.Chandra>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: akurtakov, daniel_megert, edscadding, sarika.sinha
Version: 4.14Keywords: regression
Target Milestone: 4.14 RC1Flags: sarika.sinha: review+
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/153288
https://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=38ca2f903f105ac23b0d576c3d8fb3749fbc4ea7
Whiteboard:
Attachments:
Description Flags
Code where problem starts none

Description Vikas Chandra CLA 2019-11-20 10:33:54 EST
1) Create a plugin project
2) Export as "deployable plugin and feature"
3) Move the folder to any folder like E&C Learner_files
4) Try to set api baseline

It shows 0 plugins however there was 1 plugin we just put

Problem happens in 4.11 as well but works in Luna
Comment 1 Vikas Chandra CLA 2019-11-20 10:34:57 EST
Created attachment 280744 [details]
Code where problem starts
Comment 2 Vikas Chandra CLA 2019-11-20 10:35:19 EST
PluginPathFinder.scanLocations(File[]) line: 284
Comment 3 Eclipse Genie CLA 2019-11-24 23:53:43 EST Comment hidden (obsolete)
Comment 4 Vikas Chandra CLA 2019-11-25 00:04:49 EST
>>Problem happens in 4.11 as well but works in Luna

I double checked and found that this works well in 4.12 and 4.13, not sure how I check it problem to be happening in 4.11
Comment 5 Eclipse Genie CLA 2019-11-25 00:11:04 EST Comment hidden (obsolete)
Comment 6 Eclipse Genie CLA 2019-11-25 01:28:46 EST
New Gerrit change created: https://git.eclipse.org/r/153288
Comment 7 Vikas Chandra CLA 2019-11-25 01:40:31 EST
Candidate gerrit for RC1 - > https://git.eclipse.org/r/153288
Comment 8 Sarika Sinha CLA 2019-11-25 04:00:32 EST
Looks good to me for RC1.
Comment 9 Vikas Chandra CLA 2019-11-25 04:35:38 EST
Caused by 176312d9c10572510576b11df4e711a4d118025e

Address SonarQube blockers - URL maps/sets performance

Change-Id: I0759732abe9bd1d2d659e0ac5f9a676647c40df6
Comment 11 Vikas Chandra CLA 2019-11-25 23:21:21 EST
verified on
Eclipse SDK

Version: 2019-12 (4.14)
Build id: I20191125-1800
Comment 12 Ed Scadding CLA 2019-11-30 06:08:12 EST
Explanation of problem:

File-to-URL conversion
  Current conversion:  File.toURL()
  Problem:             Deprecated; doesn't produce properly escaped URLs
  Improved conversion: File.toURI().toURL()

URL-to-File conversion
  Current conversion:  new File(URL.getFile())
  Problem:             Doesn't unescape URLs
  Improved conversion: new File(URL.toURI())

The earlier patch improved the File-to-URL conversion to address a SonarQube blocker, but in doing so revealed the issue with URL-to-File conversion.

If the SonarQube blocker is to be (re-)addressed, both sides of the conversion will need updating at once. As PDE does a lot of conversions in both directions I'm not sure how desirable that work would be!