Let's say I have a class like this:
class ApplicationDefs{
public static final String configOption1 = "some option";
public static final String configOption2 = "some other option";
public static final String configOption3 = "yet another option";
}
Many of the other classes in my application are using these options. Now, I want to change one of the options alone and deploy just the compiled class. But if these fields are in-lined in the consumer classes this becomes impossible right?
Is there any option to disable the in-lining of compile time constants?
aString.toString()
returnsaString
itself, not a new one, so it is as valid asintern()
for the purpose of this question. A fresh String copy would be created by the rarely used constructornew String(aString)
. – Inessential