Menu

#169 SegmentFinder.findSegment() can't find PID2

None
closed-fixed
nobody
None
5
2012-12-27
2012-12-12
DiGiT
No

I am using SegmentFinder.findSegment() to find segments in a message no matter what groups (if any) the segments are in. This works fine for most segments I've tried (PID, SCH), but not for ones like PID2. getSegment() works for these.

I think the problem is that SegmentFinder.findStructure() compares Structure.getName() to the provided pattern, but getName() returns 'PID' for the 'PID2' segment so it will never match.

Discussion

  • James Agnew

    James Agnew - 2012-12-12

    Hi DiGiT,

    Thanks for the report!

    If possible, can you provide a sample message, code, etc. or anything which demonstrates the issue?

     
  • DiGiT

    DiGiT - 2012-12-13

    maven project demonstrating failure. run mvn test

     
  • DiGiT

    DiGiT - 2012-12-13

    Maven project attached. Just run 'mvn test'. Hope it helps

     
  • James Agnew

    James Agnew - 2012-12-27

    A fix has been checked in. Thanks!

     
  • James Agnew

    James Agnew - 2012-12-27
    • status: open --> closed-fixed
    • milestone: -->
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.