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

Implement a robust mapping merger. #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

nelimee
Copy link

@nelimee nelimee commented Nov 2, 2022

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.

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.
@nelimee nelimee requested review from Natlink and jordanamr November 2, 2022 09:47
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.
Copy link

@Natlink Natlink left a 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)

Comment on lines +92 to +94
for (String srcName : entry.getValue()) {
primaryMappingTree.removeClass(srcName);
}
Copy link

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²)

Copy link
Author

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?

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.

2 participants