Ticket #3664 (new defect)

Opened 11 months ago

Last modified 3 months ago

regexp search spits weird errors on some expressions

Reported by: singularita@… Owned by: team
Priority: major Component: Core
Version: latest Keywords: javabug
Cc: jttt

Description

I searched for expression:

name:[ěš]

(name containing either "ě" or "š")

and I got error

The regex "(?:[]|ě|ě|š|š)" had a parse error at offset 15

I remember these expressions worked few hundred revisions ago, so I guess something in the search got broken

Case sensitive and regular expression checkboxes are ticked.

Attachments

Change History

Changed 3 months ago by stoecker

  • cc jttt added
  • keywords javabug added

Situation is this: We use CANON_EQ and it seems this converts different codes into this: (?:c1|c2), so ěš gets (?:ě|ě|š|š). Now the problem is, that the now empty [] is not removed correctly. This is clearly a bug in Java parsing code.

name:"(?:ě|š)" and name:"(?|[ěš]) fails for the same reason.

You can work around this only by adding something inside the [], so it wont get empty. Or you use name:"[(?|(ěš)]" (i.e. add the (?|...) inside the [] instead of outside as the CANON_EQ does.

@Jiri: Any comments to this topic? Should we report is as a bug to Java?

Changed 3 months ago by anonymous

But if it is java bug, how is it possible that it worked before?

Is CANON_EQ needed? If it was not used, can we either remove it or make it optional in preferences?

Changed 3 months ago by stoecker

We did not use CANON_EQ before :-)

CANON_EQ ensures, that different forms of UTF-8 representation are all found when searching. This is an important feature.

I suggest to use the above workaround (or add more characters inside the [], which have only a single UTF-8, so the brackets don't get empty).

Add/Change #3664 (regexp search spits weird errors on some expressions)

Author


E-mail address and user name can be saved in the Preferences.


Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change from team. Next status will be 'new'
Next status will be 'needinfo'The owner will change to singularita@gmail.com
as duplicate The resolution will be set to duplicate. Next status will be 'closed'The specified ticket will be cross-referenced with this ticket
The owner will change from team to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.