You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Darpos (via GitHub)" <gi...@apache.org> on 2023/02/17 21:35:37 UTC

[GitHub] [commons-imaging] Darpos opened a new pull request, #278: (Ref) #8 refactored decode image in order to reduce Cyclomatic

Darpos opened a new pull request, #278:
URL: https://github.com/apache/commons-imaging/pull/278

   Complexity from 17 to 7 (58.8235294118 %). This was done trough usage of araylist.contains instead of having 11 conditions. All tests still work and checked cyclomatic complexity with lizard.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[Imaging] PR #278: [...] reduce Cyclomatic

Posted by Gilles Sadowski <gi...@gmail.com>.
Le sam. 18 févr. 2023 à 01:33, garydgregory (via GitHub)
<gi...@apache.org> a écrit :
>
>
> garydgregory commented on PR #278:
> URL: https://github.com/apache/commons-imaging/pull/278#issuecomment-1435423300
>
>    This might satisfy some static code analysis but it's -1 for me since this PR now wastes memory allocating and building a List every single time. A bad trade off IMO.
>
>    To make this even worth, the PR also looses a code comment. Was this code change machine generated? That often happens with machine transforms.
>
>    What do others think?

Shouldn't it be a "switch"?

Regards,
Gilles

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@community.apache.org
For additional commands, e-mail: dev-help@community.apache.org


[GitHub] [commons-imaging] garydgregory commented on pull request #278: (Ref) #8 refactored decode image in order to reduce Cyclomatic

Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #278:
URL: https://github.com/apache/commons-imaging/pull/278#issuecomment-1435423300

   This might satisfy some static code analysis but it's -1 for me since this PR now wastes memory allocating and building a List every single time. A bad trade off IMO.
   
   To make this even worth, the PR also looses a code comment. Was this code change machine generated? That often happens with machine transforms.
   
   What do others think?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [commons-imaging] Darpos closed pull request #278: (Ref) #8 refactored decode image in order to reduce Cyclomatic

Posted by "Darpos (via GitHub)" <gi...@apache.org>.
Darpos closed pull request #278: (Ref) #8 refactored decode image in order to reduce Cyclomatic
URL: https://github.com/apache/commons-imaging/pull/278


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [commons-imaging] sebbASF commented on pull request #278: (Ref) #8 refactored decode image in order to reduce Cyclomatic

Posted by "sebbASF (via GitHub)" <gi...@apache.org>.
sebbASF commented on PR #278:
URL: https://github.com/apache/commons-imaging/pull/278#issuecomment-1435525628

   I agree the change as currently proposed should not be applied.
   The array of icon types could potentially be a static constant, but it would still be a waste of a resource. IMO the proposed code is less readable.
   
   What really needs fixing is the analyser!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [commons-imaging] sebbASF closed pull request #278: (Ref) #8 refactored decode image in order to reduce Cyclomatic

Posted by "sebbASF (via GitHub)" <gi...@apache.org>.
sebbASF closed pull request #278: (Ref) #8 refactored decode image in order to reduce Cyclomatic
URL: https://github.com/apache/commons-imaging/pull/278


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org