fasten-project / fasten

Analyse package dependency networks at the call graph level
https://www.fasten-project.eu
Apache License 2.0
91 stars 28 forks source link

Catch `ArrayIndexOutOfBoundsException` when deserializing the `Exclusion` object #486

Closed mir-am closed 1 year ago

mir-am commented 2 years ago

Description

This is a tiny PR to ignore ArrayIndexOutOfBoundsException when deserializing Exclusion objects that contain malformed Maven coordinates.

Motivation and context

This issue currently makes the dependency graph resolver crash all the time and hence hinders its progress

Testing

Tested in production and the issue is resolved.

proksch commented 1 year ago

I have revised the proposed solution a bit:

1) I have created an implementation that is not based on exceptions, but that simply checks the array size. 2) I have added a regression test case to reflect the problem and prevent it from happening again.

Next, I will fix the PomAnalyzer to not create such broken JSON serializations in the first place.

proksch commented 1 year ago

I think we broke the review system, as I cannot select you as a reviewer for your own PR. I have approved the change from my side, please review it and just merge it, if you agree.