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

          No work has yet been logged on this issue.

            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