- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 05 Oct 2009 14:25:44 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/util In directory hutz:/tmp/cvs-serv14938/src/org/w3c/unicorn/util Modified Files: Message.java Log Message: simpler way to make the Message level enum Index: Message.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/util/Message.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Message.java 2 Oct 2009 10:11:52 -0000 1.5 +++ Message.java 5 Oct 2009 14:25:42 -0000 1.6 @@ -2,15 +2,13 @@ public class Message { - public enum Level { - ERROR, - WARNING, - INFO; - } + public static final int INFO = 0; + public static final int WARNING = 1; + public static final int ERROR = 2; private String message; private String content; - private Level level; + private int level; private boolean evaluateContent = false; public Message() { @@ -22,19 +20,19 @@ for (StackTraceElement stackTraceElement : e.getStackTrace()) { content += stackTraceElement.toString() + "\n"; } - level = Level.ERROR; + level = ERROR; message = "$stack_trace_text"; evaluateContent = false; } - public Message(Level level, String message, String content) { + public Message(int level, String message, String content) { this.level = level; this.message = message; this.content = content; evaluateContent = true; } - public Message(Level level, String message) { + public Message(int level, String message) { this.level = level; this.message = message; } @@ -55,11 +53,11 @@ this.content = content; } - public Level getLevel() { + public int getLevel() { return level; } - public void setLevel(Level level) { + public void setLevel(int level) { this.level = level; }
Received on Monday, 5 October 2009 14:25:47 UTC