You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2007/02/16 09:11:11 UTC

svn commit: r508341 - in /incubator/tuscany/branches/sca-java-integration/sca/kernel: core/ core/src/main/java/org/apache/tuscany/core/services/deployment/ spi/ spi/src/main/java/org/apache/tuscany/spi/deployer/

Author: rfeng
Date: Fri Feb 16 00:11:09 2007
New Revision: 508341

URL: http://svn.apache.org/viewvc?view=rev&rev=508341
Log:
Fix PMD and checkstyle violations

Added:
    incubator/tuscany/branches/sca-java-integration/sca/kernel/core/.checkstyle
Modified:
    incubator/tuscany/branches/sca-java-integration/sca/kernel/core/.pmd
    incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/deployment/ContentTypeDescriberImpl.java
    incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/deployment/ContributionServiceImpl.java
    incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/.checkstyle
    incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/.pmd
    incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ContributionProcessor.java

Added: incubator/tuscany/branches/sca-java-integration/sca/kernel/core/.checkstyle
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/core/.checkstyle?view=auto&rev=508341
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/core/.checkstyle (added)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/core/.checkstyle Fri Feb 16 00:11:09 2007
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fileset-config file-format-version="1.2.0" simple-config="true">
+    <fileset name="all" enabled="true" check-config-name="Tuscany Checks" local="false">
+        <file-match-pattern match-pattern="." include-pattern="true"/>
+    </fileset>
+</fileset-config>

Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/core/.pmd
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/core/.pmd?view=diff&rev=508341&r1=508340&r2=508341
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/core/.pmd (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/core/.pmd Fri Feb 16 00:11:09 2007
@@ -1,20 +1,2 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<pmd><useProjectRuleSet>true</useProjectRuleSet><rules/></pmd>
+<pmd><useProjectRuleSet>true</useProjectRuleSet><rules/><includeDerivedFiles>false</includeDerivedFiles></pmd>
\ No newline at end of file

Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/deployment/ContentTypeDescriberImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/deployment/ContentTypeDescriberImpl.java?view=diff&rev=508341&r1=508340&r2=508341
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/deployment/ContentTypeDescriberImpl.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/deployment/ContentTypeDescriberImpl.java Fri Feb 16 00:11:09 2007
@@ -49,7 +49,7 @@
      * Initialize contentType registry with know types based on known file
      * extensions
      */
-    public void init() {
+    private void init() {
         contentTypeRegistry.put("SCDL", "application/v.tuscany.scdl");
         contentTypeRegistry.put("WSDL", "application/v.tuscany.wsdl");
     }

Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/deployment/ContributionServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/deployment/ContributionServiceImpl.java?view=diff&rev=508341&r1=508340&r2=508341
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/deployment/ContributionServiceImpl.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/deployment/ContributionServiceImpl.java Fri Feb 16 00:11:09 2007
@@ -40,24 +40,19 @@
     /**
      * Repository where contributions are stored. Usually set by injection.
      */
-    protected ContributionRepository contributionRepository = null;
+    protected ContributionRepository contributionRepository;
     /**
      * Registry of available processors. Usually set by injection.
      */
-    protected ContributionProcessorRegistry processorRegistry = null;
+    protected ContributionProcessorRegistry processorRegistry;
 
-    public ContributionServiceImpl(@Autowire ContributionRepository repository, @Autowire ContributionProcessorRegistry processorRegistry ) {
+    public ContributionServiceImpl(@Autowire ContributionRepository repository, 
+                                   @Autowire ContributionProcessorRegistry processorRegistry) {
         super();
         this.contributionRepository = repository;
         this.processorRegistry = processorRegistry;
     }
 
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tuscany.host.deployment.ContributionService#contribute(java.net.URL)
-     */
     public URI contribute(URL contribution) throws DeploymentException, IOException {
         if (contribution == null) {
             throw new IllegalArgumentException("contribution is null");
@@ -78,11 +73,6 @@
         }
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.tuscany.host.deployment.ContributionService#contribute(java.net.URI, java.io.InputStream, java.lang.String)
-     */
     public URI contribute(URI source, InputStream contributionStream) throws DeploymentException, IOException {
         if (source == null) {
             throw new IllegalArgumentException("source URI for contribution is null");
@@ -99,19 +89,17 @@
             // start processing valid contribution
             contribution = new Contribution();
             contribution.setUri(new URI("sca://contribution/" + UUID.randomUUID()));
-            
+
             this.processorRegistry.processContent(contribution, storedURL, contributionStream);
 
-            
         } catch (URISyntaxException urie) {
             // FIXME
         }
-        
-        
-        if(contribution == null){
-            //FIXME throw exception
+
+        if (contribution == null) {
+            // FIXME throw exception
         }
-        
+
         return contribution.getUri();
     }
 

Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/.checkstyle
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/.checkstyle?view=diff&rev=508341&r1=508340&r2=508341
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/.checkstyle (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/.checkstyle Fri Feb 16 00:11:09 2007
@@ -3,7 +3,7 @@
     <local-check-config name="Tuscany" location="F:\TuscanyLatest\buildtools\src\main\resources\tuscany-checkstyle.xml" type="external" description="">
         <additional-data name="protect-config-file" value="false"/>
     </local-check-config>
-    <fileset name="all" enabled="true" check-config-name="Sun Checks" local="false">
+    <fileset name="all" enabled="true" check-config-name="Tuscany Checks" local="false">
         <file-match-pattern match-pattern="." include-pattern="true"/>
     </fileset>
 </fileset-config>

Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/.pmd
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/.pmd?view=diff&rev=508341&r1=508340&r2=508341
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/.pmd (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/.pmd Fri Feb 16 00:11:09 2007
@@ -1,20 +1,2 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-<pmd><useProjectRuleSet>true</useProjectRuleSet><rules/></pmd>
+<pmd><useProjectRuleSet>true</useProjectRuleSet><rules/><includeDerivedFiles>false</includeDerivedFiles></pmd>
\ No newline at end of file

Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ContributionProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ContributionProcessor.java?view=diff&rev=508341&r1=508340&r2=508341
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ContributionProcessor.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/deployer/ContributionProcessor.java Fri Feb 16 00:11:09 2007
@@ -45,7 +45,8 @@
      * @throws DeploymentException if there was a problem with the contribution
      * @throws IOException if there was a problem reading the stream
      */
-    void processContent(Contribution contribution, URL source, InputStream inputStream) throws DeploymentException, IOException;
+    void processContent(Contribution contribution, URL source, InputStream inputStream) throws DeploymentException,
+        IOException;
 
     /**
      * Process a contribution from another model object. It will be used for the
@@ -60,5 +61,6 @@
      * @throws DeploymentException
      * @throws IOException
      */
-    void processModel(Contribution contribution, URL source, Object modelObject) throws DeploymentException, IOException;
+    void processModel(Contribution contribution, URL source, Object modelObject) throws DeploymentException,
+        IOException;
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org