I ran into the problem of a static variable that I use throughout my project (it contains some fields from the file). In some cases, a variable loses its value, not always. I read about the life cycle of a static variable that it loses value in three cases:
1) The class is unloaded.
2) The JVM is shutting down.
3) The process is dying.
So, I have a question: is it not enough to overwrite onResume actions and parse the file again and load the static variable again if it is null?
source
share