cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1233401 - in /cxf/trunk/distribution/src/main/release/samples: java_first_jaxws/src/test/java/demo/hw/server/ jax_rs/minimal_osgi/src/main/java/minimalosgi/
Date Thu, 19 Jan 2012 14:31:05 GMT
Author: ningjiang
Date: Thu Jan 19 14:31:04 2012
New Revision: 1233401

URL: http://svn.apache.org/viewvc?rev=1233401&view=rev
Log:
Fixed the CS errors of samples

Modified:
    cxf/trunk/distribution/src/main/release/samples/java_first_jaxws/src/test/java/demo/hw/server/HelloWorldImplTest.java
    cxf/trunk/distribution/src/main/release/samples/jax_rs/minimal_osgi/src/main/java/minimalosgi/Activator.java
    cxf/trunk/distribution/src/main/release/samples/jax_rs/minimal_osgi/src/main/java/minimalosgi/SampleApplication.java
    cxf/trunk/distribution/src/main/release/samples/jax_rs/minimal_osgi/src/main/java/minimalosgi/SampleServlet.java

Modified: cxf/trunk/distribution/src/main/release/samples/java_first_jaxws/src/test/java/demo/hw/server/HelloWorldImplTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/java_first_jaxws/src/test/java/demo/hw/server/HelloWorldImplTest.java?rev=1233401&r1=1233400&r2=1233401&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/java_first_jaxws/src/test/java/demo/hw/server/HelloWorldImplTest.java
(original)
+++ cxf/trunk/distribution/src/main/release/samples/java_first_jaxws/src/test/java/demo/hw/server/HelloWorldImplTest.java
Thu Jan 19 14:31:04 2012
@@ -18,9 +18,9 @@
  */
 package demo.hw.server;
 
+import java.util.Map;
 import org.junit.Test;
 import static org.junit.Assert.assertEquals;
-import java.util.Map;
 
 public class HelloWorldImplTest {
 

Modified: cxf/trunk/distribution/src/main/release/samples/jax_rs/minimal_osgi/src/main/java/minimalosgi/Activator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/minimal_osgi/src/main/java/minimalosgi/Activator.java?rev=1233401&r1=1233400&r2=1233401&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/minimal_osgi/src/main/java/minimalosgi/Activator.java
(original)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/minimal_osgi/src/main/java/minimalosgi/Activator.java
Thu Jan 19 14:31:04 2012
@@ -19,6 +19,8 @@
 
 package minimalosgi;
 
+import java.util.Hashtable;
+
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
@@ -26,8 +28,6 @@ import org.osgi.service.http.HttpService
 import org.osgi.util.tracker.ServiceTracker;
 import org.osgi.util.tracker.ServiceTrackerCustomizer;
 
-import java.util.Hashtable;
-
 public class Activator implements BundleActivator {
 
     private final String _path = "/";
@@ -51,7 +51,7 @@ public class Activator implements Bundle
                 public Object addingService(ServiceReference serviceReference) {
                     try {
                         HttpService service = (HttpService)_context.getService(serviceReference);
-                        Hashtable<String, String> initParams = new Hashtable<String,
String>();
+                        Map<String, String> initParams = new Hashtable<String, String>();
                         initParams.put("javax.ws.rs.Application", SampleApplication.class.getName());
                         service.registerServlet(_path, new SampleServlet(), initParams, null);
                         return service;
@@ -67,8 +67,9 @@ public class Activator implements Bundle
 
                 public void removedService(ServiceReference serviceReference, Object o) {
                     HttpService service = (HttpService)_context.getService(serviceReference);
-                    if (service != null)
+                    if (service != null) {
                         service.unregister(_path);
+                    }
                 }
             }
         );

Modified: cxf/trunk/distribution/src/main/release/samples/jax_rs/minimal_osgi/src/main/java/minimalosgi/SampleApplication.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/minimal_osgi/src/main/java/minimalosgi/SampleApplication.java?rev=1233401&r1=1233400&r2=1233401&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/minimal_osgi/src/main/java/minimalosgi/SampleApplication.java
(original)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/minimal_osgi/src/main/java/minimalosgi/SampleApplication.java
Thu Jan 19 14:31:04 2012
@@ -19,14 +19,14 @@
 
 package minimalosgi;
 
-import javax.ws.rs.core.Application;
 import java.util.HashSet;
 import java.util.Set;
+import javax.ws.rs.core.Application;
 
 public class SampleApplication extends Application {
     @Override
     public Set<Class<?>> getClasses() {
-        HashSet<Class<?>> s = new HashSet<Class<?>>();
+        Set<Class<?>> s = new HashSet<Class<?>>();
         s.add(SampleResource.class);
         return s;
     }

Modified: cxf/trunk/distribution/src/main/release/samples/jax_rs/minimal_osgi/src/main/java/minimalosgi/SampleServlet.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jax_rs/minimal_osgi/src/main/java/minimalosgi/SampleServlet.java?rev=1233401&r1=1233400&r2=1233401&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/jax_rs/minimal_osgi/src/main/java/minimalosgi/SampleServlet.java
(original)
+++ cxf/trunk/distribution/src/main/release/samples/jax_rs/minimal_osgi/src/main/java/minimalosgi/SampleServlet.java
Thu Jan 19 14:31:04 2012
@@ -19,16 +19,17 @@
 
 package minimalosgi;
 
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+
 import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
 import org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet;
 import org.apache.cxf.jaxrs.utils.ResourceUtils;
 
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-
 public class SampleServlet extends CXFNonSpringJaxrsServlet {
 
-    protected void createServerFromApplication(String cName, ServletConfig servletConfig)
throws ServletException {
+    protected void createServerFromApplication(String cName, ServletConfig servletConfig)

+        throws ServletException {
         // technically, you should look up the application name from ServletConfig's init
parameters
         // but creating the actual application object is slower via reflection than actually
         // instantiating it



Mime
View raw message