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: Stack overflow on multi maps (and other non-trivial generic clas… #4501

Merged
merged 1 commit into from
Oct 19, 2022

Commits on Oct 19, 2022

  1. fix: Stack overflow on multimaps (and other non-trivial generic class…

    …es), schema for multimaps is wrong
    
    Logic in sundrio that is responsible for replacing generic type arguments on methods and properties with their concrete instantiations from subclasses contained a bug, in which it looped infinitely if the same type argument name was used at multiple classes in the hierarchy. A common occurence were multimaps.
    
    A very similar code was also present in crd-generator, also suffering from the same bug.
    
    Sundrio has been updated to account for this situation, and updated utilities from sundrio have been introduced to crd-generator, which replace the previous implementation of the same algorithm.
    
    A test has been added to validate that multimaps (like `class MultiMap<K,V> implements Map<K,List<V>>`) are generated correctly.
    
    Fixes fabric8io#4357
    Fixes fabric8io#4487
    xRodney authored and manusa committed Oct 19, 2022
    Configuration menu
    Copy the full SHA
    0156d0f View commit details
    Browse the repository at this point in the history