Skip to content
Advertisement

Tag: sonarqube

AES Encryption algorithms and padding scheme

Hello currently i have to do an AES encription and send it to an external SW but i am having trouble with the sonarqube. this is the relevant part of my current code: Is a little spaguetti cause it´s recyclated for an old code (TripleDES) sorry for that. But we can get the gist of it that`s that we are

I am unable to test the below mentioned method in JUnit testcase and getting ClassCastException

For below method i am writing JUnit testcase for sonarqube coverage. JUnit testcase: but, unable to mock or test the below line in JUnit testcase. MessageHeaders headers = ((MessagingException) message.getPayload()).getFailedMessage().getHeaders(); Exception: Answer Your productive code means you expect message.payload to be a MessagingException. But in your test, you create so payload will be a string. You need to build a

How to SupressWarnings for Sonar Security Hotspots?

I’m getting a Sonar CSRF Security Hotspot complaint on a Spring Boot code with Spring Security enabled that needs to be reviewed every then and now, and I would like to suppress the hotspot from the code as in @SuppressWarnings(“squid:x”) sonar.cpd.exclusions sonar.coverage.exclusions but as it it not a rule it has no id, at least on the screen How can

Advertisement