Kuali Rice Development
  1. Kuali Rice Development
  2. KULRICE-3343

KimTypeServIveBase class has protected method which can return null but calling method is assuming non-null value

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0
    • Component/s: Development
    • Labels:
      None
    • Similar issues:
      KULRICE-1284Protect call to get property type in PojoPropertyUtilsBean from throwing exceptions
      KULRICE-10110Cleanup on copy methods
      KULRICE-7594Provide input field instance to key value finder method getKeyValues
      KULRICE-4047UIDocumentServiceImpl.getMember() can return null but is not handled
      KULRICE-3299The UiDocumentServiceImpl.getAttributeDefnId() has a code typo which results in a class cast exception
      KULRICE-5135fix ojb proxies for classes with protected setters
      KULRICE-7616the KEW ActionSet class is mutable and I assume it should not be
      KULRICE-3643Make private methods in document-related classes protected to improve overridability
      KULRICE-7655WorkflowDocumentService.getActionsTaken has the wrong method name
      KULRICE-1414Select Lists (call to ValuesFinder class) not updated frequently enough
    • Rice Module:
      KIM
    • Application Requirement:
      KFS

      Description

      The class KimTypeServiceBase has a method getAttributeDefinitions() which makes a call into the method getDataDictionaryAttributeDefinition(). The getAttributeDefinitions() method assumes the returned value is a non-null value but if the method getDataDictionaryAttributeDefinition() can't find a valid DD AttributeDefinition in the system, an exception is caught and logged and a null object is returned (currently on line 548 of KimTypeServiceBase).

      It seems bad that when an exception is thrown a null value is returned and then the calling method will, in most cases, throw a NullPointerException. Probably the getAttributeDefintiions() should just check for a valid non-null AttributeDefintiion object and throw an exception if one isn't found. Then again i'm now a KIM expert so there may be a better solution.

        Issue Links

          Activity

          Ailish Byrne made changes -
          Field Original Value New Value
          Link This issue duplicates KFSMI-4212 [ KFSMI-4212 ]
          Ailish Byrne made changes -
          Fix Version/s 1.0.1 [ 15300 ]
          Fix Version/s KFS Release 3.0 [ 12780 ]
          Fix Version/s 1.0 [ 13481 ]
          Reporter David Elyea [ delyea ] Ailish Byrne [ abyrne ]
          Application Requirement [KRICE] [KFS]
          Priority Major [ 3 ] Critical [ 2 ]
          Responsible Team [Rice Team] [KFS Team]
          Peter Giles (Inactive) made changes -
          Assignee Peter Giles [ gilesp ]
          Peter Giles (Inactive) made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Peter Giles (Inactive) made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Peter Giles (Inactive) made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Fix Version/s 1.0 [ 13481 ]
          Fix Version/s KFS Release 3.0 [ 12780 ]
          Fix Version/s 1.0.1 [ 15300 ]
          Resolution Fixed [ 1 ]
          Eric Westfall made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Shem Patterson (Inactive) made changes -
          Workflow custom [ 73482 ] Copy of custom for rice [ 211209 ]
          Shem Patterson (Inactive) made changes -
          Workflow Copy of custom for rice [ 211209 ] custom [ 220957 ]
          Shem Patterson (Inactive) made changes -
          Workflow custom [ 220957 ] Rice Workflow [ 230705 ]

            People

            • Assignee:
              Peter Giles (Inactive)
              Reporter:
              Ailish Byrne
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Structure Helper Panel