Skip to content

Commit

Permalink
fix issues related to #449
Browse files Browse the repository at this point in the history
  • Loading branch information
mmelko committed Jun 9, 2020
1 parent d86b602 commit 2a0cc67
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 22 deletions.
22 changes: 11 additions & 11 deletions rules-reviewed/camel3/camel2/component-changes.windup.groovy
Expand Up @@ -181,7 +181,7 @@ ruleSet("component-changes-groovy")
.withId("component-changes-00008")

.addRule()
.when(Or.any(JavaClass.references("org.apache.camel.component.hl7.HL7.terser").at(TypeReferenceLocation.IMPORT).as("terser"),
.when(And.all(JavaClass.references("org.apache.camel.component.hl7.HL7.terser").at(TypeReferenceLocation.IMPORT).as("terser"),
FileContent.from("terser").matches("{*}terser({*}"))
)
.perform(Iteration.over("default").perform(
Expand All @@ -190,7 +190,7 @@ ruleSet("component-changes-groovy")
"languages", true)
.withQuickfix(createReplaceQuickfix("org.apache.camel.component.hl7.HL7.terser",
"org.apache.camel.component.hl7.HL7.hl17terser"))))
.withId("component-changes-00008")
.withId("component-changes-00009")

.addRule()
.when(Or.any(JavaClass.references("org.apache.camel.converter.crypto.CryptoDataFormat{*}").at(TypeReferenceLocation.VARIABLE_DECLARATION),
Expand All @@ -201,7 +201,7 @@ ruleSet("component-changes-groovy")
"The default encryption algorithm is mandatory changed from `DES/CBC/PKCS5Padding` to null. " +
"Therefore if algorithm hasn't been set yet, it's required to set a value for it",
"crypto_dataformat", false))
.withId("component-changes-00009")
.withId("component-changes-00010")

.addRule()
.when(Or.any(
Expand All @@ -215,7 +215,7 @@ ruleSet("component-changes-groovy")
"The default encryption key has been removed, so it is now mandatory to supply " +
"the key String/bytes if you are using symmetric encryption.",
"xml_security_dataformat", false))
.withId("component-changes-00010")
.withId("component-changes-00011")

.addRule()
.when(Or.any(
Expand All @@ -229,7 +229,7 @@ ruleSet("component-changes-groovy")
"Consumer.options with `consumer.` prefix have been removed. Use options without the prefix" +
"i.e `delay` instead of `consumer.delay`",
"using_endpoint_options_with_consumer_prefix", true))
.withId("component-changes-00011")
.withId("component-changes-00012")

.addRule()
.when(Or.any(
Expand All @@ -242,7 +242,7 @@ ruleSet("component-changes-groovy")
"tracing", true)
.with(Link.to("Tracer in Camel 3","https://camel.apache.org/manual/latest/tracer.html"))
.withEffort(2))
.withId("component-changes-00012")
.withId("component-changes-00013")

.addRule()
.when(Or.any(
Expand All @@ -255,7 +255,7 @@ ruleSet("component-changes-groovy")
"tracing", true)
.with(Link.to("Tracer in Camel 3","https://camel.apache.org/manual/latest/tracer.html"))
.withEffort(2))
.withId("component-changes-00013")
.withId("component-changes-00014")

.addRule()
.when( XmlFile.matchesXpath("/m:project/m:dependencies[m:dependency/m:artifactId/text() = 'camel-core']")
Expand All @@ -264,7 +264,7 @@ ruleSet("component-changes-groovy")
"`BacklogTracer` is no longer enabled by default in JMX. For using BacklogTracer " +
"you need to enable by setting `backlogTracing=true` on CamelContext.",
"tracing", false))
.withId("component-changes-00014")
.withId("component-changes-00015")

.addRule()
.when(Or.any(
Expand All @@ -278,7 +278,7 @@ ruleSet("component-changes-groovy")
.perform(createHint("XMLSecurity component: The default signature algorithm has changed",
"The default signature algorithm in the XMLSecurity component has changed `SHA1WithDSA` to `SHA256withRSA`. ",
"using_endpoint_options_with_consumer_prefix", IssueCategoryRegistry.INFORMATION))
.withId("component-changes-00015")
.withId("component-changes-00016")

.addRule()
.when(Or.any(
Expand All @@ -291,7 +291,7 @@ ruleSet("component-changes-groovy")
.perform(createHint("Crypto component: The default signature algorithm has changed",
"The default signature algorithm in the Crypto component has changed from `SHA1WithDSA` to `SHA256withRSA`.",
"using_endpoint_options_with_consumer_prefix", IssueCategoryRegistry.INFORMATION))
.withId("component-changes-00016")
.withId("component-changes-00017")
.addRule()
.when(Or.any(
XmlFile.matchesXpath("//*/c:route/*[contains(@uri,'xslt:') and contains(@uri,'saxon=true')]")
Expand All @@ -305,4 +305,4 @@ ruleSet("component-changes-groovy")
"Use `xslt-saxon` in URI as described in the documentation.",
"xslt", true)
.with(Link.to("Camel 3 XSLT Saxon Documentation", "https://camel.apache.org/components/latest/xslt-saxon-component.html")))
.withId("component-changes-00017")
.withId("component-changes-00018")
Expand Up @@ -93,6 +93,18 @@
</perform>
</rule>
<rule id="component-changes-00008-test">
<when>
<not>
<iterable-filter size="1">
<hint-exists message="`property` function has been removed from simple language. Use `exchangeProperty.*`"/>
</iterable-filter>
</not>
</when>
<perform>
<fail message="Simple language: property function has been removed hint not found!"/>
</perform>
</rule>
<rule id="component-changes-00009-test">
<when>
<not>
<iterable-filter size="1">
Expand All @@ -104,7 +116,7 @@
<fail message="[simple language] terser language renamed hint not found!"/>
</perform>
</rule>
<rule id="component-changes-00009-test">
<rule id="component-changes-00010-test">
<when>
<not>
<iterable-filter size="2">
Expand All @@ -117,7 +129,7 @@
<fail message="[Crypto-dataformat] crypto algorithm hint not found!"/>
</perform>
</rule>
<rule id="component-changes-000010-test">
<rule id="component-changes-000011-test">
<when>
<not>
<iterable-filter size="3">
Expand All @@ -130,7 +142,7 @@
<fail message="[SecureXML-dataformat] secureXML hint not found!"/>
</perform>
</rule>
<rule id="component-changes-000011-test">
<rule id="component-changes-000012-test">
<when>
<not>
<iterable-filter size="3">
Expand All @@ -143,7 +155,7 @@
<fail message="[Consumer endpoints] removed .consumer prefix hint not found!"/>
</perform>
</rule>
<rule id="component-changes-000012-test">
<rule id="component-changes-000013-test">
<when>
<not>
<iterable-filter size="2">
Expand All @@ -153,10 +165,10 @@
</not>
</when>
<perform>
<fail message="[[Tracing] Removed Tracer class hint not found!"/>
<fail message="[Tracing] Removed Tracer class hint not found!"/>
</perform>
</rule>
<rule id="component-changes-000013-test">
<rule id="component-changes-000014-test">
<when>
<not>
<iterable-filter size="1">
Expand All @@ -166,10 +178,10 @@
</not>
</when>
<perform>
<fail message="[Tracing] Removed DefaultFormatter class hint not found!"/>
<fail message="[Tracing] Removed DefaultTraceFormatter class hint not found!"/>
</perform>
</rule>
<rule id="component-changes-000014-test">
<rule id="component-changes-000015-test">
<when>
<not>
<iterable-filter size="1">
Expand All @@ -183,7 +195,7 @@
</perform>
</rule>

<rule id="component-changes-000015-test">
<rule id="component-changes-000016-test">
<when>
<not>
<iterable-filter size="5">
Expand All @@ -196,7 +208,7 @@
<fail message="[xmlsecurity-component] changed hint not found!"/>
</perform>
</rule>
<rule id="component-changes-000016-test">
<rule id="component-changes-000017-test">
<when>
<not>
<iterable-filter size="3">
Expand All @@ -209,7 +221,7 @@
<fail message="[Crypto-component] changed hint not found!"/>
</perform>
</rule>
<rule id="component-changes-000017-test">
<rule id="component-changes-000018-test">
<when>
<not>
<iterable-filter size="3">
Expand Down

0 comments on commit 2a0cc67

Please sign in to comment.