Hello,
while using the class org.restleut.util.Template I detect that the
variable-List (Template.getVariables()) is not updated while parsing the
given pattern. Is that planned, or is it a bug? I'm using the Restlet-Trunk.
If this should be changed, then we should consider, that the variables
are only available after parsing the regexPattern. This will be done on
first using ( match(.) or parse(..) ), but the variables should be
availabe after creation for updating, I think. Perhaps the method
getRegexPattern should be called in the constructor to ensure the
validaty of the variables.
I think that the same manner apply for the variableNames.
Another point:
I think that is not good, that the list of the variables ans the map of
the variableNamess are modifiable after retrieving it via the public
methods. But I am a student; on university you lerned this. Perhaps it
is in irrelevant in the daily praxis :-). When we start here than we
have to change this at a lot of points in the code, I suspect.
When it shoud be changed, than an internal private getter
getVariablesInternal() or something like that for modifiable returning
is needed.
Jerome: If it should be changed, I send you a ne version of the class.
best regards
Stephan