Uploaded image for project: 'JS - JobScheduler'
  1. JS - JobScheduler
  2. JS-2070

SOS API should not use the 3rd-party apache ReflectionToStringBuilder

    XMLWordPrintable

Details

    Description

      Current Situation

      • For logging (mostly at debug level), the SOS API uses the SOSString.toString() method to log all properties of a given object.
        • the SOSString.toString() method is based on the org.apache.commons.lang3.builder.ReflectionToStringBuilder implementation:

          This class uses reflection to determine the fields to append. Because these fields are usually private, the class uses AccessibleObject.setAccessible(java.lang.reflect.AccessibleObject[], boolean) to change the visibility of the fields. This will fail under a security manager, unless the appropriate permissions are set up correctly.

      Desired Behaviour

      • SOS removes the use of ReflectionToStringBuilder from future releases and implements a replacement.

      Test Instructions

      • JOC-Cockpit Common tests:
        • configure log4j.xml to use DEBUG log level
          • set RootLogLevel, JocLogLevel, ..., ConnectionPoolLogLevel to DEBUG
        • configure the Cleanup Service (Settings -> cleanup -> period_begin) to start in a few minutes
        • execute arbitrary workflows
        • check jetty.log and other log files for problems with SOSString.toString
      • Test with Java 11.
      • Configure JOC-Cockpit to run with Java 17 and repeat the tests.

      Attachments

        Activity

          People

            re Robert Ehrlich
            re Robert Ehrlich
            Pramokshi Narawariya Pramokshi Narawariya
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: