Skip to content

Commit

Permalink
Cleaner way to do the same thing
Browse files Browse the repository at this point in the history
  • Loading branch information
alf committed Aug 30, 2012
1 parent 7f8eef7 commit a971fe7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/cz/cuni/mff/d3s/deeco/processor/ParserHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import cz.cuni.mff.d3s.deeco.exceptions.ComponentEnsembleParseException;
import cz.cuni.mff.d3s.deeco.invokable.AnnotationHelper;
import cz.cuni.mff.d3s.deeco.invokable.Parameter;
import cz.cuni.mff.d3s.deeco.knowledge.KPBuilder;
import cz.cuni.mff.d3s.deeco.path.grammar.KnowledgePath;
import cz.cuni.mff.d3s.deeco.path.grammar.ParseException;

Expand Down Expand Up @@ -60,9 +61,7 @@ private static Parameter parseNamedAnnotation(Annotation annotation,
String path = (String) AnnotationHelper.getAnnotationValue(annotation);

// Adding prefix (the Component name which holds the "root") to path from annotations
if (root != null && !root.equals("")) {
path = root + '.' + path;
}
path = KPBuilder.prependToRoot(path, root);

KnowledgePath kPath = new KnowledgePath(path);

Expand Down

0 comments on commit a971fe7

Please sign in to comment.