| Summary: | FQNPrefixMatcher uses "wrong" LastSegmentFinder | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Alexander Nittka <alex> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | sebastian.zarnekow |
| Version: | 2.0.0 | Flags: | sebastian.zarnekow:
indigo+
|
| Target Milestone: | SR1 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Alexander Nittka
Scheduled for SR1. A patch is very welcome ;-) Well, I can't decide what's actually wrong. Is it the tests using the wrong LastSegmentFinder. Is it the wrong default implementation of the LastSegmentFinder. Or is it my requirement that b should be a matching candidate for foo.bar.baz...
One option would be to rename DefaultLastSegmentFinder to something else (from some tests, I see what it is doing, but I can't quite understand why that should be the default behaviour) and use a different implementation instead. How about
public String getLastSegment(String fqn, char delimiter) {
try{
int index = fqn.lastIndexOf(delimiter)+1;
return fqn.substring(index);
}catch(Exception e){
}
return fqn;
}
or the implementation used in FQNPrefixMatcherTest
Pushed to master. Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |