cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject [2/2] cxf git commit: [CXF-6376] Adding a test resource
Date Tue, 28 Apr 2015 16:39:59 GMT
[CXF-6376] Adding a test resource


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/c824bd84
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/c824bd84
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/c824bd84

Branch: refs/heads/2.7.x-fixes
Commit: c824bd84497d78e36868dd671430b14716b12b55
Parents: ba3a7da
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Tue Apr 28 17:39:29 2015 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Tue Apr 28 17:39:29 2015 +0100

----------------------------------------------------------------------
 .../systest/jaxrs/FaultyResponseHandler.java    | 40 ++++++++++++++++++++
 1 file changed, 40 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/c824bd84/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/FaultyResponseHandler.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/FaultyResponseHandler.java
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/FaultyResponseHandler.java
new file mode 100644
index 0000000..600b514
--- /dev/null
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/FaultyResponseHandler.java
@@ -0,0 +1,40 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jaxrs;
+
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Response;
+
+import org.apache.cxf.jaxrs.ext.MessageContext;
+import org.apache.cxf.jaxrs.ext.ResponseHandler;
+import org.apache.cxf.jaxrs.model.OperationResourceInfo;
+import org.apache.cxf.message.Message;
+
+public class FaultyResponseHandler implements ResponseHandler {
+    @Context
+    private MessageContext mc;
+    
+    public Response handleResponse(Message m, OperationResourceInfo ori, Response response)
{
+        if (mc.getUriInfo().getPath().endsWith("/faultyResponseHandler")) {
+            throw new NullPointerException();
+        }
+        return null;
+    }
+
+}


Mime
View raw message