nacx commented on this pull request.
> throw exception(name, "Should start with letter/number");
CharMatcher range = getAcceptableRange();
if (!range.matchesAllOf(name))
- throw exception(name, "Should have lowercase or uppercase ASCII
letters, numbers, or dashes");
+ throw exception(name,
+ "Should have lowercase or uppercase ASCII letters, numbers,
dashes, underscores and " + "periods");
No need to break the string, as it generates an unnecessary StringBuilder
object.
> @@ -54,7 +55,7 @@ private CharMatcher getAcceptableRange() {
protected IllegalArgumentException exception(String name, String reason) {
return new IllegalArgumentException(
- String.format("Object '%s' doesn't match Azure naming constraints.
" + "Reason: %s.", name,
+ String.format("Object '%s' doesn't match Azure naming constraints.
" + "Reason: %s", name,
Same here. There is no need to break the string.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1215#pullrequestreview-124157626