diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/HostPortHttpField.java b/jetty-http/src/main/java/org/eclipse/jetty/http/HostPortHttpField.java index d08eed45706..a5334007283 100644 --- a/jetty-http/src/main/java/org/eclipse/jetty/http/HostPortHttpField.java +++ b/jetty-http/src/main/java/org/eclipse/jetty/http/HostPortHttpField.java @@ -39,7 +39,8 @@ public class HostPortHttpField extends HttpField public HostPortHttpField(HttpHeader header, String name, String authority) { super(header,name,authority); - + if (authority==null || authority.length()==0) + throw new IllegalArgumentException("No Authority"); try { if (authority.charAt(0)=='[') diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/URIUtil.java b/jetty-util/src/main/java/org/eclipse/jetty/util/URIUtil.java index eae28f78f21..6c7cb70088a 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/URIUtil.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/URIUtil.java @@ -306,7 +306,7 @@ public class URIUtil } else { - throw new IllegalArgumentException(); + throw new IllegalArgumentException("Bad URI % encoding"); } break; diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/thread/SchedulerTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/thread/SchedulerTest.java index f1b2af71637..d2bea65cb45 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/thread/SchedulerTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/thread/SchedulerTest.java @@ -177,7 +177,7 @@ public class SchedulerTest @Override public void run() { - throw new RuntimeException(); + throw new RuntimeException("Thrown by testTaskThrowsException"); } }, delay, TimeUnit.MILLISECONDS);