Problem accessing a constant defined in another class
I have two classes
public class SearchAction
public class SpmlConstants
both in the same package.
In SearchAction, somewhere I have this line
In SpmlConstants I have
Note that I have misspelled TemplateSubsbriber.
public final static String TEMPLATE_SUBSCRIBER_ELEMENT = "TemplateSubsbriber";
I built both the class files and patched it on to my machine and ran the test case. The SPML generated by SearchAction obviously had the wrong String TemplateSubsbriber.
I realized my mistake and corrected the spelling in SpmlConstants.java to TemplateSubscriber, built and re-patched SpmlConstants class.
Still i get the same error. Then just to try my chances I patched SearchAction class also. Now it worked.
Could someone please explain why was it required to build SearchAction class also, even though the constant is defined in SpmlConstants and only a public static member of that class was used in SearchAction:confused: