File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed
net.sourceforge.pmd.eclipse.plugin.test/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/br
net.sourceforge.pmd.eclipse.plugin/src/main/java/net/sourceforge/pmd/eclipse/ui/preferences/panelmanagers Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,12 @@ Eclipse Update Site:
1313
1414### Fixed Issues
1515
16+ * [ #70 ] ( https://github.com/pmd/pmd-eclipse-plugin/issues/70 ) : UnsupportedOperationException opening Rule Configuration
17+
1618### External Contributions
1719
20+ * [ #75 ] ( https://github.com/pmd/pmd-eclipse-plugin/pull/75 ) : Prevent UnsupportedOperationException #70
21+
1822
1923## 20-December-2018: 4.0.18.v20181220-1448
2024
Original file line number Diff line number Diff line change 1+ package net .sourceforge .pmd .eclipse .ui .preferences .br ;
2+
3+ import static org .junit .Assert .assertNotNull ;
4+
5+ import org .junit .Test ;
6+
7+ import net .sourceforge .pmd .Rule ;
8+ import net .sourceforge .pmd .eclipse .ui .IndexedString ;
9+ import net .sourceforge .pmd .lang .rule .XPathRule ;
10+
11+ public class RuleUIUtilTest {
12+
13+ /**
14+ * There should be no UnsupportedOperationException...
15+ */
16+ @ Test
17+ public void testTndexedPropertyStringFromRule () {
18+ Rule rule = new XPathRule ();
19+ IndexedString s = RuleUIUtil .indexedPropertyStringFrom (rule );
20+ assertNotNull (s );
21+ }
22+ }
Original file line number Diff line number Diff line change 11
22package net .sourceforge .pmd .eclipse .ui .preferences .panelmanagers ;
33
4+ import java .util .HashMap ;
45import java .util .Map ;
56
67import net .sourceforge .pmd .Rule ;
@@ -23,7 +24,7 @@ private Configuration() { }
2324
2425 public static Map <PropertyDescriptor <?>, Object > filteredPropertiesOf (PropertySource source ) {
2526
26- Map <PropertyDescriptor <?>, Object > valuesByProp = source .getPropertiesByPropertyDescriptor ();
27+ Map <PropertyDescriptor <?>, Object > valuesByProp = new HashMap <>( source .getPropertiesByPropertyDescriptor () );
2728
2829 for (PropertyDescriptor <?> excludedRuleProperty : EXCLUDED_RULE_PROPERTIES ) {
2930 valuesByProp .remove (excludedRuleProperty );
You can’t perform that action at this time.
0 commit comments