Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix IDETECT-4533: Update project name mechanism to avoid infinite loop #1282

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

devmehtabd
Copy link
Contributor

@devmehtabd devmehtabd commented Oct 29, 2024

This PR fixes the issue caused while adding support for #1098

This is an edge case which is encountered when the name of the project and the parent project are similar causing the execution of this block to stuck in an infinite loop: synopsys-detect/detectable/src/main/java/com/blackduck/integration/detectable/detectables/gradle/inspection/parse/GradleReportLineParser.java at 174aa29e61e115f6d321cef5b9ccc612d8f1fa01 · blackducksoftware/synopsys-detect . This code block looks for a particular dependency in all parent modules of the current module up to root project and checks if rich version was declared and applies it to current level. While checking for the customer’s project, found some modules whose name are similar to the parent module causing the loop to be stuck as Map entry would be E.g. (tts, tts).

To fix the issue, added depth as a suffix for the project name to avoid creating a same name key value pair. So now the key would look like (tts_2,tts_1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant