cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1229349 - in /cxf/trunk: ./ rt/databinding/sdo/ rt/databinding/xmlbeans/ rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/ rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/ systests/transport-jms/src/test/java/org/a...
Date Mon, 09 Jan 2012 21:06:54 GMT
Author: dkulp
Date: Mon Jan  9 21:06:54 2012
New Revision: 1229349

URL: http://svn.apache.org/viewvc?rev=1229349&view=rev
Log:
Update JMSSessionCallbacks to specify the type

Modified:
    cxf/trunk/pom.xml
    cxf/trunk/rt/databinding/sdo/pom.xml
    cxf/trunk/rt/databinding/xmlbeans/pom.xml
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
    cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
    cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
    cxf/trunk/testutils/pom.xml

Modified: cxf/trunk/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/pom.xml?rev=1229349&r1=1229348&r2=1229349&view=diff
==============================================================================
--- cxf/trunk/pom.xml (original)
+++ cxf/trunk/pom.xml Mon Jan  9 21:06:54 2012
@@ -327,18 +327,6 @@
                                         <copy file="${full.eclipse.workspace}/.metadata/.plugins/net.sf.eclipsecs.core/checkstyle-config.xml.new"
tofile="${full.eclipse.workspace}/.metadata/.plugins/net.sf.eclipsecs.core/checkstyle-config.xml"
overwrite="yes" />
 
 
-
-
-                                        <!-- Add warning flags that we want -->
-                                        <propertyfile file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs">
-                                            <!-- need to fix a bunch (~450) of these before
figuring out if this is needed -->
-                                            <entry key="org.eclipse.jdt.core.compiler.problem.rawTypeReference"
value="ignore" />
-
-                                            <!-- SDO generated code has unused imports.
Checkstyle can handle this though. -->
-                                            <entry key="org.eclipse.jdt.core.compiler.problem.unusedImport"
value="ignore" />
-                                        </propertyfile>
-
-
                                         <!-- Add code format rules -->
                                         <loadfile property="eclipse.code.cleanup" srcFile="${basedir}/etc/eclipse/CXFCleanUp.xml"
/>
                                         <loadfile property="eclipse.code.templates" srcFile="${basedir}/etc/eclipse/codetemplates.xml"
/>

Modified: cxf/trunk/rt/databinding/sdo/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/sdo/pom.xml?rev=1229349&r1=1229348&r2=1229349&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/sdo/pom.xml (original)
+++ cxf/trunk/rt/databinding/sdo/pom.xml Mon Jan  9 21:06:54 2012
@@ -210,12 +210,16 @@
                                 <id>setup.eclipse.project.sdo</id>
                                 <phase>process-test-sources</phase>
                                 <configuration>
-                                     <tasks>
-                                         <echo file="${basedir}/.settings/org.eclipse.jdt.core.prefs"
append="true">
-org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
-                                         </echo>
-                                     </tasks>
+                                     <target>
+                                         <!-- SDO generated code is Java1.4 based and
thus uses raw List types -->
+                                         <!-- It also generates code with unused imports
-->
+                                         <propertyfile file="${basedir}/.settings/org.eclipse.jdt.core.prefs">
+                                             <entry key="org.eclipse.jdt.core.compiler.problem.rawTypeReference"
value="ignore"/>
+                                             <entry key="org.eclipse.jdt.core.compiler.problem.unusedImport"
value="ignore"/>
+                                             <entry key="org.eclipse.jdt.core.compiler.problem.unusedLocal"
value="ignore"/>
+                                             <entry key="org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation"
value="ignore"/>
+                                         </propertyfile>
+                                     </target>
                                 </configuration>
                                 <goals>
                                     <goal>run</goal>

Modified: cxf/trunk/rt/databinding/xmlbeans/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/xmlbeans/pom.xml?rev=1229349&r1=1229348&r2=1229349&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/xmlbeans/pom.xml (original)
+++ cxf/trunk/rt/databinding/xmlbeans/pom.xml Mon Jan  9 21:06:54 2012
@@ -175,5 +175,34 @@
                 </dependency>
             </dependencies>
         </profile>
+        <profile>
+            <id>setup.eclipse</id>
+            <build>
+                <defaultGoal>process-test-sources</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>setup.eclipse.project.sdo</id>
+                                <phase>process-test-sources</phase>
+                                <configuration>
+                                    <target>
+                                        <!-- XmlBeans generated code uses raw List types
-->
+                                        <propertyfile file="${basedir}/.settings/org.eclipse.jdt.core.prefs">
+                                            <entry key="org.eclipse.jdt.core.compiler.problem.rawTypeReference"
value="ignore"/>
+                                        </propertyfile>
+                                    </target>
+                                </configuration>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 </project>

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java?rev=1229349&r1=1229348&r2=1229349&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
Mon Jan  9 21:06:54 2012
@@ -73,7 +73,8 @@ import org.springframework.transaction.T
 import org.springframework.transaction.support.TransactionSynchronizationManager;
 
 public class JMSDestination extends AbstractMultiplexDestination 
-    implements SessionAwareMessageListener, MessageListener, JMSExchangeSender {
+    implements SessionAwareMessageListener<javax.jms.Message>,
+        MessageListener, JMSExchangeSender {
 
     private static final Logger LOG = LogUtils.getL7dLogger(JMSDestination.class);
 
@@ -136,15 +137,14 @@ public class JMSDestination extends Abst
         this.deactivate();
     }
 
-    @SuppressWarnings("unchecked")
     private Destination resolveDestinationName(final JmsTemplate jmsTemplate, final String
name) {
-        SessionCallback sc = new SessionCallback() {
-            public Object doInJms(Session session) throws JMSException {
+        SessionCallback<Destination> sc = new SessionCallback<Destination>()
{
+            public Destination doInJms(Session session) throws JMSException {
                 DestinationResolver resolv = jmsTemplate.getDestinationResolver();
                 return resolv.resolveDestinationName(session, name, jmsConfig.isPubSubDomain());
             }
         };
-        return (Destination)jmsTemplate.execute(sc);
+        return jmsTemplate.execute(sc);
     }
 
     public Destination getReplyToDestination(JmsTemplate jmsTemplate, Message inMessage)
throws JMSException {

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java?rev=1229349&r1=1229348&r2=1229349&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
Mon Jan  9 21:06:54 2012
@@ -330,12 +330,11 @@ public final class JMSFactory {
      * @param pubSubDomain true=pubSub, false=Queues
      * @return resolved destination
      */
-    @SuppressWarnings("unchecked")
     public static Destination resolveOrCreateDestination(final JmsTemplate jmsTemplate,
                                                           final String replyToDestinationName,
                                                           final boolean pubSubDomain) {
-        return (Destination)jmsTemplate.execute(new SessionCallback() {
-            public Object doInJms(Session session) throws JMSException {
+        return jmsTemplate.execute(new SessionCallback<Destination>() {
+            public Destination doInJms(Session session) throws JMSException {
                 if (replyToDestinationName == null) {
                     if (session instanceof QueueSession) {
                         // For JMS 1.0.2

Modified: cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java?rev=1229349&r1=1229348&r2=1229349&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
(original)
+++ cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
Mon Jan  9 21:06:54 2012
@@ -163,13 +163,12 @@ public class JMSConduitTest extends Abst
         JMSConfiguration jmsConfig = conduit.getJmsConfig();
         JmsTemplate jmsTemplate = new JmsTemplate();
         jmsTemplate.setConnectionFactory(jmsConfig.getOrCreateWrappedConnectionFactory());
-        SessionCallback sc = new SessionCallback() {
-            public Object doInJms(Session session) throws JMSException {
+        SessionCallback<javax.jms.Message> sc = new SessionCallback<javax.jms.Message>()
{
+            public javax.jms.Message doInJms(Session session) throws JMSException {
                 return JMSUtils.createAndSetPayload(testBytes, session, JMSConstants.BYTE_MESSAGE_TYPE);
             }
         };
-        @SuppressWarnings("unchecked")
-        javax.jms.Message message = (javax.jms.Message)jmsTemplate.execute(sc);
+        javax.jms.Message message = jmsTemplate.execute(sc);
         
         // The ibm jdk finalizes conduit (during most runs of this test) and
         // causes it to fail unless we reference the conduit here after the

Modified: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java?rev=1229349&r1=1229348&r2=1229349&view=diff
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
(original)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
Mon Jan  9 21:06:54 2012
@@ -1263,9 +1263,8 @@ public class JMSClientServerTest extends
 
         Thread t = new Thread() {
             public void run() {
-                @SuppressWarnings("unchecked")
-                Destination destination = (Destination)jmsTemplate.execute(new SessionCallback()
{
-                    public Object doInJms(Session session) throws JMSException {
+                Destination destination = jmsTemplate.execute(new SessionCallback<Destination>()
{
+                    public Destination doInJms(Session session) throws JMSException {
                         DestinationResolver resolv = jmsTemplate.getDestinationResolver();
                         return resolv.resolveDestinationName(session, jmsConfig.getTargetDestination(),
                                                              false);
@@ -1279,15 +1278,15 @@ public class JMSClientServerTest extends
                     }
                 };
                     
-                @SuppressWarnings("unchecked")
-                Destination destination2 = (Destination)jmsTemplate.execute(new SessionCallback()
{
-                    public Object doInJms(Session session) throws JMSException {
-                        DestinationResolver resolv = jmsTemplate.getDestinationResolver();
-                        return resolv.resolveDestinationName(session,
+                Destination destination2 = jmsTemplate
+                    .execute(new SessionCallback<Destination>() {
+                        public Destination doInJms(Session session) throws JMSException {
+                            DestinationResolver resolv = jmsTemplate.getDestinationResolver();
+                            return resolv.resolveDestinationName(session,
                                                              jmsConfig.getReplyDestination(),
                                                              false);
-                    }
-                });
+                        }
+                    });
                 jmsTemplate.send(destination2, messageCreator);
             }
         };

Modified: cxf/trunk/testutils/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/testutils/pom.xml?rev=1229349&r1=1229348&r2=1229349&view=diff
==============================================================================
--- cxf/trunk/testutils/pom.xml (original)
+++ cxf/trunk/testutils/pom.xml Mon Jan  9 21:06:54 2012
@@ -136,7 +136,7 @@
                 <artifactId>cxf-wsdl-validator-plugin</artifactId>
                 <version>${project.version}</version>
                 <configuration>
-                   <wsdlRoot>${basedir}/src/main/resources/wsdl</wsdlRoot>
+                    <wsdlRoot>${basedir}/src/main/resources/wsdl</wsdlRoot>
                 </configuration>
                 <executions>
                     <!-- execution>
@@ -146,7 +146,7 @@
                           <goal>wsdlvalidator</goal>
                         </goals>
                     </execution -->
-                  </executions>
+                </executions>
             </plugin>
             <plugin>
                 <groupId>org.apache.cxf</groupId>
@@ -257,10 +257,10 @@
                     </execution>
                 </executions>
                 <configuration>
-                     <extensions>
-                         <extension>org.apache.cxf.xjcplugins:cxf-xjc-dv:${cxf.xjc-utils.version}</extension>
-                     </extensions>
-                 </configuration>
+                    <extensions>
+                        <extension>org.apache.cxf.xjcplugins:cxf-xjc-dv:${cxf.xjc-utils.version}</extension>
+                    </extensions>
+                </configuration>
             </plugin>
         </plugins>
     </build>
@@ -273,30 +273,59 @@
             </activation>
             <dependencies>
                 <dependency>
-                     <groupId>org.apache.geronimo.specs</groupId>
-                     <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
-                 </dependency>
-                 <dependency>
-                     <groupId>org.apache.geronimo.specs</groupId>
-                     <artifactId>geronimo-jaxws_2.2_spec</artifactId>
-                 </dependency>
-                 <dependency>
-                     <groupId>javax.xml.soap</groupId>
-                     <artifactId>saaj-api</artifactId>
-                 </dependency>
-                 <dependency>
-                     <groupId>javax.xml.bind</groupId>
-                     <artifactId>jaxb-api</artifactId>
-                 </dependency>
-                 <dependency>
-                     <groupId>org.apache.geronimo.specs</groupId>
-                     <artifactId>geronimo-annotation_1.0_spec</artifactId>
-                 </dependency>
-                 <dependency>
-                     <groupId>org.apache.geronimo.specs</groupId>
-                     <artifactId>geronimo-activation_1.1_spec</artifactId>
-                 </dependency>
+                    <groupId>org.apache.geronimo.specs</groupId>
+                    <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
+                </dependency>
+                <dependency>
+                    <groupId>org.apache.geronimo.specs</groupId>
+                    <artifactId>geronimo-jaxws_2.2_spec</artifactId>
+                </dependency>
+                <dependency>
+                    <groupId>javax.xml.soap</groupId>
+                    <artifactId>saaj-api</artifactId>
+                </dependency>
+                <dependency>
+                    <groupId>javax.xml.bind</groupId>
+                    <artifactId>jaxb-api</artifactId>
+                </dependency>
+                <dependency>
+                    <groupId>org.apache.geronimo.specs</groupId>
+                    <artifactId>geronimo-annotation_1.0_spec</artifactId>
+                </dependency>
+                <dependency>
+                    <groupId>org.apache.geronimo.specs</groupId>
+                    <artifactId>geronimo-activation_1.1_spec</artifactId>
+                </dependency>
             </dependencies>
         </profile>
+        <profile>
+            <id>setup.eclipse</id>
+            <build>
+                <defaultGoal>process-test-sources</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>setup.eclipse.project.sdo</id>
+                                <phase>process-test-sources</phase>
+                                <configuration>
+                                    <target>
+                                        <!-- JAXB generated code for one of our type tests
uses a raw Comparable -->
+                                        <propertyfile file="${basedir}/.settings/org.eclipse.jdt.core.prefs">
+                                            <entry key="org.eclipse.jdt.core.compiler.problem.rawTypeReference"
value="ignore"/>
+                                        </propertyfile>
+                                    </target>
+                                </configuration>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 </project>



Mime
View raw message