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

        Scott Harrington created issue -
        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.
        Remko Popma made changes -
        Field Original Value New Value
        Affects Version/s 2.0.1 [ 12327381 ]
        Remko Popma made changes -
        Fix Version/s 2.0.2 [ 12327553 ]
        Remko Popma made changes -
        Assignee Remko Popma [ remkop@yahoo.com ]
        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.
        Remko Popma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        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.
        Remko Popma made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        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.
        Remko Popma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development