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

FileType.Cfbf.getAllExtensions() returns null #676

Closed
ogawaffm opened this issue Aug 26, 2024 · 1 comment
Closed

FileType.Cfbf.getAllExtensions() returns null #676

ogawaffm opened this issue Aug 26, 2024 · 1 comment

Comments

@ogawaffm
Copy link
Contributor

ogawaffm commented Aug 26, 2024

The following code breaks because FileType.Cfbf.getAllExtensions() returns null instead of String[0]:

    private final static List<String> supportedImageFileTypes = new ArrayList<>();

    static {
        for (FileType fileType : FileType.values()) {
            for (String extension : fileType.getAllExtensions()) {
                supportedImageFileTypes.add(extension.toLowerCase());
            }
        }
    }

As expected, String[0] is returned for FileType.Unknown and FileType.Riff (both of which have no associated extension).

@ogawaffm ogawaffm changed the title Cfbf FileType.Cfbf.getAllExtensions() returns null Aug 26, 2024
ogawaffm added a commit to ogawaffm/metadata-extractor that referenced this issue Aug 26, 2024
drewnoakes added a commit that referenced this issue Aug 27, 2024
@drewnoakes
Copy link
Owner

Fixed in #677

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@drewnoakes @ogawaffm and others