Project

General

Profile

bug #7724

PatternSyntaxException in GrantedAuthority search dialog

Added by Andreas Müller 12 months ago.

Status:
New
Priority:
New
Assignee:
Category:
taxeditor
Target version:
Start date:
09/05/2018
Due date:
% Done:

0%

Severity:
normal
Found in Version:

Description

See stacktrace. I looked at the code and wondered why first ALL GAs are loaded and then compared via regex. Is this still the way how we handle search dialogs. Or do we still use an old dialog here?
If we keep this code we need to mask the pattern in a way that it is save to run regex on it.

login : admin
editor version : 5.3.0.201809042248
server : test.e-taxonomy.eu (edit-test) / rem_conf_am
schema version : 5.0.0.0.20180514
os : Windows Server 2012 R2 6.3 amd64
java : 1.8.0_121
java.util.regex.PatternSyntaxException: Unclosed character class near index 29
TEAMORPERSONBASE.[CREATE, RE.*
                             ^
    at java.util.regex.Pattern.error(Pattern.java:1955)
    at java.util.regex.Pattern.clazz(Pattern.java:2548)
    at java.util.regex.Pattern.sequence(Pattern.java:2063)
    at java.util.regex.Pattern.expr(Pattern.java:1996)
    at java.util.regex.Pattern.compile(Pattern.java:1696)
    at java.util.regex.Pattern.<init>(Pattern.java:1351)
    at java.util.regex.Pattern.compile(Pattern.java:1028)
    at java.util.regex.Pattern.matches(Pattern.java:1133)
    at java.lang.String.matches(String.java:2121)
    at eu.etaxonomy.taxeditor.ui.dialog.selection.GrantedAuthoritySelectionDialog.callService(GrantedAuthoritySelectionDialog.java:64) (AM: line number updated after cleanup code)
    at eu.etaxonomy.taxeditor.ui.dialog.selection.AbstractFilteredCdmResourceSelectionDialog.search(AbstractFilteredCdmResourceSelectionDialog.java:568)
    at eu.etaxonomy.taxeditor.ui.dialog.selection.SearchDialog$2.modifyText(SearchDialog.java:171)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:180)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084)
    at org.eclipse.swt.widgets.Text.wmCommandChild(Text.java:3122)
    at org.eclipse.swt.widgets.Control.WM_COMMAND(Control.java:4947)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4802)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:5123)
    at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2446)
    at org.eclipse.swt.widgets.Text.callWindowProc(Text.java:262)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4897)
    at org.eclipse.swt.widgets.Text.windowProc(Text.java:2704)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110)
    at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2552)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3822)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
    at org.eclipse.jface.window.Window.open(Window.java:794)
    at eu.etaxonomy.taxeditor.ui.dialog.selection.AbstractFilteredCdmResourceSelectionDialog.getUuidAndTitleCacheSelectionFromDialog(AbstractFilteredCdmResourceSelectionDialog.java:161)
    at eu.etaxonomy.taxeditor.ui.dialog.selection.AbstractFilteredCdmResourceSelectionDialog.getSelectionFromDialog(AbstractFilteredCdmResourceSelectionDialog.java:142)
    at eu.etaxonomy.taxeditor.ui.dialog.selection.GrantedAuthoritySelectionDialog.select(GrantedAuthoritySelectionDialog.java:40)
    at eu.etaxonomy.taxeditor.ui.section.grantedAuthority.GrantedAuthorityDetailSection.createNewElement(GrantedAuthorityDetailSection.java:86)
    at eu.etaxonomy.taxeditor.ui.section.grantedAuthority.GrantedAuthorityDetailSection.createNewElement(GrantedAuthorityDetailSection.java:1)
    at eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection$2.run(AbstractEntityCollectionSection.java:95)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)
    at org.eclipse.jface.action.ActionContributionItem.lambda$5(ActionContributionItem.java:436)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
    at eu.etaxonomy.taxeditor.Application.start(Application.java:24)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1519)

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)