-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement a robust mapping merger. #1
base: master
Are you sure you want to change the base?
Conversation
The mapping merger enriches a primary mapping with the information given by a secondary mapping. The resulting mapping is then filtered to avoid invalid mappings.
There were some occasions in which tree was null in setDstName. This is fixed by not using tree whenever it is null.
Some classes such as 1InterRecipient were still included in the mapping even though they had an invalid class name. This is now fixed by changing the predicate to accept / filter out a class mapping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
de manière générale:
- sympa le pattern visitor, on en a pas dans le projet, mais c'est cool quand c'est bien utilisé
- On utilise pas de printf dans le projet, mais les loggers de log4j
- les boucles foreach(collection) -> à remplacer par des streams (ce qui se rapproche au mieux du paradigme fonctionnel en java)
for (String srcName : entry.getValue()) { | ||
primaryMappingTree.removeClass(srcName); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
il faudrait une méthode removeAll(Collection) dans MemoryMappingTree pour éviter la complexité en O(n²)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je vois pas le O(n²), pour moi c'est du O(n) avec n
le nombre de classes dans le .jar
obfusqué. Et le removeAll
finirai par faire une boucle for
aussi non?
The mapping merger enriches a primary mapping with the information given by a secondary mapping.
The resulting mapping is then filtered to avoid invalid mappings.