From 3fc2a1b53dbe654c00a4de6cdb21dde92ce588c3 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Mon, 4 Aug 2014 19:22:21 +0200 Subject: [PATCH] Support of exceptions without message in web services --- .../src/main/java/org/sonar/server/exceptions/Message.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server/sonar-server/src/main/java/org/sonar/server/exceptions/Message.java b/server/sonar-server/src/main/java/org/sonar/server/exceptions/Message.java index 0882de85f19..d821b6f246a 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/exceptions/Message.java +++ b/server/sonar-server/src/main/java/org/sonar/server/exceptions/Message.java @@ -20,7 +20,6 @@ package org.sonar.server.exceptions; import com.google.common.base.Objects; -import com.google.common.base.Preconditions; import org.apache.commons.lang.StringUtils; public class Message { @@ -42,8 +41,7 @@ public class Message { } public static Message of(String l10nKey, Object... l10nParams) { - Preconditions.checkArgument(StringUtils.isNotBlank(l10nKey)); - return new Message(l10nKey, l10nParams); + return new Message(StringUtils.defaultString(l10nKey), l10nParams); } @Override -- 2.39.5