aboutsummaryrefslogtreecommitdiffstats
path: root/jaxrs_utils/src
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@yahoo-inc.com>2016-06-15 23:09:44 +0200
committerJon Bratseth <bratseth@yahoo-inc.com>2016-06-15 23:09:44 +0200
commit72231250ed81e10d66bfe70701e64fa5fe50f712 (patch)
tree2728bba1131a6f6e5bdf95afec7d7ff9358dac50 /jaxrs_utils/src
Publish
Diffstat (limited to 'jaxrs_utils/src')
-rw-r--r--jaxrs_utils/src/main/java/com/yahoo/vespa/jaxrs/annotation/PATCH.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/jaxrs_utils/src/main/java/com/yahoo/vespa/jaxrs/annotation/PATCH.java b/jaxrs_utils/src/main/java/com/yahoo/vespa/jaxrs/annotation/PATCH.java
new file mode 100644
index 00000000000..0a0d8472731
--- /dev/null
+++ b/jaxrs_utils/src/main/java/com/yahoo/vespa/jaxrs/annotation/PATCH.java
@@ -0,0 +1,20 @@
+// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.vespa.jaxrs.annotation;
+
+import javax.ws.rs.HttpMethod;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Workaround for missing HTTP PATCH request support in JAX-RS 2.
+ * See http://brianoneill.blogspot.in/2011/11/patch-methods-on-jax-rs.html
+ *
+ * @author bakksjo
+ */
+@Target({ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+@HttpMethod("PATCH")
+public @interface PATCH {
+}