Skip to content

Conversation

@adoroszlai
Copy link
Contributor

What changes were proposed in this pull request?

Use the version of Preconditions.check... that accepts errorMessageTemplate and errorMessageArgs.

There are occurrences of the errorMessage version left, but they do not seem to be important:

  1. use constant message, or
  2. are infrequently used (eg. one-time init in MetadataKeyFilters), or
  3. only append a plain long (container ID) to the message.

https://issues.apache.org/jira/browse/HDDS-2451

How was this patch tested?

Ran related unit tests and checkstyle.

Copy link
Member

@elek elek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 thanks @adoroszlai the patch

ps: TIL:

Only %s is supported

In Preconditions error message template strings, only the "%s" specifier is supported, not the full range of Formatter specifiers.

@elek elek closed this in c199a29 Nov 13, 2019
@adoroszlai adoroszlai deleted the HDDS-2451 branch November 13, 2019 13:50
@adoroszlai
Copy link
Contributor Author

Thanks @elek for reviewing and committing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants