Skip to content

Commit

Permalink
Fix error message
Browse files Browse the repository at this point in the history
  • Loading branch information
jasontedor committed Aug 20, 2018
1 parent 73fe46c commit 5c097f3
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,10 @@ private ElasticsearchStatusException createUnlicensedError(

private ElasticsearchStatusException createUnknownLicenseError(
final String datafeedId, final List<String> remoteIndices, final Exception cause) {
final String remoteClusterQualifier = remoteIndices.size() == 1 ? "a remote cluster" : "remote clusters";
final String licenseTypeQualifier = remoteIndices.size() == 1 ? "" : "s";
final int numberOfRemoteClusters = RemoteClusterLicenseChecker.remoteClusterAliases(remoteIndices).size();
assert numberOfRemoteClusters > 0;
final String remoteClusterQualifier = numberOfRemoteClusters == 1 ? "a remote cluster" : "remote clusters";
final String licenseTypeQualifier = numberOfRemoteClusters == 1 ? "" : "s";
final String message = String.format(
Locale.ROOT,
"cannot start datafeed [%s] as it uses indices on %s %s but the license type%s could not be verified",
Expand Down

0 comments on commit 5c097f3

Please sign in to comment.