Uploaded image for project: 'Portal'
  1. Portal
  2. PORTAL-136 Raise JUnit test coverage ONAP Portal to 50% for Beijing
  3. PORTAL-154

NullPointerException might be thrown as 'localSession' is nullable in UserRolesCommonServiceImpl.java

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Medium Medium
    • Beijing Release
    • None
    • Portal
    • None
    • Portal Sprint 3, Portal Sprint 4, Portal Sprint 5

      In UserRolesCommonServiceImpl.java of ecompportal-be-common sub-module at line number 382, the hibernate session is getting closed in finally block without proper check if the session is open or not.

      I put a check to verify if the localSession is open, if it is then proceed to close.

      Sonar link as below,

      https://sonar.onap.org/component_issues/index?id=org.onap.portal%3Aonap-portal-parent#resolved=false|severities=BLOCKER

      Line no : 382

       

            giri giri
            giri giri
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: