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

refactor: changing sootclass getname to getpathplusclassname #2022

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jkraft-pjr
Copy link

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, the BOOT-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.

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.

1 participant