Details
Description
When having opened a pdf File without any extension (wich is possible via the openDocument() method, i use)
I'll get a StringIndexOutOfBoundsException at the "Save As" Action
Exception in thread "AWT-EventQueue-0" ]
java.lang.StringIndexOutOfBoundsException: String index out of range: -2
at java.lang.String.substring(String.java:1938)
at org.icepdf.ri.common.SwingController.generateNewSaveName(SwingController.java:2234)
at org.icepdf.ri.common.SwingController.saveFile(SwingController.java:2150)
at org.icepdf.ri.common.SwingController$9.run(SwingController.java:3252)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
I'll attach a small patch later.
I'll get a StringIndexOutOfBoundsException at the "Save As" Action
Exception in thread "AWT-EventQueue-0" ]
java.lang.StringIndexOutOfBoundsException: String index out of range: -2
at java.lang.String.substring(String.java:1938)
at org.icepdf.ri.common.SwingController.generateNewSaveName(SwingController.java:2234)
at org.icepdf.ri.common.SwingController.saveFile(SwingController.java:2150)
at org.icepdf.ri.common.SwingController$9.run(SwingController.java:3252)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
I'll attach a small patch later.
Activity
Dirk Maass
created issue -
Dirk Maass
made changes -
Field | Original Value | New Value |
---|---|---|
Attachment | SwingControllerGenerateNewSaveNameTest.java [ 12499 ] | |
Attachment | icepdf4.1.0-generateNewFilename.patch [ 12500 ] |
Patrick Corless
made changes -
Salesforce Case | [] | |
Fix Version/s | 4.1.1 [ 10244 ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #22498 | Mon Oct 04 06:47:15 MDT 2010 | patrick.corless | |
Files Changed | ||||
MODIFY
/icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/SwingController.java
|
Patrick Corless
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Added a junit test wich addresses this issue and a small patch to fix it.
Could you please review it?