You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by st...@apache.org on 2019/03/14 09:56:18 UTC

[openwebbeans-meecrowave-examples] 03/28: reformated with 4 spaces

This is an automated email from the ASF dual-hosted git repository.

struberg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwebbeans-meecrowave-examples.git

commit 9f824c170f90f84aade0f6caf4ce5670f4fa9015
Author: Sven Ruppert <sv...@gmail.com>
AuthorDate: Fri Jun 29 12:51:16 2018 +0200

    reformated with 4 spaces
---
 servlet-trivial/pom.xml                            |  4 +-
 .../com/superbiz/servlet/HelloWorldServlet.java    | 19 ++++---
 .../com/superbiz/servlet/UpperCaseService.java     |  8 +--
 .../src/main/resources/WEB-INF/beans.xml           |  2 +-
 .../superbiz/servlet/HelloWorldServletTest.java    | 32 ++++++------
 .../com/superbiz/servlet/UpperCaseServiceTest.java |  8 +--
 servlet-vaadin-v08/pom.xml                         |  4 +-
 .../com/superbiz/servlet/vaadin/HelloVaadin.java   | 58 +++++++++++-----------
 .../src/main/resources/WEB-INF/beans.xml           |  2 +-
 servlet-vaadin-v10/pom.xml                         |  5 +-
 .../superbiz/servlet/vaadin/HelloVaadinV10.java    | 18 +++----
 11 files changed, 79 insertions(+), 81 deletions(-)

diff --git a/servlet-trivial/pom.xml b/servlet-trivial/pom.xml
index d66302a..c1cce44 100644
--- a/servlet-trivial/pom.xml
+++ b/servlet-trivial/pom.xml
@@ -17,8 +17,8 @@
     specific language governing permissions and limitations
     under the License.
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://maven.apache.org/POM/4.0.0"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <parent>
     <groupId>org.apache.meecrowave</groupId>
diff --git a/servlet-trivial/src/main/java/com/superbiz/servlet/HelloWorldServlet.java b/servlet-trivial/src/main/java/com/superbiz/servlet/HelloWorldServlet.java
index aeb902b..4598bca 100644
--- a/servlet-trivial/src/main/java/com/superbiz/servlet/HelloWorldServlet.java
+++ b/servlet-trivial/src/main/java/com/superbiz/servlet/HelloWorldServlet.java
@@ -28,23 +28,22 @@ import java.io.IOException;
 
 /**
  * request with curl would look like
- *
+ * <p>
  * http://localhost:8080/?value=HalloNase
- *
  */
 @WebServlet("/*")
 public class HelloWorldServlet extends HttpServlet {
 
 
-  @Inject private UpperCaseService service;
+    @Inject private UpperCaseService service;
 
-  public void doGet(HttpServletRequest request,
-                    HttpServletResponse response)
-      throws IOException {
-    response.setContentType("text/plain; charset=utf-8");
+    public void doGet(HttpServletRequest request,
+                      HttpServletResponse response)
+        throws IOException {
+        response.setContentType("text/plain; charset=utf-8");
 
-    String value = request.getParameter("value");
+        String value = request.getParameter("value");
 
-    response.getWriter().println(service.upperCase(value));
-  }
+        response.getWriter().println(service.upperCase(value));
+    }
 }
diff --git a/servlet-trivial/src/main/java/com/superbiz/servlet/UpperCaseService.java b/servlet-trivial/src/main/java/com/superbiz/servlet/UpperCaseService.java
index dae7e20..e4e00e5 100644
--- a/servlet-trivial/src/main/java/com/superbiz/servlet/UpperCaseService.java
+++ b/servlet-trivial/src/main/java/com/superbiz/servlet/UpperCaseService.java
@@ -21,9 +21,9 @@ package com.superbiz.servlet;
 import javax.enterprise.context.Dependent;
 
 @Dependent
-public class UpperCaseService{
+public class UpperCaseService {
 
-  public String upperCase(String txt) {
-    return txt.toUpperCase();
-  }
+    public String upperCase(String txt) {
+        return txt.toUpperCase();
+    }
 }
diff --git a/servlet-trivial/src/main/resources/WEB-INF/beans.xml b/servlet-trivial/src/main/resources/WEB-INF/beans.xml
index 42a24b5..bc3bf81 100644
--- a/servlet-trivial/src/main/resources/WEB-INF/beans.xml
+++ b/servlet-trivial/src/main/resources/WEB-INF/beans.xml
@@ -18,8 +18,8 @@
     under the License.
 -->
 <beans
-    xmlns="http://xmlns.jcp.org/xml/ns/javaee"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns="http://xmlns.jcp.org/xml/ns/javaee"
     xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
                       http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
     bean-discovery-mode="all">
diff --git a/servlet-trivial/src/test/java/junit/com/superbiz/servlet/HelloWorldServletTest.java b/servlet-trivial/src/test/java/junit/com/superbiz/servlet/HelloWorldServletTest.java
index 2bfce55..b5e61e5 100644
--- a/servlet-trivial/src/test/java/junit/com/superbiz/servlet/HelloWorldServletTest.java
+++ b/servlet-trivial/src/test/java/junit/com/superbiz/servlet/HelloWorldServletTest.java
@@ -32,22 +32,22 @@ import static org.junit.Assert.assertEquals;
 
 public class HelloWorldServletTest {
 
-  @Rule // started once for the class, @Rule would be per method
-  public final MeecrowaveRule rule = new MeecrowaveRule();
+    @Rule // started once for the class, @Rule would be per method
+    public final MeecrowaveRule rule = new MeecrowaveRule();
 
-  @Test
-  public void test001() {
-    final Client client = ClientBuilder.newClient();
-    try {
-      assertEquals("HALLONASE", client.target("http://127.0.0.1:" + rule.getConfiguration().getHttpPort())
-                                      .queryParam("value", "HalloNase")
-                                      .request(APPLICATION_JSON_TYPE)
-                                      .get(String.class)
-                                      .trim());
-    } catch (Exception e) {
-      Assert.fail(e.getMessage());
-    } finally {
-      client.close();
+    @Test
+    public void test001() {
+        final Client client = ClientBuilder.newClient();
+        try {
+            assertEquals("HALLONASE", client.target("http://127.0.0.1:" + rule.getConfiguration().getHttpPort())
+                                            .queryParam("value", "HalloNase")
+                                            .request(APPLICATION_JSON_TYPE)
+                                            .get(String.class)
+                                            .trim());
+        } catch (Exception e) {
+            Assert.fail(e.getMessage());
+        } finally {
+            client.close();
+        }
     }
-  }
 }
diff --git a/servlet-trivial/src/test/java/junit/com/superbiz/servlet/UpperCaseServiceTest.java b/servlet-trivial/src/test/java/junit/com/superbiz/servlet/UpperCaseServiceTest.java
index aa56d7c..1dd1677 100644
--- a/servlet-trivial/src/test/java/junit/com/superbiz/servlet/UpperCaseServiceTest.java
+++ b/servlet-trivial/src/test/java/junit/com/superbiz/servlet/UpperCaseServiceTest.java
@@ -25,8 +25,8 @@ import org.junit.Test;
 
 public class UpperCaseServiceTest {
 
-  @Test
-  public void test001() {
-    Assert.assertEquals("HALLO", new UpperCaseService().upperCase("hallo"));
-  }
+    @Test
+    public void test001() {
+        Assert.assertEquals("HALLO", new UpperCaseService().upperCase("hallo"));
+    }
 }
diff --git a/servlet-vaadin-v08/pom.xml b/servlet-vaadin-v08/pom.xml
index 1aefb84..49636ac 100644
--- a/servlet-vaadin-v08/pom.xml
+++ b/servlet-vaadin-v08/pom.xml
@@ -17,8 +17,8 @@
     specific language governing permissions and limitations
     under the License.
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://maven.apache.org/POM/4.0.0"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <parent>
     <groupId>org.apache.meecrowave</groupId>
diff --git a/servlet-vaadin-v08/src/main/java/com/superbiz/servlet/vaadin/HelloVaadin.java b/servlet-vaadin-v08/src/main/java/com/superbiz/servlet/vaadin/HelloVaadin.java
index d8f88f0..e364576 100644
--- a/servlet-vaadin-v08/src/main/java/com/superbiz/servlet/vaadin/HelloVaadin.java
+++ b/servlet-vaadin-v08/src/main/java/com/superbiz/servlet/vaadin/HelloVaadin.java
@@ -28,34 +28,34 @@ import javax.servlet.annotation.WebServlet;
 
 public class HelloVaadin {
 
-  public static class MyUI extends UI {
-
-    /**
-     * Start editing here to create your
-     * POC based on a Vaadin App.
-     * To start the app, -> start the main Method.
-     * <p>
-     * You will see in the log´s the randomly used port.
-     *
-     * @param request that is created by the first request to init the app
-     */
-    @Override
-    protected void init(VaadinRequest request) {
-
-      //create the components you want to use
-      // and set the main component with setContent(..)
-      final Layout layout = new VerticalLayout();
-      layout
-          .addComponent(new Button("click me",
-                                   event -> layout.addComponents(new Label("clicked again"))
-          ));
-
-      //set the main Component
-      setContent(layout);
+    public static class MyUI extends UI {
+
+        /**
+         * Start editing here to create your
+         * POC based on a Vaadin App.
+         * To start the app, -> start the main Method.
+         * <p>
+         * You will see in the log´s the randomly used port.
+         *
+         * @param request that is created by the first request to init the app
+         */
+        @Override
+        protected void init(VaadinRequest request) {
+
+            //create the components you want to use
+            // and set the main component with setContent(..)
+            final Layout layout = new VerticalLayout();
+            layout
+                .addComponent(new Button("click me",
+                                         event -> layout.addComponents(new Label("clicked again"))
+                ));
+
+            //set the main Component
+            setContent(layout);
+        }
+
+        @WebServlet("/*")
+        @VaadinServletConfiguration(productionMode = false, ui = MyUI.class)
+        public static class MyProjectServlet extends VaadinServlet { }
     }
-
-    @WebServlet("/*")
-    @VaadinServletConfiguration(productionMode = false, ui = MyUI.class)
-    public static class MyProjectServlet extends VaadinServlet { }
-  }
 }
diff --git a/servlet-vaadin-v08/src/main/resources/WEB-INF/beans.xml b/servlet-vaadin-v08/src/main/resources/WEB-INF/beans.xml
index 42a24b5..bc3bf81 100644
--- a/servlet-vaadin-v08/src/main/resources/WEB-INF/beans.xml
+++ b/servlet-vaadin-v08/src/main/resources/WEB-INF/beans.xml
@@ -18,8 +18,8 @@
     under the License.
 -->
 <beans
-    xmlns="http://xmlns.jcp.org/xml/ns/javaee"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns="http://xmlns.jcp.org/xml/ns/javaee"
     xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
                       http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
     bean-discovery-mode="all">
diff --git a/servlet-vaadin-v10/pom.xml b/servlet-vaadin-v10/pom.xml
index 8fec11b..84d69a3 100644
--- a/servlet-vaadin-v10/pom.xml
+++ b/servlet-vaadin-v10/pom.xml
@@ -17,8 +17,8 @@
     specific language governing permissions and limitations
     under the License.
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://maven.apache.org/POM/4.0.0"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <parent>
     <groupId>org.apache.meecrowave</groupId>
@@ -80,7 +80,6 @@
   </dependencies>
 
 
-
   <build>
     <plugins>
       <plugin>
diff --git a/servlet-vaadin-v10/src/main/java/com/superbiz/servlet/vaadin/HelloVaadinV10.java b/servlet-vaadin-v10/src/main/java/com/superbiz/servlet/vaadin/HelloVaadinV10.java
index 31ea511..1c38be8 100644
--- a/servlet-vaadin-v10/src/main/java/com/superbiz/servlet/vaadin/HelloVaadinV10.java
+++ b/servlet-vaadin-v10/src/main/java/com/superbiz/servlet/vaadin/HelloVaadinV10.java
@@ -28,14 +28,14 @@ import com.vaadin.flow.router.Route;
 @Route("")
 public class HelloVaadinV10 extends Composite<Div> {
 
-  public HelloVaadinV10() {
-    final VerticalLayout layout = new VerticalLayout();
-    layout
-        .add(new Button("click me",
-                        event -> layout.add(new Label("clicked again"))
-        ));
-    //set the main Component
-    getContent().add(layout);
+    public HelloVaadinV10() {
+        final VerticalLayout layout = new VerticalLayout();
+        layout
+            .add(new Button("click me",
+                            event -> layout.add(new Label("clicked again"))
+            ));
+        //set the main Component
+        getContent().add(layout);
 
-  }
+    }
 }