diff options
| author | Florian Barbin | 2017-07-21 16:03:12 +0000 |
|---|---|---|
| committer | Florian Barbin | 2017-07-26 07:37:48 +0000 |
| commit | 2ce9b7e0a4ce68820e63332f4dea28ff88509e60 (patch) | |
| tree | bda4371c0e61a2654450452f9a27f2b888b9c78d | |
| parent | b55ab983ba646eba0f14693aef048bbcfc86711b (diff) | |
| download | org.eclipse.sirius-2ce9b7e0a4ce68820e63332f4dea28ff88509e60.tar.gz org.eclipse.sirius-2ce9b7e0a4ce68820e63332f4dea28ff88509e60.tar.xz org.eclipse.sirius-2ce9b7e0a4ce68820e63332f4dea28ff88509e60.zip | |
[516669] Encode the URI Segment to be always valid.
Special character in the representation description name could lead to
an invalid srm resource uri.
Bug: 516669
Change-Id: Id13680748ccd5aa8195e81ae12b3cd2b112ddc7d
Signed-off-by: Florian Barbin <florian.barbin@obeo.fr>
| -rw-r--r-- | plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/representation/DRepLocationRuleForLocalResource.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/representation/DRepLocationRuleForLocalResource.java b/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/representation/DRepLocationRuleForLocalResource.java index 38506268f1..1572659e5e 100644 --- a/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/representation/DRepLocationRuleForLocalResource.java +++ b/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/representation/DRepLocationRuleForLocalResource.java @@ -129,10 +129,10 @@ public class DRepLocationRuleForLocalResource implements DRepresentationLocation protected URI createRepURI(Resource airdResource, DRepresentation representation, String providedSuffix, int count) { // get the representation URI fragment RepresentationDescription description = DialectManager.INSTANCE.getDescription(representation); - String repName = description.getName().replace(' ', '_'); + String repName = description.getName(); String suffix = providedSuffix != null ? providedSuffix : String.valueOf(count); repName += "_" + suffix; //$NON-NLS-1$ - + repName = URI.encodeSegment(repName, true); URI airdURI = airdResource.getURI(); List<String> srmFileSegments = new ArrayList<>(airdURI.segmentsList()); |
