Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add existence check (file protocol) in URLImageDescriptor.getFilePath() #1788

Commits on Mar 30, 2024

  1. 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.
    HeikoKlare committed Mar 30, 2024
    Configuration menu
    Copy the full SHA
    828411a View commit details
    Browse the repository at this point in the history