Skip to content

Exception while pfxprobe try to write down a detected issue

Some reports failed to be written in a gitlab ci run. To reproduce it simply apply pfxprobe to a non well formated groovy file.

Not sure if it is related to #1

Here is the stack trace I obtained.

Exception in thread "main" org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '[{type=issue, engine_name=pfxprobe, check_name=file-not-formatted, description=[minor] File is not auto-formatted. Please use Ctrl+Alt+L in intellij before committing changes, severity=minor, categories=[Style], location={path=./pricefx-market-simulation-demo-logic/CalculationLogic/MarketSimulation_PriceChangeImpact_Result_Configurator+2021-01-01/elements/Input.groovy, lines={begin=53, end=53}, chars={begin=1928, end=1930}}, fingerprint=5fa74c0b1f3f31646007bbb2a45a9dc1}]' with class 'java.util.ArrayList' to class 'java.util.HashSet' due to: org.codehaus.groovy.runtime.metaclass.MissingPropertyExceptionNoStack: No such property: type for class: java.util.HashSet
	at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.continueCastOnSAM(DefaultTypeTransformation.java:413)
	at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.continueCastOnNumber(DefaultTypeTransformation.java:329)
	at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.continueCastOnCollection(DefaultTypeTransformation.java:277)
	at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:230)
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.castToType(ScriptBytecodeAdapter.java:615)
	at Utils.ReportUtils.writeCodeClimateReport(ReportUtils.groovy:24)
	at Utils.ReportUtils$writeCodeClimateReport$0.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127)
	at Main.main(Main.groovy:47)