| author | xwu | 2012-02-08 04:27:08 (EST) |
|---|---|---|
| committer | mwu | 2012-02-08 04:27:08 (EST) |
| commit | 2ef4b536bc225c453ae57c2a40f96f4ba3a55864 (patch) (side-by-side diff) | |
| tree | 3515257a7f9717b826c3c92a588f890d1454eefb | |
| parent | c4ab4c02c0fd7304d78468ba6b0b1b0115f4a7ad (diff) | |
| download | org.eclipse.birt-2ef4b536bc225c453ae57c2a40f96f4ba3a55864.zip org.eclipse.birt-2ef4b536bc225c453ae57c2a40f96f4ba3a55864.tar.gz org.eclipse.birt-2ef4b536bc225c453ae57c2a40f96f4ba3a55864.tar.bz2 | |
- Summary:
Fixed [Issue 47260] DTPUtil not encoding URI on linux correctly.
- Description of Issue:
DTPUtil not encoding URI on linux correctly.
- Description or Resolution:
If the resource folder location is absolute, then use new File( location
).toURI() as the returned value.
- TED(s) Resolved:
[Issue 47260]
- Regression ( Yes/No ):
NO
- Code Owner Team:
Birt DTE
- Code Reviewers:
Bin Feng
- Project ID:
1577
- Manual Test Description:
Tested.
- Tests Automated Cases Executed:
None
- Special Notes:
None
| -rw-r--r-- | UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/util/DTPUtil.java | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/util/DTPUtil.java b/UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/util/DTPUtil.java index e2105cf..9f0cd9e 100644 --- a/UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/util/DTPUtil.java +++ b/UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/util/DTPUtil.java @@ -417,16 +417,24 @@ public class DTPUtil if ( handle != null ) { String rscFolder = handle.getResourceFolder( ); - try + File file = new File( rscFolder ); + if ( file.isAbsolute( ) ) { - return new URI( rscFolder ); + return file.toURI( ); } - catch ( URISyntaxException ex ) + else { - return new URI( null, - null, - convertURI( rscFolder ), - null ); + try + { + return new URI( rscFolder ); + } + catch ( URISyntaxException ex ) + { + return new URI( null, + null, + convertURI( rscFolder ), + null ); + } } } } @@ -440,6 +448,11 @@ public class DTPUtil String rscFolder = ReportPlugin.getDefault( ) .getResourceFolder( getCurrentProject( ), (ModuleHandle) null ); + File file = new File( rscFolder ); + if ( file.isAbsolute( ) ) + { + return file.toURI( ); + } try { return new URI( rscFolder ); |

