Details
-
Bug
-
Resolution: Won't Fix
-
Medium
-
None
-
2.10.2
-
Application Server: Apache Tomcat/5.5.20
javaVersion: 1.5.0_15
javaRuntime: Java(TM) 2 Runtime Environment, Standard Edition
operatingSystem: SunOS 5.10
Description
When searching, if the search results contain attachment(s) which happen to have MIME type of "/" Confluence throws a stack trace with a root cause of Caused by: java.util.NoSuchElementException
at java.util.StringTokenizer.nextToken(StringTokenizer.java:332)
at com.atlassian.confluence.util.actions.ContentTypesDisplayMapper.getIconForAttachment(ContentTypesDisplayMapper.java:116)
...
To be exact:
StringTokenizer tokenizer = new StringTokenizer(contentType, "/");
String mainType = tokenizer.nextToken();
It should be checked if there is a token to be found before accessing it.