-
Bug
-
Resolution: Duplicate
-
P2
-
6u18
-
generic
-
generic
requestAssociation with empty file extension string {""} throws StringIndexOutOfBoundsException
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(Unknown Source)
at com.sun.deploy.association.utility.AppUtility.addDotToFileExtension(Unknown Source)
at com.sun.deploy.association.Association.addFileExtension(Unknown Source)
at com.sun.jnlp.IntegrationServiceImpl.hasAssociation(Unknown Source)
Here again we may need throw either IllegalArgumentException or should not create any association with file extension should not throw this Runtime Exception.
IntegrationService is = (IntegrationService)
ServiceManager.lookup("javax.jnlp.IntegrationService");
String mime = "abc/xyz";
String [] exts = {""};
boolean result = is.requestAssociation(mime,exts);
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(Unknown Source)
at com.sun.deploy.association.utility.AppUtility.addDotToFileExtension(Unknown Source)
at com.sun.deploy.association.Association.addFileExtension(Unknown Source)
at com.sun.jnlp.IntegrationServiceImpl.hasAssociation(Unknown Source)
Here again we may need throw either IllegalArgumentException or should not create any association with file extension should not throw this Runtime Exception.
IntegrationService is = (IntegrationService)
ServiceManager.lookup("javax.jnlp.IntegrationService");
String mime = "abc/xyz";
String [] exts = {""};
boolean result = is.requestAssociation(mime,exts);
- duplicates
-
JDK-6889916 IntegrationService association API should check arguments
- Closed