ICEpdf
  1. ICEpdf
  2. PDF-203

Minor Bug in generateNewSaveName

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.1, 4.1
    • Fix Version/s: 4.1.1
    • Component/s: Viewer RI
    • Labels:
      None
    • Environment:
      Win XP, JDK1.6.20,
    • Workaround Exists:
      Yes
    • Workaround Description:
      Do not open files without extensions.

      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.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #22498 Mon Oct 04 06:47:15 MDT 2010 patrick.corless PDF-203 applied file renaming patch that fixes index out of bounds when opening pdf files that don't have a .pdf extention. Patch also addes .pdf extension if missing.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/SwingController.java

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Dirk Maass
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: