This might be due to the optimization level. What if you compile as -draft or -optimize 0?
-- FWIW, GWT tends to get system props in static initialization of constants, passing string literals as argument. I.e.
static final String PROP_VALUE = System.getProperty("myProperty");
On Thursday, August 4, 2016 at 9:35:05 PM UTC+2, clou...@gmail.com wrote:
On Thursday, August 4, 2016 at 9:35:05 PM UTC+2, clou...@gmail.com wrote:
Hi there,
Pretty simple example, but seems like possibly a bug or oddity in GWT 2.8b1 between the command line and the Eclipse plug in.
Setup: In a Module.gwt.xml file we define a property like so:
<define-property values="true,false" name="myProperty" />
<set-property name="myProperty" value="false" />
In a class we use it like so (paraphrased):
public class MyClass {
public static final String STR_PROP = "myProperty";
<SNIPS>
public void foo() {
String propValue = System.getProperty(STR_PROP);
....
}
}
Behavior difference!
- When we compile this on our command line, there is no error.
- When we run thru SDM, the following error pops up: [ERROR] Line 37: Only string constants may be used as property name in System.getProperty()
Does SDM just have an issue with the String constant used whereas the compiler itself does not? Bug? Intended? Suggestions? Thanks!
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment