[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[birt-dev]CheckIn: Fix Bugzilla Bug --- 153532 cannot preview image if image URI is a network path
|
Title: [birt-dev]CheckIn: Fix Bugzilla Bug --- 153532 cannot preview image if image URI is a network path
- Summary:
- Bugzilla Bug (s) Resolved:
153532 cannot preview image if image URI is a network path
- Description:
The feature of URL and file is strange in java. Assume we have a file: //host/folder/file.txt,
String fileName = "//host/folder/file.txt";
File file = new File(fileName);
URL urlOfFile = file.toURL();
URL url = "" URL(urlOfFile.toString());
We always assume that the url is equals to urlOfFile, and it does equals for urlOfFile.toString() and url.toString(), they are both:
"file://host/folder/file.txt".
Actually, the two URLs are not equals.
urlOfFile.getHost() == null while url.getHost() == "host".
urlOfFile.getFile() == "//host/folder/file.txt" while url.getFile() == "/folder/file.txt".
That means:
new File("//host/folder/file.txt").toURL() is equals to new URL("file:////host/folder/file.txt") instead of new URL("file://host/folder/file.txt").
- Tests Description :
Manual text
- Notes to Build Team:
- Notes to Developers:
- Notes to QA:
- Notes to Documentation:
- Files Edited:
cvs ci -m "fixed the issue which caused by new URL(file.toURL().toString()) is not equals to file.toURL()" -l "/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/executor/ImageItemExecutor.java"
- Files Added:
- Files Deleted
-Wei Yan