Community
Participate
Working Groups
What steps will reproduce the problem? 1. Trying to import ruleset using Window > Preferences > PMD > Rules Configuration > Import Ruleset Rules file: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <ruleset xmlns="http://pmd.sf.net/ruleset/1.0.0" name="pmd-rules" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd" xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"> <description>PMD Rules</description> <rule ref="rulesets/basic.xml/EmptyCatchBlock"/> <rule ref="rulesets/basic.xml/EmptyIfStmt"/> <rule ref="rulesets/basic.xml/EmptyWhileStmt"/> <rule ref="rulesets/basic.xml/EmptyTryBlock"/> <rule ref="rulesets/basic.xml/EmptyFinallyBlock"/> <rule ref="rulesets/basic.xml/EmptySwitchStatements"/> <rule ref="rulesets/basic.xml/JumbledIncrementer"/> <rule ref="rulesets/basic.xml/ForLoopShouldBeWhileLoop"/> <rule ref="rulesets/basic.xml/UnnecessaryConversionTemporary"/> <rule ref="rulesets/basic.xml/OverrideBothEqualsAndHashcode"/> <rule ref="rulesets/basic.xml/DoubleCheckedLocking"/> <rule ref="rulesets/basic.xml/ReturnFromFinallyBlock"/> <rule ref="rulesets/basic.xml/EmptySynchronizedBlock"/> <rule ref="rulesets/basic.xml/UnnecessaryReturn"/> <rule ref="rulesets/basic.xml/EmptyStaticInitializer"/> <rule ref="rulesets/basic.xml/UnconditionalIfStatement"/> <rule ref="rulesets/basic.xml/EmptyStatementNotInLoop"/> <rule ref="rulesets/basic.xml/BooleanInstantiation"/> <rule ref="rulesets/basic.xml/UnnecessaryFinalModifier"/> <rule ref="rulesets/basic.xml/CollapsibleIfStatements"/> <rule ref="rulesets/basic.xml/UselessOverridingMethod"/> <rule ref="rulesets/basic.xml/ClassCastExceptionWithToArray"/> <rule ref="rulesets/basic.xml/AvoidDecimalLiteralsInBigDecimalConstructor"/> <rule ref="rulesets/basic.xml/UselessOperationOnImmutable"/> <rule ref="rulesets/basic.xml/MisplacedNullCheck"/> <rule ref="rulesets/basic.xml/UnusedNullCheckInEquals"/> <rule ref="rulesets/basic.xml/AvoidThreadGroup"/> <rule ref="rulesets/basic.xml/BrokenNullCheck"/> <rule ref="rulesets/basic.xml/BigIntegerInstantiation"/> <rule ref="rulesets/basic.xml/AvoidUsingOctalValues"/> <rule ref="rulesets/basic.xml/AvoidUsingHardCodedIP"/> <rule ref="rulesets/basic.xml/CheckResultSet"/> <rule ref="rulesets/basic.xml/AvoidMultipleUnaryOperators"/> <rule ref="rulesets/basic.xml/EmptyInitializer"/> <rule ref="rulesets/codesize.xml/NPathComplexity"/> <rule ref="rulesets/codesize.xml/ExcessiveMethodLength"/> <rule ref="rulesets/codesize.xml/ExcessiveParameterList"/> <rule ref="rulesets/codesize.xml/ExcessiveClassLength"/> <rule ref="rulesets/codesize.xml/CyclomaticComplexity"/> <rule ref="rulesets/codesize.xml/ExcessivePublicCount"/> <rule ref="rulesets/codesize.xml/NcssMethodCount"/> <rule ref="rulesets/codesize.xml/NcssTypeCount"/> <rule ref="rulesets/codesize.xml/NcssConstructorCount"/> <rule ref="rulesets/imports.xml/DuplicateImports"/> <rule ref="rulesets/imports.xml/DontImportJavaLang"/> <rule ref="rulesets/imports.xml/UnusedImports"/> <rule ref="rulesets/imports.xml/ImportFromSamePackage"/> <rule ref="rulesets/finalizers.xml/EmptyFinalizer"/> <rule ref="rulesets/finalizers.xml/FinalizeOnlyCallsSuperFinalize"/> <rule ref="rulesets/finalizers.xml/FinalizeOverloaded"/> <rule ref="rulesets/finalizers.xml/FinalizeDoesNotCallSuperFinalize"/> <rule ref="rulesets/finalizers.xml/FinalizeShouldBeProtected"/> <rule ref="rulesets/finalizers.xml/AvoidCallingFinalize"/> <rule ref="rulesets/clone.xml/ProperCloneImplementation"/> <rule ref="rulesets/clone.xml/CloneThrowsCloneNotSupportedException"/> <rule ref="rulesets/clone.xml/CloneMethodMustImplementCloneable"/> <rule ref="rulesets/strings.xml/StringInstantiation"/> <rule ref="rulesets/strings.xml/StringToString"/> <rule ref="rulesets/strings.xml/InefficientStringBuffering"/> <rule ref="rulesets/strings.xml/UnnecessaryCaseChange"/> <rule ref="rulesets/strings.xml/UseStringBufferLength"/> <rule ref="rulesets/strings.xml/AppendCharacterWithChar"/> <rule ref="rulesets/strings.xml/ConsecutiveLiteralAppends"/> <rule ref="rulesets/strings.xml/UseIndexOfChar"/> <rule ref="rulesets/strings.xml/InefficientEmptyStringCheck"/> <rule ref="rulesets/strings.xml/InsufficientStringBufferDeclaration"/> <rule ref="rulesets/strings.xml/UselessStringValueOf"/> <rule ref="rulesets/strings.xml/StringBufferInstantiationWithChar"/> <rule ref="rulesets/strings.xml/UseEqualsToCompareStrings"/> <rule ref="rulesets/strings.xml/AvoidStringBufferField"/> <rule ref="rulesets/coupling.xml/CouplingBetweenObjects"/> <rule ref="rulesets/coupling.xml/LooseCoupling"/> <rule ref="rulesets/design.xml/UseSingleton"/> <rule ref="rulesets/design.xml/SimplifyBooleanReturns"/> <rule ref="rulesets/design.xml/SimplifyBooleanExpressions"/> <rule ref="rulesets/design.xml/SwitchStmtsShouldHaveDefault"/> <rule ref="rulesets/design.xml/AvoidDeeplyNestedIfStmts"/> <rule ref="rulesets/design.xml/AvoidReassigningParameters"/> <rule ref="rulesets/design.xml/SwitchDensity"/> <rule ref="rulesets/design.xml/AccessorClassGeneration"/> <rule ref="rulesets/design.xml/FinalFieldCouldBeStatic"/> <rule ref="rulesets/design.xml/CloseResource"/> <rule ref="rulesets/design.xml/NonStaticInitializer"/> <rule ref="rulesets/design.xml/DefaultLabelNotLastInSwitchStmt"/> <rule ref="rulesets/design.xml/NonCaseLabelInSwitchStatement"/> <rule ref="rulesets/design.xml/OptimizableToArrayCall"/> <rule ref="rulesets/design.xml/BadComparison"/> <rule ref="rulesets/design.xml/EqualsNull"/> <rule ref="rulesets/design.xml/ConfusingTernary"/> <rule ref="rulesets/design.xml/InstantiationToGetClass"/> <rule ref="rulesets/design.xml/IdempotentOperations"/> <rule ref="rulesets/design.xml/SimpleDateFormatNeedsLocale"/> <rule ref="rulesets/design.xml/ImmutableField"/> <rule ref="rulesets/design.xml/UseLocaleWithCaseConversions"/> <rule ref="rulesets/design.xml/AvoidProtectedFieldInFinalClass"/> <rule ref="rulesets/design.xml/AssignmentToNonFinalStatic"/> <rule ref="rulesets/design.xml/MissingStaticMethodInNonInstantiatableClass"/> <rule ref="rulesets/design.xml/AvoidSynchronizedAtMethodLevel"/> <rule ref="rulesets/design.xml/MissingBreakInSwitch"/> <rule ref="rulesets/design.xml/UseNotifyAllInsteadOfNotify"/> <rule ref="rulesets/design.xml/AvoidInstanceofChecksInCatchClause"/> <rule ref="rulesets/design.xml/SimplifyConditional"/> <rule ref="rulesets/design.xml/CompareObjectsWithEquals"/> <rule ref="rulesets/design.xml/PositionLiteralsFirstInComparisons"/> <rule ref="rulesets/design.xml/NonThreadSafeSingleton"/> <rule ref="rulesets/design.xml/UncommentedEmptyMethod"/> <rule ref="rulesets/design.xml/UncommentedEmptyConstructor"/> <rule ref="rulesets/design.xml/AvoidConstantsInterface"/> <rule ref="rulesets/design.xml/UnsynchronizedStaticDateFormatter"/> <rule ref="rulesets/design.xml/PreserveStackTrace"/> <rule ref="rulesets/design.xml/UseCollectionIsEmpty"/> <rule ref="rulesets/design.xml/ClassWithOnlyPrivateConstructorsShouldBeFinal"/> <rule ref="rulesets/design.xml/EmptyMethodInAbstractClassShouldBeAbstract"/> <rule ref="rulesets/design.xml/SingularField"/> <rule ref="rulesets/design.xml/ReturnEmptyArrayRatherThanNull"/> <rule ref="rulesets/design.xml/AbstractClassWithoutAnyMethod"/> <rule ref="rulesets/design.xml/TooFewBranchesForASwitchStatement"/> <rule ref="rulesets/naming.xml/ShortMethodName"/> <rule ref="rulesets/naming.xml/VariableNamingConventions"/> <rule ref="rulesets/naming.xml/MethodNamingConventions"/> <rule ref="rulesets/naming.xml/ClassNamingConventions"/> <rule ref="rulesets/naming.xml/AvoidDollarSigns"/> <rule ref="rulesets/naming.xml/MethodWithSameNameAsEnclosingClass"/> <rule ref="rulesets/naming.xml/SuspiciousHashcodeMethodName"/> <rule ref="rulesets/naming.xml/SuspiciousConstantFieldName"/> <rule ref="rulesets/naming.xml/SuspiciousEqualsMethodName"/> <rule ref="rulesets/naming.xml/AvoidFieldNameMatchingTypeName"/> <rule ref="rulesets/naming.xml/AvoidFieldNameMatchingMethodName"/> <rule ref="rulesets/naming.xml/NoPackage"/> <rule ref="rulesets/naming.xml/PackageCase"/> <rule ref="rulesets/naming.xml/MisleadingVariableName"/> <rule ref="rulesets/naming.xml/BooleanGetMethodName"/> <rule ref="rulesets/optimizations.xml/MethodArgumentCouldBeFinal"/> <rule ref="rulesets/optimizations.xml/UseArrayListInsteadOfVector"/> <rule ref="rulesets/optimizations.xml/SimplifyStartsWith"/> <rule ref="rulesets/optimizations.xml/UseStringBufferForStringAppends"/> <rule ref="rulesets/optimizations.xml/UseArraysAsList"/> <rule ref="rulesets/optimizations.xml/AvoidArrayLoops"/> <rule ref="rulesets/optimizations.xml/UnnecessaryWrapperObjectCreation"/> <rule ref="rulesets/optimizations.xml/AddEmptyString"/> <rule ref="rulesets/typeresolution.xml/LooseCoupling"/> <rule ref="rulesets/typeresolution.xml/CloneMethodMustImplementCloneable"/> <rule ref="rulesets/typeresolution.xml/SignatureDeclareThrowsException"/> <rule ref="rulesets/unusedcode.xml/UnusedPrivateField"/> <rule ref="rulesets/unusedcode.xml/UnusedLocalVariable"/> <rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod"/> <rule ref="rulesets/unusedcode.xml/UnusedFormalParameter"/> <rule ref="rulesets/strictexception.xml/AvoidCatchingThrowable"/> <rule ref="rulesets/strictexception.xml/SignatureDeclareThrowsException"/> <rule ref="rulesets/strictexception.xml/ExceptionAsFlowControl"/> <rule ref="rulesets/strictexception.xml/AvoidCatchingNPE"/> <rule ref="rulesets/strictexception.xml/AvoidThrowingRawExceptionTypes"/> <rule ref="rulesets/strictexception.xml/AvoidThrowingNullPointerException"/> <rule ref="rulesets/strictexception.xml/AvoidRethrowingException"/> <rule ref="rulesets/strictexception.xml/DoNotExtendJavaLangError"/> <rule ref="rulesets/strictexception.xml/DoNotThrowExceptionInFinally"/> <rule ref="rulesets/strictexception.xml/AvoidThrowingNewInstanceOfSameException"/> <rule ref="rulesets/junit.xml/JUnitStaticSuite"/> <rule ref="rulesets/junit.xml/JUnitSpelling"/> <rule ref="rulesets/junit.xml/JUnitTestsShouldIncludeAssert"/> <rule ref="rulesets/junit.xml/TestClassWithoutTestCases"/> <rule ref="rulesets/junit.xml/UnnecessaryBooleanAssertion"/> <rule ref="rulesets/junit.xml/UseAssertEqualsInsteadOfAssertTrue"/> <rule ref="rulesets/junit.xml/UseAssertSameInsteadOfAssertTrue"/> <rule ref="rulesets/junit.xml/UseAssertNullInsteadOfAssertTrue"/> <rule ref="rulesets/junit.xml/SimplifyBooleanAssertion"/> <rule ref="rulesets/j2ee.xml/UseProperClassLoader"/> <rule ref="rulesets/j2ee.xml/MDBAndSessionBeanNamingConvention"/> <rule ref="rulesets/j2ee.xml/RemoteSessionInterfaceNamingConvention"/> <rule ref="rulesets/j2ee.xml/LocalInterfaceSessionNamingConvention"/> <rule ref="rulesets/j2ee.xml/LocalHomeNamingConvention"/> <rule ref="rulesets/j2ee.xml/RemoteInterfaceNamingConvention"/> <rule ref="rulesets/j2ee.xml/DoNotCallSystemExit"/> <rule ref="rulesets/j2ee.xml/StaticEJBFieldShouldBeFinal"/> <rule ref="rulesets/j2ee.xml/DoNotUseThreads"/> <rule ref="rulesets/migrating.xml/ReplaceVectorWithList"/> <rule ref="rulesets/migrating.xml/ReplaceHashtableWithMap"/> <rule ref="rulesets/migrating.xml/ReplaceEnumerationWithIterator"/> <rule ref="rulesets/migrating.xml/AvoidEnumAsIdentifier"/> <rule ref="rulesets/migrating.xml/AvoidAssertAsIdentifier"/> <rule ref="rulesets/migrating.xml/IntegerInstantiation"/> <rule ref="rulesets/migrating.xml/ByteInstantiation"/> <rule ref="rulesets/migrating.xml/ShortInstantiation"/> <rule ref="rulesets/migrating.xml/LongInstantiation"/> <rule ref="rulesets/migrating.xml/JUnit4TestShouldUseBeforeAnnotation"/> <rule ref="rulesets/migrating.xml/JUnit4TestShouldUseAfterAnnotation"/> <rule ref="rulesets/migrating.xml/JUnit4TestShouldUseTestAnnotation"/> <rule ref="rulesets/migrating.xml/JUnit4SuitesShouldUseSuiteAnnotation"/> <rule ref="rulesets/migrating.xml/JUnitUseExpected"/> </ruleset> -- Error Details -- Date: Wed Sep 28 13:41:16 EDT 2011 Message: Unhandled event loop exception Severity: Error Product: Eclipse 1.4.1.20110909-0613 (org.eclipse.epp.package.jee.product) Plugin: org.eclipse.ui Session Data: eclipse.buildId=M20110909-1335 java.version=1.6.0_27 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US Framework arguments: -product org.eclipse.epp.package.jee.product Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product Exception Stack Trace: java.lang.IllegalArgumentException: Unable to find rule EmptyInitializer; perhaps the rule name is mispelled? at net.sourceforge.pmd.RuleSetFactory.parseRuleReferenceNode(RuleSetFactory.java:368) at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:255) at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:209) at net.sourceforge.pmd.RuleSetFactory.createSingleRuleSet(RuleSetFactory.java:135) at net.sourceforge.pmd.RuleSetFactory.createRuleSets(RuleSetFactory.java:85) at net.sourceforge.pmd.RuleSetFactory.createRuleSets(RuleSetFactory.java:70) at net.sourceforge.pmd.ui.preferences.RuleSetSelectionDialog.okPressed(RuleSetSelectionDialog.java:248) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:472) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at net.sourceforge.pmd.ui.preferences.PMDPreferencePage$6.widgetSelected(PMDPreferencePage.java:548) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.open(WorkbenchPreferenceDialog.java:215) at org.eclipse.ui.internal.handlers.ShowPreferencePageHandler.execute(ShowPreferencePageHandler.java:54) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241) at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 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:622) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) at org.eclipse.equinox.launcher.Main.run(Main.java:1410) at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
please submit a bug report to PMD project at sourceforge.