Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354277 - [target] URISyntaxException when parsing repository/@location is interpreted as "All Available Sites"
Summary: [target] URISyntaxException when parsing repository/@location is interpreted ...
Status: RESOLVED WORKSFORME
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-09 12:43 EDT by Tobias Oberlies CLA
Modified: 2019-09-02 15:09 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Oberlies CLA 2011-08-09 12:43:00 EDT
When a target definition with location/@type="InstallableUnit" contains only one repository tag, and the repository URL is not a valid URI, the units in the location are resolved against all p2 repositoryies which happen to be known to the repository manager used by the target editor.

This is a nasty behaviour because the person who broke the target definition will not notice that he did.


Steps to reproduce:
1) Save the following as working.target and open with the target editor:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.6"?>

<target name="indigo" sequenceNumber="0">
<locations>
<location includeAllPlatforms="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.platform.feature.group" version="3.7.0.v20110530-9gF7UHNFFt4cwE-pkZDJ7oz-mj4OSEIlu9SEv0f"/>
<repository location="http://download.eclipse.org/releases/indigo"/>
</location>
</locations>
</target>

2) Save the following as uriSyntaxException.target and open with the target editor:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.6"?>

<target name="indigo" sequenceNumber="0">
<locations>
<location includeAllPlatforms="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.platform.feature.group" version="3.7.0.v20110530-9gF7UHNFFt4cwE-pkZDJ7oz-mj4OSEIlu9SEv0f"/>
<repository location="http:/{WTF!?}/"/>
</location>
</locations>
</target>

The second target definition will resolve!


The root cause for this broken behaviour lies in the caught and unhandeled URISyntaxException in TargetPersistence36Helper:229.
Comment 1 Eclipse Genie CLA 2019-01-06 14:39:38 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Lars Vogel CLA 2019-09-02 15:09:30 EDT
This bug was marked as stalebug a while ago. Marking as worksforme.

If this report is still relevant for the current release, please reopen and remove the stalebug whiteboard tag.
Comment 3 Lars Vogel CLA 2019-09-02 15:09:54 EDT
This bug has been marked as stalebug a while ago without any further interaction.

If this report is still relevant for the current release, please reopen and remove the stalebug whiteboard flag.