Error when try to import rule set
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 99
- Forks
- 42
- Avg merge
- 20h 19m
- Merged PRs (30d)
- 19
Description
Steps:
- Windows -> Preferences -> PMD -> Rule Configuration
- Check "Use global rule management"
- Delete all rules
- Click "Import rule set" button
- Browse and select file. (ERROR)
Log:
eclipse.buildId=4.6.3.M20170301-0400
java.version=1.8.0_121
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=es_EC
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -data file:/E:/jose/workspace_neon/ -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
org.eclipse.ui
Error
Tue May 30 16:34:03 COT 2017
Unhandled event loop exception
java.lang.IllegalArgumentException: Unable to exclude rules [EmptyCatchBlock]; perhaps the rule name is mispelled?
at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:465)
at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:405)
at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:357)
at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:212)
at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:207)
at net.sourceforge.pmd.RuleSetFactory.createRuleSets(RuleSetFactory.java:168)
at net.sourceforge.pmd.RuleSetFactory.createRuleSets(RuleSetFactory.java:152)
at net.sourceforge.pmd.eclipse.ui.preferences.RuleSetSelectionDialog.selectedRuleset(RuleSetSelectionDialog.java:430)
at net.sourceforge.pmd.eclipse.ui.preferences.RuleSetSelectionDialog.updateRuleTable(RuleSetSelectionDialog.java:388)
at net.sourceforge.pmd.eclipse.ui.preferences.RuleSetSelectionDialog.ruleSetChanged(RuleSetSelectionDialog.java:325)
at net.sourceforge.pmd.eclipse.ui.preferences.RuleSetSelectionDialog.access$3(RuleSetSelectionDialog.java:324)
at net.sourceforge.pmd.eclipse.ui.preferences.RuleSetSelectionDialog$5.widgetSelected(RuleSetSelectionDialog.java:284)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
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.jface.window.Window.runEventLoop(Window.java:818)
at org.eclipse.jface.window.Window.open(Window.java:794)
at net.sourceforge.pmd.eclipse.ui.preferences.br.RuleTableManager$7.widgetSelected(RuleTableManager.java:428)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
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.jface.window.Window.runEventLoop(Window.java:818)
at org.eclipse.jface.window.Window.open(Window.java:794)
at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.open(WorkbenchPreferenceDialog.java:211)
at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:63)
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$4(ActionContributionItem.java:397)
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 org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
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(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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)
at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Windows Preferences > PMD > Rule Configuration import flow after deleting all rules. Start with RuleSetSelectionDialog.selectedRuleset and updateRuleTable, then trace the RuleSetFactory exception for the EmptyCatchBlock exclusion. Done means selecting a rule-set file no longer raises the event-loop error and the imported rules appear in the table.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100