Log4j 2
  1. Log4j 2
  2. LOG4J2-769

Startup takes a long time if you have empty packages attribute

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.2
    • Component/s: None
    • Labels:
      None

      Description

      If you specify packages="" in your configuration, the PluginManager searches through all classes in the CLASSPATH at startup, because split() on an empty string actually returns an array containing one empty string.

        Activity

        Hide
        Scott Harrington added a comment -

        My patch for LOG4J2-745 contains a fix for this issue.

        Show
        Scott Harrington added a comment - My patch for LOG4J2-745 contains a fix for this issue.
        Hide
        Remko Popma added a comment -

        Prevented registration of empty package strings in revision 1617053.
        Please verify and close.

        Show
        Remko Popma added a comment - Prevented registration of empty package strings in revision 1617053. Please verify and close.
        Hide
        Remko Popma added a comment -

        Re-opening for regression in revision 1617171:
        PluginManager.addPackages(Collection<String> packages) checks that the collection is not empty but does not check if it contains empty strings.

        Show
        Remko Popma added a comment - Re-opening for regression in revision 1617171: PluginManager.addPackages(Collection<String> packages) checks that the collection is not empty but does not check if it contains empty strings.
        Hide
        Remko Popma added a comment -

        Now also ignoring empty package names in the specified collection in method addPackages(Collection).
        Committed in revision 1617295.
        Please verify and close.

        Show
        Remko Popma added a comment - Now also ignoring empty package names in the specified collection in method addPackages(Collection) . Committed in revision 1617295. Please verify and close.

          People

          • Assignee:
            Remko Popma
            Reporter:
            Scott Harrington
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development