locationtech / udig-platform

uDig parent project containing all core components. More plugins can be found in community repos: http://github.com/uDig-Community
http://udig.refractions.net
190 stars 133 forks source link

Remove duplicated if-condition in 'FeatureInfoDisplay' #670

Closed sschulz92 closed 2 years ago

sschulz92 commented 2 years ago

The if-condition value instanceof FeatureCollection was used twice with the exact same content - detected by SonarQube :)

sschulz92 commented 2 years ago

Nice catch! Has sonarqube guided you to this issue?

Basically I searched for bugs and code-smells with <3 occurrences so that I am able to remove them completely :D One of the bugs was, that the if-condition is totally the same so that the second if-condition will never be true.

fgdrf commented 2 years ago

second if-condition will never be true.

I guess the compile might removed it, however it was dead code which never reached. many thanks again!