uPortal
  1. uPortal
  2. UP-2443

findbugs automated code review: (possible) null pointer dereferences

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.0
    • Fix Version/s: 3.0.4, 3.1.1, 3.2.0-RC1
    • Component/s: Framework
    • Labels:
      None

      Description

      Findbugs reports 15 nullpointer dereferences in uportal-impl (disregarding tests). While these (usually) have no clear reproduction-scenario from the end-user's perspective, they are often cause for a misbehaving API, obscure failures in other places, point to unintended programming mistakes, etc.

      As we are planning to go in production with 3.1 and most of the reported issues of this type seem easy enough to fix, I created a patch for 14 of them.

      Included is a document describing the patch, a document describing the actual code-changes and the Findbugs-report before and after patching. The patch has been tested on the rel-3-1-patches branch at revision 46003

      1. findbugs-report_post_patch.txt
        0.8 kB
        Ernst-Jan Verhoeven
      2. findbugs-report_pre_patch.txt
        4 kB
        Ernst-Jan Verhoeven
      3. uPortal-3-rev45962.patch
        9 kB
        Ernst-Jan Verhoeven
      4. uPortal-3-rev45962-patchinfo.txt
        6 kB
        Ernst-Jan Verhoeven
      5. uPortal-trunk_rev46007.patch
        8 kB
        Ernst-Jan Verhoeven

        Activity

        Hide
        Ernst-Jan Verhoeven added a comment -

        note that this issue is not fixed by the patch;

        uPortal_trunk-3-1-patches/uportal-impl/src/main/java/org/jasig/portal/layout/dlm/remoting/UpdatePreferencesServlet.java:514 H C NP: Possible null pointer dereference of node in org.jasig.portal.layout.dlm.remoting.UpdatePreferencesServlet.addChannel(IPerson, UserPreferencesManager, IUserLayoutManager, IUserInstanceManager, HttpServletRequest, HttpServletResponse)

        While I feel it is a valid case, I was not able to figure out the developer's intent in this method.

        Show
        Ernst-Jan Verhoeven added a comment - note that this issue is not fixed by the patch; uPortal_trunk-3-1-patches/uportal-impl/src/main/java/org/jasig/portal/layout/dlm/remoting/UpdatePreferencesServlet.java:514 H C NP: Possible null pointer dereference of node in org.jasig.portal.layout.dlm.remoting.UpdatePreferencesServlet.addChannel(IPerson, UserPreferencesManager, IUserLayoutManager, IUserInstanceManager, HttpServletRequest, HttpServletResponse) While I feel it is a valid case, I was not able to figure out the developer's intent in this method.
        Hide
        Cris Holdorph added a comment -

        Please provide a patch for trunk as well.

        Show
        Cris Holdorph added a comment - Please provide a patch for trunk as well.
        Hide
        Ernst-Jan Verhoeven added a comment -

        this patch only differs from the rev45962 version in that it removes the part where uportal-impl/src/main/java/org/jasig/portal/RDBMChannelRegistryStore.java is patched (as this class doesn't exist in trunk anymore)

        Show
        Ernst-Jan Verhoeven added a comment - this patch only differs from the rev45962 version in that it removes the part where uportal-impl/src/main/java/org/jasig/portal/RDBMChannelRegistryStore.java is patched (as this class doesn't exist in trunk anymore)
        Hide
        Ernst-Jan Verhoeven added a comment -

        this patch only differs from the previous one in that it doesn't patch uportal-impl/src/main/java/org/jasig/portal/RDBMChannelRegistryStore.java (as this class doesn't exist in trunk)

        Show
        Ernst-Jan Verhoeven added a comment - this patch only differs from the previous one in that it doesn't patch uportal-impl/src/main/java/org/jasig/portal/RDBMChannelRegistryStore.java (as this class doesn't exist in trunk)
        Hide
        Ernst-Jan Verhoeven added a comment -

        can someone with remove-powers please remove the patch from 18/May/09 04:07 PM? the one named uPortal_trunk_rev46007.patch

        Show
        Ernst-Jan Verhoeven added a comment - can someone with remove-powers please remove the patch from 18/May/09 04:07 PM? the one named uPortal_trunk_rev46007.patch
        Hide
        Eric Dalquist added a comment -

        Fixed in trunk (46039), 3.1-patches (46040) and 3.0-patches (46042)

        Show
        Eric Dalquist added a comment - Fixed in trunk (46039), 3.1-patches (46040) and 3.0-patches (46042)
        Hide
        Eric Dalquist added a comment -

        Reopen to remove comment spam

        Show
        Eric Dalquist added a comment - Reopen to remove comment spam

          People

          • Assignee:
            Unassigned
            Reporter:
            Ernst-Jan Verhoeven
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: