-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add existence check (file protocol) in URLImageDescriptor.getFilePath()
The URLImageDescriptor.getFilePath() method currently returns a path for a given URL using the file protocol even if the file does not exist. This conflicts with the method's contract and breaks consumers (such as the scaled image data retrieval in SWT's DPIUtil). With this change, the method properly checks for the existence of a file at the given location and returns null in case it does not exist, according to the method's contract. A test case is added to demonstrate the bug and detect regressions.
- Loading branch information
1 parent
3f00c8b
commit 828411a
Showing
2 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters