I was trying to analyse our code base using Sonarqube. After refactoring a specific file "ReportHelper.java", the last analysis failed.
Caused by: java.lang.IllegalStateException: Fail to process issues of
component
'com.vls.nost:Nost_business:src/main/java/com/velos/nost/business/helper/ReportHelper.java'
at
org.sonar.server.computation.task.projectanalysis.issue.IntegrateIssuesVisitor.visitAny(IntegrateIssuesVisitor.java:70)
at
org.sonar.server.computation.task.projectanalysis.component.TypeAwareVisitorWrapper.visitAny(TypeAwareVisitorWrapper.java:82)
at
org.sonar.server.computation.task.projectanalysis.component.VisitorsCrawler.visitNode(VisitorsCrawler.java:117)
at
org.sonar.server.computation.task.projectanalysis.component.VisitorsCrawler.visitImpl(VisitorsCrawler.java:100)
at
org.sonar.server.computation.task.projectanalysis.component.VisitorsCrawler.visit(VisitorsCrawler.java:72)
... 26 more Caused by: java.lang.IllegalStateException: Source of
file
'ComponentImpl{key='com.velos.nostradamus:Nostradamus_business:src/main/java/com/vls/nost/business/helper/ReportHelper.java',
type=FILE, uuid='AWKq2KypGCJ2XfmqS536',
name='com.vls.nostradamus:Nostradamus_business:src/main/java/com/vls/nost/business/helper/nost.java',
description='null', fileAttributes=FileAttributes{languageKey='java',
unitTest=false, lines=3611}, reportAttributes=ReportAttributes{ref=67,
version='null',
path='src/main/java/com/vls/nost/business/helper/ReportHelper.java',
scmPath='business/src/main/java/com/velos/nost/business/helper/ReportHelper.java'}}'
has less lines (3512) than the expected number (3611)
Not sure, why the number of lines should not be less than the expected number after refactoring? Also, I am wondering about how that expected number is arrived at by Sonar?
Any help would be much appreciated?