Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error if a Regex is Entered Into a Non-Regex Text Filter #139

Closed
aroelke opened this issue Feb 6, 2023 · 0 comments
Closed

Error if a Regex is Entered Into a Non-Regex Text Filter #139

aroelke opened this issue Feb 6, 2023 · 0 comments
Labels

Comments

@aroelke
Copy link
Owner

aroelke commented Feb 6, 2023

[error] Exception in thread "AWT-EventQueue-0" java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence near index 23
[error] (?mi)((?:^|$|\W)\Q\Qmyr\E\E(?:^|$|\W))
[error]                        ^
[error]         at java.base/java.util.regex.Pattern.error(Pattern.java:2028)
[error]         at java.base/java.util.regex.Pattern.escape(Pattern.java:2619)
[error]         at java.base/java.util.regex.Pattern.atom(Pattern.java:2286)
[error]         at java.base/java.util.regex.Pattern.sequence(Pattern.java:2159)
[error]         at java.base/java.util.regex.Pattern.expr(Pattern.java:2069)
[error]         at java.base/java.util.regex.Pattern.group0(Pattern.java:3060)
[error]         at java.base/java.util.regex.Pattern.sequence(Pattern.java:2124)
[error]         at java.base/java.util.regex.Pattern.expr(Pattern.java:2069)
[error]         at java.base/java.util.regex.Pattern.compile(Pattern.java:1783)
[error]         at java.base/java.util.regex.Pattern.<init>(Pattern.java:1430)
[error]         at java.base/java.util.regex.Pattern.compile(Pattern.java:1069)
[error]         at scala.util.matching.Regex.<init>(Regex.scala:234)
[error]         at scala.collection.StringOps$.r$extension(StringOps.scala:857)
[error]         at editor.filter.leaf.TextFilter.matches(TextFilter.scala:98)
[error]         at editor.filter.leaf.TextFilter.testFace(TextFilter.scala:109)
[error]         at editor.filter.leaf.FilterLeaf.apply(FilterLeaf.scala:33)
[error]         at editor.filter.leaf.FilterLeaf.apply$(FilterLeaf.scala:17)
[error]         at editor.filter.leaf.TextFilter.apply(TextFilter.scala:90)
[error]         at editor.filter.leaf.TextFilter.apply(TextFilter.scala:90)
[error]         at editor.filter.FilterGroup$Mode.apply$$anonfun$1(FilterGroup.scala:21)
[error]         at scala.collection.IterableOnceOps.forall(IterableOnce.scala:577)
[error]         at scala.collection.IterableOnceOps.forall$(IterableOnce.scala:574)
[error]         at scala.collection.AbstractIterable.forall(Iterable.scala:926)
[error]         at editor.filter.FilterGroup$Mode$.$anon$superArg$1$1$$anonfun$1(FilterGroup.scala:26)
[error]         at editor.filter.FilterGroup$Mode.apply(FilterGroup.scala:21)
[error]         at editor.filter.FilterGroup.apply(FilterGroup.scala:54)
[error]         at editor.filter.FilterGroup.apply(FilterGroup.scala:54)
[error]         at scala.collection.immutable.Vector.filterImpl(Vector.scala:135)
[error]         at scala.collection.immutable.Vector.filterImpl(Vector.scala:113)
[error]         at scala.collection.StrictOptimizedIterableOps.filter(StrictOptimizedIterableOps.scala:218)
[error]         at scala.collection.StrictOptimizedIterableOps.filter$(StrictOptimizedIterableOps.scala:218)
[error]         at scala.collection.immutable.Vector.filter(Vector.scala:113)
[error]         at editor.collection.immutable.Inventory$.filter_$eq(Inventory.scala:69)
[error]         at editor.gui.MainFrame.$init$$$anonfun$55(MainFrame.scala:1118)
[error]         at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
[error]         at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
[error]         at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
[error]         at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
[error]         at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
[error]         at java.desktop/java.awt.Component.processMouseEvent(Component.java:6617)
[error]         at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
[error]         at java.desktop/java.awt.Component.processEvent(Component.java:6382)
[error]         at java.desktop/java.awt.Container.processEvent(Container.java:2264)
[error]         at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4993)
[error]         at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2322)
[error]         at java.desktop/java.awt.Component.dispatchEvent(Component.java:4825)
[error]         at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4934)
[error]         at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4563)
[error]         at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4504)
[error]         at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2308)
[error]         at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773)
[error]         at java.desktop/java.awt.Component.dispatchEvent(Component.java:4825)
[error]         at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
[error]         at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
[error]         at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
[error]         at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
[error]         at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85 
[error]         at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95 
[error]         at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
[error]         at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
[error]         at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
[error]         at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85 
[error]         at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
[error]         at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
[error]         at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
[error]         at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
[error]         at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
[error]         at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
[error]         at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

This shows up in the terminal, but doesn't cause any change, or apparent problems, in the UI. The filter is just not applied.

@aroelke aroelke added the bug label Feb 6, 2023
aroelke added a commit that referenced this issue Oct 23, 2023
Text Filter Regex Fix
Closes #139
@aroelke aroelke closed this as completed Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant