You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tamaya.apache.org by pl...@apache.org on 2015/04/19 02:24:12 UTC
[1/2] incubator-tamaya git commit: Added rule to ensure that the
naming of the service provider configuration files is correct.
Repository: incubator-tamaya
Updated Branches:
refs/heads/master dcd20f6f2 -> 93ff8752d
Added rule to ensure that the naming of the service provider configuration files is correct.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/bf402299
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/bf402299
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/bf402299
Branch: refs/heads/master
Commit: bf40229957561c9141a74505d6a4bd680ab3d972
Parents: dcd20f6
Author: Oliver B. Fischer <pl...@apache.org>
Authored: Sun Apr 19 02:17:55 2015 +0200
Committer: Oliver B. Fischer <pl...@apache.org>
Committed: Sun Apr 19 02:17:55 2015 +0200
----------------------------------------------------------------------
jqassistant/default.xml | 1 +
jqassistant/module-concepts.xml | 55 ++++++++++++++++++++++++++++++++
jqassistant/serviceloader-rules.xml | 53 ++++++++++++++++++++++++++++++
3 files changed, 109 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/bf402299/jqassistant/default.xml
----------------------------------------------------------------------
diff --git a/jqassistant/default.xml b/jqassistant/default.xml
index c332fe6..222a685 100644
--- a/jqassistant/default.xml
+++ b/jqassistant/default.xml
@@ -55,5 +55,6 @@ under the License.
<group id="default">
<includeConstraint refId="naming:namingOfPropertyConverters"/>
<includeConstraint refId="naming:namingOfPropertyFilters"/>
+ <includeConstraint refId="serviceLoader:correctServiceLoaderNaming"/>
</group>
</jqa:jqassistant-rules>
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/bf402299/jqassistant/module-concepts.xml
----------------------------------------------------------------------
diff --git a/jqassistant/module-concepts.xml b/jqassistant/module-concepts.xml
new file mode 100644
index 0000000..29369ed
--- /dev/null
+++ b/jqassistant/module-concepts.xml
@@ -0,0 +1,55 @@
+<!--
+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.
+-->
+<jqa:jqassistant-rules xmlns:jqa="http://www.buschmais.com/jqassistant/core/analysis/rules/schema/v1.0">
+
+ <concept id="module:SPI">
+ <description>Labels all .spi packages as "SPI".</description>
+ <cypher><![CDATA[
+ MATCH
+ (package:Package)
+
+ WHERE
+ package.name = "spi"
+
+ SET
+ package:SPI
+
+ RETURN
+ package
+ ]]></cypher>
+ </concept>
+
+ <concept id="module:API">
+ <description>Labels all .api packages as "API".</description>
+ <cypher><![CDATA[
+ MATCH
+ (package:Package)
+
+ WHERE
+ package.name = "api"
+
+ SET
+ package:API
+
+ RETURN
+ package
+ ]]></cypher>
+ </concept>
+
+</jqa:jqassistant-rules>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/bf402299/jqassistant/serviceloader-rules.xml
----------------------------------------------------------------------
diff --git a/jqassistant/serviceloader-rules.xml b/jqassistant/serviceloader-rules.xml
new file mode 100644
index 0000000..808b7b2
--- /dev/null
+++ b/jqassistant/serviceloader-rules.xml
@@ -0,0 +1,53 @@
+<!--
+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.
+-->
+<jqa:jqassistant-rules xmlns:jqa="http://www.buschmais.com/jqassistant/core/analysis/rules/schema/v1.0">
+
+ <concept id="serviceLoader:SPI">
+ <description>Labels all .spi packages as "SPI".</description>
+ <cypher><![CDATA[
+ MATCH
+ (package:Package)-->(type:Type:Java)
+
+ WHERE
+ package.name = "spi"
+
+ SET
+ type:SPI
+
+ RETURN
+ type
+ ]]></cypher>
+ </concept>
+
+ <constraint id="serviceLoader:correctServiceLoaderNaming">
+ <requiresConcept refId="serviceLoader:SPI"/>
+ <description>A service provider must be contained in a service provider configuration file with the full qualified binary name of the service's type.</description>
+ <cypher><![CDATA[
+ MATCH
+ (sl:ServiceLoader)-[:CONTAINS]->(impl:Type)-[:IMPLEMENTS]->(spi:SPI)
+
+ WHERE
+ NOT split(sl.fileName, '/')[-1] = spi.fqn
+
+ RETURN
+ impl.fqn AS impl, spi.fqn as spi, sl.fileName AS spiConfig
+ ]]></cypher>
+ </constraint>
+
+</jqa:jqassistant-rules>
\ No newline at end of file
[2/2] incubator-tamaya git commit: Removed outdated service provider
configuration file.
Posted by pl...@apache.org.
Removed outdated service provider configuration file.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/93ff8752
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/93ff8752
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/93ff8752
Branch: refs/heads/master
Commit: 93ff8752dbf8e4242c84c64629f12f842ea070e7
Parents: bf40229
Author: Oliver B. Fischer <pl...@apache.org>
Authored: Sun Apr 19 02:23:45 2015 +0200
Committer: Oliver B. Fischer <pl...@apache.org>
Committed: Sun Apr 19 02:23:45 2015 +0200
----------------------------------------------------------------------
.../org.apache.tamaya.PropertyConverter | 34 --------------------
1 file changed, 34 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/93ff8752/java8/core/src/main/resources/META-INF/services/org.apache.tamaya.PropertyConverter
----------------------------------------------------------------------
diff --git a/java8/core/src/main/resources/META-INF/services/org.apache.tamaya.PropertyConverter b/java8/core/src/main/resources/META-INF/services/org.apache.tamaya.PropertyConverter
deleted file mode 100644
index 964843c..0000000
--- a/java8/core/src/main/resources/META-INF/services/org.apache.tamaya.PropertyConverter
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# 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 current 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.
-#
-org.apache.tamaya.core.internal.converters.BooleanConverter
-org.apache.tamaya.core.internal.converters.ByteConverter
-org.apache.tamaya.core.internal.converters.CharConverter
-org.apache.tamaya.core.internal.converters.DoubleConverter
-org.apache.tamaya.core.internal.converters.FloatConverter
-org.apache.tamaya.core.internal.converters.IntegerConverter
-org.apache.tamaya.core.internal.converters.LongConverter
-org.apache.tamaya.core.internal.converters.ShortConverter
-org.apache.tamaya.core.internal.converters.BigDecimalConverter
-org.apache.tamaya.core.internal.converters.BigIntegerConverter
-org.apache.tamaya.core.internal.converters.CurrencyConverter
-org.apache.tamaya.core.internal.converters.LocalDateConverter
-org.apache.tamaya.core.internal.converters.LocalDateTimeConverter
-org.apache.tamaya.core.internal.converters.LocalTimeConverter
-org.apache.tamaya.core.internal.converters.ZoneIdConverter
-org.apache.tamaya.core.internal.converters.NumberConverter