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
Android Java: Add some final #13700
Android Java: Add some final #13700
Conversation
there is c++ stuff edit: there is so much warnings about overriden method not marked idk c++ |
XD i just added final to constructor |
I myself am not sure about this approach (marking a lot of things as The code does compile and work, though. |
if its did not got overriden or reasigned, then i think its should have final idk if the final will protect it from memory editing or not and i think c++ code should have that too? idk c/c++ |
Android APKs need to be signed before they can be installed, which both confirms its integrity and prevents tampering without having to resign. If you don't have the original key then you will need to sign with another one, which the Android system will reject if you already have the app installed with the original key. I don't see how slapping |
usually i just re-sign it with testkey the final and private can make hacking the app much harder and time consump but Minetest are FOSS anyway so i really dont think of any use cases for this... even for file malformed when transfering are unlikely cuz apk are compressed + signed + checksum i'll wait for the core dev decide... |
UPDATE: based on this webpage: https://www.baeldung.com/java-final-performance final seems to improve performance |
low priority ._. |
I'd say this would be worth doing if it fixes linter warnings. |
priorities ;P , anyway it could be a good idea to have a a easier to read description of what this PR does , maybe "add the final keyword to android specific javascript functions in order to try and harden the code against malicious activity " |
it's Java, not JavaScript. JavaScript don't have final but have const |
Add compact, short information about your PR for easier understanding:
add final to harden the code (its not affect mods and games, but make Minetest harder to be malicious)
add final, not even tested sorry
not yet checked
probally not
(cybersecurity-ly) harden the code, slightly improve performance
To do
This PR is Ready for Review.
How to test