• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core

      In 2.7.1 there are several incorrect logging statements which causes the message to be slightly less than useful.

      $ grep -r -E -n "[^']'{[[:digit:]]"
      hudson/model/UpdateCenter.java:1453:                    LOGGER.log(WARNING, "Update site '{0}' does not declare the connection check URL. "
      jenkins/install/InstallState.java:176:            LOGGER.log(Level.WARNING, "Read install state with blank name: '{0}'. It will be ignored", name);
      jenkins/install/InstallState.java:182:            LOGGER.log(Level.WARNING, "Cannot locate an extension point for the state '{0}'. It will be ignored", name);
      

      The idea here was presumable to put something in single quotes - however a message format requires a quote to be escaped - or it means use whatever is between the quotes without interpretation.

      So you end up with log messages like:

      Jul 18, 2016 1:52:58 PM hudson.model.UpdateCenter$ConnectionCheckJob run
      WARNING: Update site {0} does not declare the connection check URL. Skipping the network availability check.
      

          [JENKINS-36757] incorrect logging formats in setup wizard.

          James Nord created issue -
          James Nord made changes -
          Summary Original: incorrect logging statements in setup wizard. New: incorrect logging formats in setup wizard.
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 173490 ] New: JNJira + In-Review [ 185151 ]

          Daniel Beck added a comment -

          oleg_nenashev Is this fixed with your FindBugs fixes?

          Daniel Beck added a comment - oleg_nenashev Is this fixed with your FindBugs fixes?

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment - danielbeck Nope. This syntax is "valid" from FindBugs PoV. Likely it's a symbol escaping by quotes: https://github.com/oleg-nenashev/jenkins/blob/e5a728b394f29c69795f2336edf4c4868de3a980/core/src/main/java/hudson/model/UpdateCenter.java#L1453

          James Nord added a comment -

          to use a single quote ' in a message format you must use double single quotes ''

          James Nord added a comment - to use a single quote ' in a message format you must use double single quotes ''
          James Nord made changes -
          Assignee New: James Nord [ teilo ]
          James Nord made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          James Nord made changes -
          Remote Link New: This issue links to "PR #2494 (Web Link)" [ 14697 ]
          James Nord made changes -
          Labels New: lts-candidate

            Unassigned Unassigned
            teilo James Nord
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: