Add serialVersionUID to exception, check for null Status and throw IllegalArgumentException.

svn path=/trunk/; revision=319
diff --git a/src/jsr311-api/src/javax/ws/rs/WebApplicationException.java b/src/jsr311-api/src/javax/ws/rs/WebApplicationException.java
index de29f14..171b068 100644
--- a/src/jsr311-api/src/javax/ws/rs/WebApplicationException.java
+++ b/src/jsr311-api/src/javax/ws/rs/WebApplicationException.java
@@ -26,6 +26,8 @@
  */
 public class WebApplicationException extends RuntimeException {
 
+    private static final long serialVersionUID = 11660101L;
+    
     private Response response;
 
     /**
@@ -56,6 +58,7 @@
     /**
      * Construct a new instance with a blank message and specified HTTP status code
      * @param status the HTTP status code that will be returned to the client
+     * @throws IllegalArgumentException if status is null
      */
     public WebApplicationException(Response.Status status) {
         this(null, status);
@@ -97,6 +100,7 @@
      * Construct a new instance with a blank message and specified HTTP status code
      * @param status the HTTP status code that will be returned to the client
      * @param cause the underlying cause of the exception
+     * @throws IllegalArgumentException if status is null
      */
     public WebApplicationException(Throwable cause, Response.Status status) {
         this(cause, Response.status(status).build());
diff --git a/src/jsr311-api/src/javax/ws/rs/core/Response.java b/src/jsr311-api/src/javax/ws/rs/core/Response.java
index 8670765..f216e2c 100644
--- a/src/jsr311-api/src/javax/ws/rs/core/Response.java
+++ b/src/jsr311-api/src/javax/ws/rs/core/Response.java
@@ -83,6 +83,7 @@
      * Create a new ResponseBuilder with the supplied status.
      * @param status the response status
      * @return a new ResponseBuilder
+     * @throws IllegalArgumentException if status is null
      */
     public static ResponseBuilder status(Status status) {
         ResponseBuilder b = ResponseBuilder.newInstance();
@@ -339,8 +340,11 @@
          * 
          * @param status the response status
          * @return the updated ResponseBuilder
+         * @throws IllegalArgumentException if status is null
          */
         public ResponseBuilder status(Status status) {
+            if (status == null)
+                throw new IllegalArgumentException();
             return status(status.getStatusCode());
         };