[
https://issues.apache.org/jira/browse/TIKA-1763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14948069#comment-14948069
]
Joseph North commented on TIKA-1763:
------------------------------------
I believe you're correct. Turns out I was seeing this exception because I was
pulling in an older version of metadata-extractor.
> StringIndexOutOfBoundsException in ImageMetadataExtractor
> ---------------------------------------------------------
>
> Key: TIKA-1763
> URL: https://issues.apache.org/jira/browse/TIKA-1763
> Project: Tika
> Issue Type: Bug
> Components: parser
> Affects Versions: 1.10
> Reporter: Joseph North
> Priority: Minor
>
> The {{trimPixels(String s)}} method in {{ImageMetadataExtractor}} will throw
> a {{StringIndexOutOfBoundsException}} if the string passed to it doesn't
> contain the substring " pixels". The method does a {{lastIndexOf(" pixels")}}
> call on the string passed to it and uses the result directly in a
> {{substring()}} call without checking whether the result is greater than -1.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)