ICEpdf
  1. ICEpdf
  2. PDF-1235

SwingController isAnnotationUtilityPaneVisible is generating null pointer

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.3
    • Fix Version/s: 6.3.1
    • Component/s: Viewer RI
    • Labels:
      None
    • Environment:
      viewer

      Description

      A community member has pointed out that when build the viewer component example and manual set the PropertiesManager.PROPERTY_SHOW_UTILITYPANE_ANNOTATION they are getting a null pointer exception.

        Activity

        Patrick Corless created issue -
        Patrick Corless made changes -
        Field Original Value New Value
        Fix Version/s 6.3.1 [ 13113 ]
        Hide
        Patrick Corless added a comment -

        The error is coming from an incorrectly protect call to annotationPanelisVisible(). in the isAnnotationUtilityPaneVisible() method. Once this it is properly protected the viewer loads.

        I think the likely cause was that the annotation was set into invisible via the properties which get the swingController in the state that causes the null pointer.

        Show
        Patrick Corless added a comment - The error is coming from an incorrectly protect call to annotationPanelisVisible(). in the isAnnotationUtilityPaneVisible() method. Once this it is properly protected the viewer loads. I think the likely cause was that the annotation was set into invisible via the properties which get the swingController in the state that causes the null pointer.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #52319 Fri Feb 16 12:23:04 MST 2018 patrick.corless PDF-1235 fix a code protection bug when setting annotation pane visiblity.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/viewer-awt/src/main/java/org/icepdf/ri/common/SwingController.java
        Hide
        Patrick Corless added a comment -

        It also should be noted the the properties manager persists the state of any property in 6.3. On first load org.icepdf.ri.viewer.res.ICEpdfDefault.properties is used. If a customer viewer state is preferred it may be easier to update the properties file instead of directly manipulating the PropertiesManager.

        Also the properties Manager can be reset and the next use of the Viewer will restore the defaults.

        PropertiesManager properties = PropertiesManager.getInstance();
        properties.getPreferences().clear();

        Show
        Patrick Corless added a comment - It also should be noted the the properties manager persists the state of any property in 6.3. On first load org.icepdf.ri.viewer.res.ICEpdfDefault.properties is used. If a customer viewer state is preferred it may be easier to update the properties file instead of directly manipulating the PropertiesManager. Also the properties Manager can be reset and the next use of the Viewer will restore the defaults. PropertiesManager properties = PropertiesManager.getInstance(); properties.getPreferences().clear();
        Hide
        Patrick Corless added a comment -

        Marking as fixed.

        Show
        Patrick Corless added a comment - Marking as fixed.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: