[serilizer] fixed two bugs spotted by findbugs

- fixed GenericSyntacticSequencer
- didn't modify behaviour of GrammarConstraintProvider to avoid 
  regressions; I'd rather deprecate the GrammarConstraintProvider.

Signed-off-by: Moritz Eysholdt <moritz.eysholdt@itemis.de>
This commit is contained in:
Moritz Eysholdt 2015-06-10 15:54:07 +02:00
parent 7cfdafd988
commit 6aa392bf19
2 changed files with 2 additions and 2 deletions

View file

@ -1036,7 +1036,7 @@ public class GrammarConstraintProvider implements IGrammarConstraintProvider {
else
return isOptional ? null : INVALID;
} else
new ConstraintElement(context, getConstraintElementType(ele), ele);
return null; //new ConstraintElement(context, getConstraintElementType(ele), ele);
} else if (ele instanceof RuleCall) {
RuleCall rc = (RuleCall) ele;
if (GrammarUtil.isUnassignedEObjectRuleCall(rc)) {

View file

@ -33,7 +33,7 @@ public class GenericSyntacticSequencer extends AbstractSyntacticSequencer {
if (rule.getAlternatives() instanceof Alternatives)
for (AbstractElement ele : ((Alternatives) rule.getAlternatives()).getElements())
if (ele instanceof Keyword)
((Keyword) ele).getValue();
return ((Keyword) ele).getValue();
}
return "";
}