openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1777329 - in /openwebbeans/meecrowave/trunk/meecrowave-core/src/test: java/org/apache/meecrowave/Classes.java third-party/ third-party/OtherEndpoint.java third-party/OtherFilter.java
Date Wed, 04 Jan 2017 15:55:53 GMT
Author: rmannibucau
Date: Wed Jan  4 15:55:52 2017
New Revision: 1777329

URL: http://svn.apache.org/viewvc?rev=1777329&view=rev
Log:
adding actual sources of Classes classes

Added:
    openwebbeans/meecrowave/trunk/meecrowave-core/src/test/third-party/
    openwebbeans/meecrowave/trunk/meecrowave-core/src/test/third-party/OtherEndpoint.java
    openwebbeans/meecrowave/trunk/meecrowave-core/src/test/third-party/OtherFilter.java
Modified:
    openwebbeans/meecrowave/trunk/meecrowave-core/src/test/java/org/apache/meecrowave/Classes.java

Modified: openwebbeans/meecrowave/trunk/meecrowave-core/src/test/java/org/apache/meecrowave/Classes.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-core/src/test/java/org/apache/meecrowave/Classes.java?rev=1777329&r1=1777328&r2=1777329&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-core/src/test/java/org/apache/meecrowave/Classes.java
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-core/src/test/java/org/apache/meecrowave/Classes.java
Wed Jan  4 15:55:52 2017
@@ -31,6 +31,7 @@ import java.io.OutputStream;
 import static org.junit.Assert.fail;
 
 // some in memory files to avoid to load them from the classpath and have tests working by
luck (classpath leak actually)
+// see meecrowave-core/src/test/third-party for sources
 public class Classes {
     private static final byte[] OTHER_FILTER = new byte[]{
             -54,

Added: openwebbeans/meecrowave/trunk/meecrowave-core/src/test/third-party/OtherEndpoint.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-core/src/test/third-party/OtherEndpoint.java?rev=1777329&view=auto
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-core/src/test/third-party/OtherEndpoint.java
(added)
+++ openwebbeans/meecrowave/trunk/meecrowave-core/src/test/third-party/OtherEndpoint.java
Wed Jan  4 15:55:52 2017
@@ -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.superbiz.app;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+
+@Path("other")
+@ApplicationScoped
+public class OtherEndpoint
+{
+    @Inject
+    private Injectable injectable;
+
+    @GET
+    @Produces({"text/plain"})
+    public String simple()
+    {
+        return Boolean.parseBoolean(this.injectable.injected()) ? "simple" : "fail";
+    }
+}

Added: openwebbeans/meecrowave/trunk/meecrowave-core/src/test/third-party/OtherFilter.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-core/src/test/third-party/OtherFilter.java?rev=1777329&view=auto
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-core/src/test/third-party/OtherFilter.java (added)
+++ openwebbeans/meecrowave/trunk/meecrowave-core/src/test/third-party/OtherFilter.java Wed
Jan  4 15:55:52 2017
@@ -0,0 +1,50 @@
+/*
+ * 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.superbiz.app;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import javax.inject.Inject;
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.annotation.WebFilter;
+
+@WebFilter({"/other"})
+public class OtherFilter
+        implements Filter
+{
+    @Inject
+    private Injectable injectable;
+
+    public void init(FilterConfig filterConfig)
+            throws ServletException
+    {}
+
+    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
+            throws IOException, ServletException
+    {
+        response.getWriter().write("filter" + this.injectable.injected());
+    }
+
+    public void destroy() {}
+}



Mime
View raw message