refactor: changing sootclass getname to getpathplusclassname #2022
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the SootClass class, the function getName() is not specific enough regarding what it is returning. I refactored the function name to getPathPlusClassName() as it is a better description of what the function is returning.
The motivation behind making this change is in certain areas Soot assumes getName() is returning the fully qualified name of the class, package name + the class name. However, in some applications that is not always the case. For instance, in a SpringBoot application, all the application classes are put into the directories
BOOT-INF/classes
. It is important to note, theBOOT-INF/classes
directories are not part of the class's package name. Which causes the path + class name to not equal the class's fully qualified name.This boils down to the file path of the class does not always equal the class's package name. According to the JDK 8 documentation, it states, "Many implementations of the Java platform rely on hierarchical file systems to manage source and class files, although The Java Language Specification does not require this."
This pull request is merely to refactor the SootClass function, getName(), to describe the information it is returning accurately.