Menu

#71 Preprocessor yields syntax error

open
nobody
None
5
2008-09-30
2008-09-30
Sulthan
No

Hi,

I have just discovered an issue...
I need to parse texts which contain patterns in form "${VARIABLE}". I need to substitute this patterns by some predefined values.
The actual substitution code is not important but if I try to preprocess this code:

public static String resolvePatterns(String text) {
final String PATTERN_START = "${";
final String PATTERN_END = "}";

//substitution code
}

...I get "Syntax error in property". I looked into the preprocessor manual and I could not find any reason why this should happen. The preprocessor in NB has no problems.

Tested on versions 1.0.0 and 1.1.0-beta.

Workaround:
final String PATTERN_START = "$" + "{";

Discussion