accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ed Coleman" <>
Subject RE: [GitHub] accumulo pull request: ACCUMULO-3681 modified log statements that ...
Date Sun, 22 Mar 2015 20:43:49 GMT
The basic issue was pointed out that the original - using just
e.getMessage() could cause problems because the log message is expecting a
format string, so if e.getMessage() had {} in the message it would be
interrupted for parameter replacement / expansion but there would be no

The "{}" gets around that and leaves the message as currently emitted.  Even
better would be to use meaningful messages, but this was the most expedient
to eliminate a potential problem and allows better messages in the future as
long as we accept changing the log statements.

-----Original Message-----
From: joshelser [] 
Sent: Sunday, March 22, 2015 4:17 PM
Subject: [GitHub] accumulo pull request: ACCUMULO-3681 modified log
statements that ...

Github user joshelser commented on a diff in the pull request:
    --- Diff:
    @@ -92,13 +92,13 @@ public void run() {
           } catch (IsolationException | ScanTimedOutException |
AccumuloException | AccumuloSecurityException | TableDeletedException |
TableOfflineException e) {
    -        log.trace(e.getMessage(), e);
    +        log.trace("{}", e.getMessage(), e);
    --- End diff --
    General question: is it worth inserting the formatting string when there
isn't any concatenation happening?

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message