Issue Details (XML | Word | Printable)

Key: SWINGX-1317
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: kleopatra
Reporter: Karl Schaefer
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

PatternPredicate causes exception with testColumn -1 (ALL)

Created: 29/Apr/10 11:20 AM   Updated: 28/Jan/11 12:54 PM   Resolved: 03/Nov/10 07:27 AM
Component/s: Renderer
Affects Version/s: 1.6.1
Fix Version/s: 1.6.3

Time Tracking:
Not Specified


Operating System: All
Platform: All

Issuezilla Id: 1,317
Participants: Karl Schaefer and kleopatra

 Description  « Hide

If we use new PatternPredicate(".e.", -1) in a JXTable we get an
IllegalArgumentException because the test column is not a valid column. We can
place a fix in PatternPredicate, but I don't believe that's the correct
location. I believe that ComponentAdapter should handle the -1 as part of its
contract. We should update ComponentAdapter and TableAdapter (the only
override) to ensure that we are correctly handling -1.

kleopatra added a comment - 30/Apr/10 04:04 AM

definitely a bug - but on the PatternPredicate side, IMO: ComponentAdapter is documented
(everywhere?) to only accept valid indices.

added failing test to HighlighterIssues


kleopatra added a comment - 30/Apr/10 04:10 AM

definition of "testColumn == All" is missing/fishy/pending: looks like it doesn't handle
the case at all


Karl Schaefer added a comment - 30/Apr/10 08:17 AM

Hmm, guess you're right. Just feels like another -1 == ALL will require
duplicate code. Oh well, that's probably better. Ensures that
ComponentAdapter is clean.

kleopatra added a comment - 03/Nov/10 07:19 AM

clarified contract:

  • both test- and decorateColumn are either a single value or ALL
  • in testColumn the ALL is actually a logic operator of how look for matches in several
    columns - principally that could be AND or OR. Decided for OR to be consistent with RowFilters.GeneralFilter
    which includes rows if any of the columns meet the include criterion
  • in decorateColumn the ALL means ... well ... all
  • implemented the match and highlight logic accordingly
  • added convenience contructors
  • add unit test in HighltPredicateTes
  • added visual test in HighlighterClientVisualCheck

kleopatra added a comment - 03/Nov/10 07:27 AM

error fixed

kenaiadmin made changes - 25/Jan/11 02:05 PM
Field Original Value New Value
issue.field.bugzillaimportkey 1317 85577
Karl Schaefer made changes - 28/Jan/11 12:54 PM
Affects Version/s 1.6.1 [ 13360 ]
Affects Version/s 1.6++ [ 13359 ]