aboutsummaryrefslogtreecommitdiffstats
path: root/bridge
diff options
context:
space:
mode:
Diffstat (limited to 'bridge')
-rw-r--r--bridge/src/org/aspectj/bridge/MessageUtil.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/bridge/src/org/aspectj/bridge/MessageUtil.java b/bridge/src/org/aspectj/bridge/MessageUtil.java
index fd4a41efe..85d782302 100644
--- a/bridge/src/org/aspectj/bridge/MessageUtil.java
+++ b/bridge/src/org/aspectj/bridge/MessageUtil.java
@@ -175,6 +175,14 @@ public class MessageUtil {
}
}
+ /** @return WARNING_NOMESSAGE if message is empty or IMessage otherwise */ //
+ public static IMessage warn(String message, ISourceLocation location) {
+ if (LangUtil.isEmpty(message)) {
+ return WARNING_NOMESSAGE;
+ } else {
+ return new Message(message, IMessage.WARNING, null, location);
+ }
+ }
/** @return ERROR_NOMESSAGE if message is empty or IMessage otherwise */ //
public static IMessage error(String message) {
if (LangUtil.isEmpty(message)) {