diff --git a/src/it/basic-1/verify.groovy b/src/it/basic-1/verify.groovy index b6ccacfd..6c86b2d9 100644 --- a/src/it/basic-1/verify.groovy +++ b/src/it/basic-1/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def effortLevel = 'default' +String effortLevel = 'default' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') @@ -34,12 +34,12 @@ println '***************************' assert spotbugsHtml.text.contains( "" + effortLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -50,7 +50,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -61,7 +61,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" diff --git a/src/it/change-xml-filename/verify.groovy b/src/it/change-xml-filename/verify.groovy index cb9abfde..cbc62392 100644 --- a/src/it/change-xml-filename/verify.groovy +++ b/src/it/change-xml-filename/verify.groovy @@ -26,7 +26,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" diff --git a/src/it/check-bug-file-multi-list/verify.groovy b/src/it/check-bug-file-multi-list/verify.groovy index f0a83eda..1ba7adee 100644 --- a/src/it/check-bug-file-multi-list/verify.groovy +++ b/src/it/check-bug-file-multi-list/verify.groovy @@ -28,7 +28,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -39,7 +39,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" assert xdocErrors == 0 diff --git a/src/it/check-bug-file-multi/verify.groovy b/src/it/check-bug-file-multi/verify.groovy index f0a83eda..1ba7adee 100644 --- a/src/it/check-bug-file-multi/verify.groovy +++ b/src/it/check-bug-file-multi/verify.groovy @@ -28,7 +28,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -39,7 +39,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" assert xdocErrors == 0 diff --git a/src/it/check-bug-file/verify.groovy b/src/it/check-bug-file/verify.groovy index f0a83eda..1ba7adee 100644 --- a/src/it/check-bug-file/verify.groovy +++ b/src/it/check-bug-file/verify.groovy @@ -28,7 +28,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -39,7 +39,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" assert xdocErrors == 0 diff --git a/src/it/check-jvmargs/verify.groovy b/src/it/check-jvmargs/verify.groovy index 34327471..89fabee5 100644 --- a/src/it/check-jvmargs/verify.groovy +++ b/src/it/check-jvmargs/verify.groovy @@ -29,7 +29,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" println '***************************' @@ -39,7 +39,7 @@ println '***************************' def path = new XmlSlurper().parse(spotbugXdoc) def allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" assert xdocErrors == spotbugsXmlErrors diff --git a/src/it/check-multi/verify.groovy b/src/it/check-multi/verify.groovy index e070df0b..dddee2a4 100644 --- a/src/it/check-multi/verify.groovy +++ b/src/it/check-multi/verify.groovy @@ -28,7 +28,7 @@ println '**********************************' allNodes = path.depthFirst().collect { it } -def spotbugsErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsErrors}" assert spotbugsErrors > 0 diff --git a/src/it/check-pluginList-repo/verify.groovy b/src/it/check-pluginList-repo/verify.groovy index ee6de6a4..7b151028 100644 --- a/src/it/check-pluginList-repo/verify.groovy +++ b/src/it/check-pluginList-repo/verify.groovy @@ -29,7 +29,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -40,7 +40,7 @@ println '***************************' def path = new XmlSlurper().parse(spotbugXdoc) def allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" assert xdocErrors == spotbugsXmlErrors diff --git a/src/it/check/verify.groovy b/src/it/check/verify.groovy index 2e0eca18..2f1e7270 100644 --- a/src/it/check/verify.groovy +++ b/src/it/check/verify.groovy @@ -31,7 +31,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -43,7 +43,7 @@ println '***************************' def path = new XmlSlurper().parse(spotbugXdoc) xNodes = path.depthFirst().collect{ it } -def xdocErrors = xNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = xNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" assert xdocErrors == spotbugsXmlErrors diff --git a/src/it/effort-default/verify.groovy b/src/it/effort-default/verify.groovy index 641c90cd..f2c90ca3 100644 --- a/src/it/effort-default/verify.groovy +++ b/src/it/effort-default/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def effortLevel = 'default' +String effortLevel = 'default' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') assert spotbugsHtml.exists() @@ -33,13 +33,13 @@ println '***************************' assert spotbugsHtml.text.contains( "" + effortLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -50,7 +50,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -61,7 +61,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" assert path.findAll {it.name() == 'BugCollection'}.@effort.text() == effortLevel diff --git a/src/it/effort-max/verify.groovy b/src/it/effort-max/verify.groovy index 88d20be7..9468f6fc 100644 --- a/src/it/effort-max/verify.groovy +++ b/src/it/effort-max/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def effortLevel = 'max' +String effortLevel = 'max' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') @@ -34,13 +34,13 @@ println '***************************' assert spotbugsHtml.text.contains( "" + effortLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -51,7 +51,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -62,7 +62,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" assert path.findAll {it.name() == 'BugCollection'}.@effort.text() == effortLevel diff --git a/src/it/effort-min/verify.groovy b/src/it/effort-min/verify.groovy index 2a102d42..20ab60a4 100644 --- a/src/it/effort-min/verify.groovy +++ b/src/it/effort-min/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def effortLevel = 'min' +String effortLevel = 'min' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') @@ -34,13 +34,13 @@ println '***************************' assert spotbugsHtml.text.contains( "" + effortLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -51,7 +51,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -62,7 +62,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" assert path.findAll {it.name() == 'BugCollection'}.@effort.text() == effortLevel diff --git a/src/it/encoding-utf8/verify.groovy b/src/it/encoding-utf8/verify.groovy index 7151f0b8..7add3dd6 100644 --- a/src/it/encoding-utf8/verify.groovy +++ b/src/it/encoding-utf8/verify.groovy @@ -29,12 +29,12 @@ println '***************************' println "Checking HTML file" println '***************************' -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -45,7 +45,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -56,7 +56,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" diff --git a/src/it/exclude-modules/verify.groovy b/src/it/exclude-modules/verify.groovy index 1389829d..ad577edf 100644 --- a/src/it/exclude-modules/verify.groovy +++ b/src/it/exclude-modules/verify.groovy @@ -28,7 +28,7 @@ println '**********************************' allNodes = path.depthFirst().collect { it } -def spotbugsErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsErrors}" assert spotbugsErrors > 0 diff --git a/src/it/exclude-multi-list/verify.groovy b/src/it/exclude-multi-list/verify.groovy index 7151f0b8..7add3dd6 100644 --- a/src/it/exclude-multi-list/verify.groovy +++ b/src/it/exclude-multi-list/verify.groovy @@ -29,12 +29,12 @@ println '***************************' println "Checking HTML file" println '***************************' -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -45,7 +45,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -56,7 +56,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" diff --git a/src/it/exclude-multi/verify.groovy b/src/it/exclude-multi/verify.groovy index 7151f0b8..7add3dd6 100644 --- a/src/it/exclude-multi/verify.groovy +++ b/src/it/exclude-multi/verify.groovy @@ -29,12 +29,12 @@ println '***************************' println "Checking HTML file" println '***************************' -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -45,7 +45,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -56,7 +56,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" diff --git a/src/it/exclude/verify.groovy b/src/it/exclude/verify.groovy index e503dec3..00a2521b 100644 --- a/src/it/exclude/verify.groovy +++ b/src/it/exclude/verify.groovy @@ -29,12 +29,12 @@ println '***************************' println "Checking HTML file" println '***************************' -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -45,7 +45,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -56,7 +56,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" diff --git a/src/it/excludeBugsFile/verify.groovy b/src/it/excludeBugsFile/verify.groovy index 87c6a972..3bedecd2 100644 --- a/src/it/excludeBugsFile/verify.groovy +++ b/src/it/excludeBugsFile/verify.groovy @@ -30,7 +30,7 @@ println '***************************' def path = new XmlSlurper().parse(spotbugXdoc) def allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" println '**********************************' @@ -40,7 +40,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" assert xdocErrors == spotbugsXmlErrors diff --git a/src/it/experimental/verify.groovy b/src/it/experimental/verify.groovy index 9bfef620..1d318567 100644 --- a/src/it/experimental/verify.groovy +++ b/src/it/experimental/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def thresholdLevel = 'experimental' +String thresholdLevel = 'experimental' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') assert spotbugsHtml.exists() @@ -33,12 +33,12 @@ println '***************************' assert spotbugsHtml.text.contains( "" + thresholdLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -49,7 +49,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -60,7 +60,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" assert path.findAll {it.name() == 'BugCollection'}.@threshold.text() == thresholdLevel diff --git a/src/it/include-multi-list/verify.groovy b/src/it/include-multi-list/verify.groovy index 7151f0b8..7add3dd6 100644 --- a/src/it/include-multi-list/verify.groovy +++ b/src/it/include-multi-list/verify.groovy @@ -29,12 +29,12 @@ println '***************************' println "Checking HTML file" println '***************************' -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -45,7 +45,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -56,7 +56,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" diff --git a/src/it/include-multi/verify.groovy b/src/it/include-multi/verify.groovy index 7151f0b8..7add3dd6 100644 --- a/src/it/include-multi/verify.groovy +++ b/src/it/include-multi/verify.groovy @@ -29,12 +29,12 @@ println '***************************' println "Checking HTML file" println '***************************' -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -45,7 +45,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -56,7 +56,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" diff --git a/src/it/include/verify.groovy b/src/it/include/verify.groovy index 7151f0b8..7add3dd6 100644 --- a/src/it/include/verify.groovy +++ b/src/it/include/verify.groovy @@ -29,12 +29,12 @@ println '***************************' println "Checking HTML file" println '***************************' -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -45,7 +45,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -56,7 +56,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" diff --git a/src/it/maxRank/verify.groovy b/src/it/maxRank/verify.groovy index 87c6a972..3bedecd2 100644 --- a/src/it/maxRank/verify.groovy +++ b/src/it/maxRank/verify.groovy @@ -30,7 +30,7 @@ println '***************************' def path = new XmlSlurper().parse(spotbugXdoc) def allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" println '**********************************' @@ -40,7 +40,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" assert xdocErrors == spotbugsXmlErrors diff --git a/src/it/multi-build/verify.groovy b/src/it/multi-build/verify.groovy index d3e31160..bb4f49aa 100644 --- a/src/it/multi-build/verify.groovy +++ b/src/it/multi-build/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def effortLevel = 'default' +String effortLevel = 'default' // check module 1 @@ -24,7 +24,7 @@ println '***************************' println "Checking Module-1" println '***************************' -def module = "module-1" +String module = 'module-1' File spotbugsHtml = new File(basedir, "modules/${module}/target/site/spotbugs.html") assert spotbugsHtml.exists() @@ -42,12 +42,12 @@ println '***************************' assert spotbugsHtml.text.contains( "" + effortLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" println '***************************' @@ -57,7 +57,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" assert spotbugsErrors == xdocErrors @@ -74,7 +74,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" assert spotbugsErrors == spotbugsXmlErrors diff --git a/src/it/multi/verify.groovy b/src/it/multi/verify.groovy index 975e43a1..1b6b804d 100644 --- a/src/it/multi/verify.groovy +++ b/src/it/multi/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def effortLevel = 'default' +String effortLevel = 'default' // check module 1 @@ -24,7 +24,7 @@ println '***************************' println "Checking Module-1" println '***************************' -def module = "module-1" +String module = 'module-1' File spotbugsHtml = new File(basedir, "modules/${module}/target/site/spotbugs.html") assert spotbugsHtml.exists() @@ -42,7 +42,7 @@ println '***************************' assert spotbugsHtml.text.contains( "" + effortLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) @@ -57,7 +57,7 @@ println '***************************' path = new XmlSlurper().parse(new File(basedir, "modules/${module}/target/spotbugs.xml")) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" assert spotbugsErrors == xdocErrors @@ -74,7 +74,7 @@ println '**********************************' path = new XmlSlurper().parse(new File(basedir, "modules/${module}/target/spotbugsXml.xml")) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" assert spotbugsErrors == spotbugsXmlErrors @@ -84,9 +84,6 @@ println "BugInstance with includes size is ${spotbugsXmlErrors}" assert spotbugsErrors == spotbugsXmlErrors - - - // check module 2 println '***************************' diff --git a/src/it/nested/verify.groovy b/src/it/nested/verify.groovy index b6ccacfd..6c86b2d9 100644 --- a/src/it/nested/verify.groovy +++ b/src/it/nested/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def effortLevel = 'default' +String effortLevel = 'default' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') @@ -34,12 +34,12 @@ println '***************************' assert spotbugsHtml.text.contains( "" + effortLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -50,7 +50,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -61,7 +61,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" diff --git a/src/it/no-testsrc/verify.groovy b/src/it/no-testsrc/verify.groovy index b6ccacfd..6c86b2d9 100644 --- a/src/it/no-testsrc/verify.groovy +++ b/src/it/no-testsrc/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def effortLevel = 'default' +String effortLevel = 'default' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') @@ -34,12 +34,12 @@ println '***************************' assert spotbugsHtml.text.contains( "" + effortLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -50,7 +50,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -61,7 +61,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" diff --git a/src/it/omitVisitors/verify.groovy b/src/it/omitVisitors/verify.groovy index bd446b60..79544118 100644 --- a/src/it/omitVisitors/verify.groovy +++ b/src/it/omitVisitors/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def effortLevel = 'default' +String effortLevel = 'default' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') @@ -34,12 +34,12 @@ println '***************************' assert spotbugsHtml.text.contains( "" + effortLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -50,7 +50,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" assert spotbugsXmlErrors == spotbugsErrors @@ -69,7 +69,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" assert xdocErrors == spotbugsErrors diff --git a/src/it/onlyAnalyze/verify.groovy b/src/it/onlyAnalyze/verify.groovy index 1d779d5b..63b95bdb 100644 --- a/src/it/onlyAnalyze/verify.groovy +++ b/src/it/onlyAnalyze/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def effortLevel = 'default' +String effortLevel = 'default' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') assert spotbugsHtml.exists() @@ -33,12 +33,12 @@ println '***************************' assert spotbugsHtml.text.contains( "" + effortLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -49,7 +49,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -60,7 +60,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" diff --git a/src/it/onlyAnalyzeFileSource/verify.groovy b/src/it/onlyAnalyzeFileSource/verify.groovy index 1d779d5b..63b95bdb 100644 --- a/src/it/onlyAnalyzeFileSource/verify.groovy +++ b/src/it/onlyAnalyzeFileSource/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def effortLevel = 'default' +String effortLevel = 'default' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') assert spotbugsHtml.exists() @@ -33,12 +33,12 @@ println '***************************' assert spotbugsHtml.text.contains( "" + effortLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -49,7 +49,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -60,7 +60,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" diff --git a/src/it/pluginList-repo/verify.groovy b/src/it/pluginList-repo/verify.groovy index b6ccacfd..6c86b2d9 100644 --- a/src/it/pluginList-repo/verify.groovy +++ b/src/it/pluginList-repo/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def effortLevel = 'default' +String effortLevel = 'default' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') @@ -34,12 +34,12 @@ println '***************************' assert spotbugsHtml.text.contains( "" + effortLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -50,7 +50,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -61,7 +61,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" diff --git a/src/it/pluginList/verify.groovy b/src/it/pluginList/verify.groovy index 1d779d5b..63b95bdb 100644 --- a/src/it/pluginList/verify.groovy +++ b/src/it/pluginList/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def effortLevel = 'default' +String effortLevel = 'default' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') assert spotbugsHtml.exists() @@ -33,12 +33,12 @@ println '***************************' assert spotbugsHtml.text.contains( "" + effortLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -49,7 +49,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -60,7 +60,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" diff --git a/src/it/relaxed/verify.groovy b/src/it/relaxed/verify.groovy index 1d779d5b..63b95bdb 100644 --- a/src/it/relaxed/verify.groovy +++ b/src/it/relaxed/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def effortLevel = 'default' +String effortLevel = 'default' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') assert spotbugsHtml.exists() @@ -33,12 +33,12 @@ println '***************************' assert spotbugsHtml.text.contains( "" + effortLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -49,7 +49,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -60,7 +60,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" diff --git a/src/it/sarif-1/verify.groovy b/src/it/sarif-1/verify.groovy index b0da932a..de72dcb1 100644 --- a/src/it/sarif-1/verify.groovy +++ b/src/it/sarif-1/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.json.JsonSlurper -def effortLevel = 'default' +String effortLevel = 'default' File spotbugSarifFile = new File(basedir, 'target/spotbugsSarif.json') diff --git a/src/it/sarif-2/verify.groovy b/src/it/sarif-2/verify.groovy index b9e42493..6b785d81 100644 --- a/src/it/sarif-2/verify.groovy +++ b/src/it/sarif-2/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.json.JsonSlurper -def effortLevel = 'default' +String effortLevel = 'default' File spotbugSarifFile = new File(basedir, 'target/spotbugsSarif.json') @@ -27,7 +27,7 @@ println "Checking SARIF file" println '**********************************' -def String normalizePath(String path) { +String normalizePath(String path) { return path.replaceAll("\\\\","/"); } diff --git a/src/it/site-brazil/verify.groovy b/src/it/site-brazil/verify.groovy index 1d779d5b..63b95bdb 100644 --- a/src/it/site-brazil/verify.groovy +++ b/src/it/site-brazil/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def effortLevel = 'default' +String effortLevel = 'default' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') assert spotbugsHtml.exists() @@ -33,12 +33,12 @@ println '***************************' assert spotbugsHtml.text.contains( "" + effortLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -49,7 +49,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -60,7 +60,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" diff --git a/src/it/site-default/verify.groovy b/src/it/site-default/verify.groovy index 1d779d5b..63b95bdb 100644 --- a/src/it/site-default/verify.groovy +++ b/src/it/site-default/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def effortLevel = 'default' +String effortLevel = 'default' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') assert spotbugsHtml.exists() @@ -33,12 +33,12 @@ println '***************************' assert spotbugsHtml.text.contains( "" + effortLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -49,7 +49,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -60,7 +60,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" diff --git a/src/it/site-french/verify.groovy b/src/it/site-french/verify.groovy index 1d779d5b..63b95bdb 100644 --- a/src/it/site-french/verify.groovy +++ b/src/it/site-french/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def effortLevel = 'default' +String effortLevel = 'default' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') assert spotbugsHtml.exists() @@ -33,12 +33,12 @@ println '***************************' assert spotbugsHtml.text.contains( "" + effortLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -49,7 +49,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -60,7 +60,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" diff --git a/src/it/site-spanish/verify.groovy b/src/it/site-spanish/verify.groovy index 1d779d5b..63b95bdb 100644 --- a/src/it/site-spanish/verify.groovy +++ b/src/it/site-spanish/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def effortLevel = 'default' +String effortLevel = 'default' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') assert spotbugsHtml.exists() @@ -33,12 +33,12 @@ println '***************************' assert spotbugsHtml.text.contains( "" + effortLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -49,7 +49,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -60,7 +60,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" diff --git a/src/it/skipEmpty/verify.groovy b/src/it/skipEmpty/verify.groovy index 861203e0..083567b9 100644 --- a/src/it/skipEmpty/verify.groovy +++ b/src/it/skipEmpty/verify.groovy @@ -32,7 +32,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" assert spotbugsXmlErrors == 0 diff --git a/src/it/threaded/verify.groovy b/src/it/threaded/verify.groovy index 1d779d5b..63b95bdb 100644 --- a/src/it/threaded/verify.groovy +++ b/src/it/threaded/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def effortLevel = 'default' +String effortLevel = 'default' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') assert spotbugsHtml.exists() @@ -33,12 +33,12 @@ println '***************************' assert spotbugsHtml.text.contains( "" + effortLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -49,7 +49,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -60,7 +60,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" diff --git a/src/it/threshold-experimental/verify.groovy b/src/it/threshold-experimental/verify.groovy index 1236f203..38917a38 100644 --- a/src/it/threshold-experimental/verify.groovy +++ b/src/it/threshold-experimental/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def thresholdLevel = 'experimental' +String thresholdLevel = 'experimental' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') @@ -34,12 +34,12 @@ println '***************************' assert spotbugsHtml.text.contains( "" + thresholdLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -50,7 +50,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -61,7 +61,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" diff --git a/src/it/threshold-high/verify.groovy b/src/it/threshold-high/verify.groovy index b6ccacfd..6c86b2d9 100644 --- a/src/it/threshold-high/verify.groovy +++ b/src/it/threshold-high/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def effortLevel = 'default' +String effortLevel = 'default' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') @@ -34,12 +34,12 @@ println '***************************' assert spotbugsHtml.text.contains( "" + effortLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -50,7 +50,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -61,7 +61,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" diff --git a/src/it/threshold-low/verify.groovy b/src/it/threshold-low/verify.groovy index b20d3260..c63284da 100644 --- a/src/it/threshold-low/verify.groovy +++ b/src/it/threshold-low/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def thresholdLevel = 'low' +String thresholdLevel = 'low' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') @@ -34,12 +34,12 @@ println '***************************' assert spotbugsHtml.text.contains( "" + thresholdLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -50,7 +50,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -61,7 +61,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" assert path.findAll {it.name() == 'BugCollection'}.@threshold.text() == thresholdLevel diff --git a/src/it/trace/verify.groovy b/src/it/trace/verify.groovy index b6ccacfd..6c86b2d9 100644 --- a/src/it/trace/verify.groovy +++ b/src/it/trace/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def effortLevel = 'default' +String effortLevel = 'default' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') @@ -34,12 +34,12 @@ println '***************************' assert spotbugsHtml.text.contains( "" + effortLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -50,7 +50,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -61,7 +61,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" diff --git a/src/it/userPrefs-override/verify.groovy b/src/it/userPrefs-override/verify.groovy index aa334124..e42aca02 100644 --- a/src/it/userPrefs-override/verify.groovy +++ b/src/it/userPrefs-override/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def effortLevel = 'max' +String effortLevel = 'max' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') @@ -34,12 +34,12 @@ println '***************************' assert spotbugsHtml.text.contains( "" + effortLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -50,7 +50,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -61,7 +61,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" assert path.findAll {it.name() == 'BugCollection'}.@effort.text() == effortLevel diff --git a/src/it/userPrefs/verify.groovy b/src/it/userPrefs/verify.groovy index 552973c2..2f4d0fb0 100644 --- a/src/it/userPrefs/verify.groovy +++ b/src/it/userPrefs/verify.groovy @@ -15,7 +15,7 @@ */ import groovy.xml.XmlSlurper -def effortLevel = 'default' +String effortLevel = 'default' File spotbugsHtml = new File(basedir, 'target/site/spotbugs.html') @@ -34,12 +34,12 @@ println '***************************' assert spotbugsHtml.text.contains( "" + effortLevel + "" ) -def xhtmlParser = new XmlSlurper(); +XmlSlurper xhtmlParser = new XmlSlurper(); xhtmlParser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) xhtmlParser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false) def path = xhtmlParser.parse( spotbugsHtml ) //*[@id="contentBox"]/div[2]/table/tbody/tr[2]/td[2] -def spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() +int spotbugsErrors = path.body.'**'.find {div -> div.@id == 'contentBox'}.section[1].table.tr[1].td[1].toInteger() println "Error Count is ${spotbugsErrors}" @@ -50,7 +50,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -61,7 +61,7 @@ println '***************************' path = new XmlSlurper().parse(spotbugXdoc) allNodes = path.depthFirst().collect{ it } -def xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" assert path.findAll {it.name() == 'BugCollection'}.@effort.text() == effortLevel diff --git a/src/it/verify/verify.groovy b/src/it/verify/verify.groovy index 2e0eca18..2f1e7270 100644 --- a/src/it/verify/verify.groovy +++ b/src/it/verify/verify.groovy @@ -31,7 +31,7 @@ println '**********************************' path = new XmlSlurper().parse(spotbugXml) allNodes = path.depthFirst().collect{ it } -def spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() +int spotbugsXmlErrors = allNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${spotbugsXmlErrors}" @@ -43,7 +43,7 @@ println '***************************' def path = new XmlSlurper().parse(spotbugXdoc) xNodes = path.depthFirst().collect{ it } -def xdocErrors = xNodes.findAll {it.name() == 'BugInstance'}.size() +int xdocErrors = xNodes.findAll {it.name() == 'BugInstance'}.size() println "BugInstance size is ${xdocErrors}" assert xdocErrors == spotbugsXmlErrors