You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rm...@apache.org on 2022/05/30 03:02:44 UTC

[logging-chainsaw] 04/07: Applying from color panel works

This is an automated email from the ASF dual-hosted git repository.

rmiddleton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-chainsaw.git

commit 3cbda32ee1b6d61e359b910c1767be3d804fb6bb
Author: Robert Middleton <ro...@rm5248.com>
AuthorDate: Sun May 29 20:40:33 2022 -0400

    Applying from color panel works
---
 src/main/java/org/apache/log4j/chainsaw/color/ColorPanel.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/log4j/chainsaw/color/ColorPanel.java b/src/main/java/org/apache/log4j/chainsaw/color/ColorPanel.java
index 1965ac4..e6ab897 100644
--- a/src/main/java/org/apache/log4j/chainsaw/color/ColorPanel.java
+++ b/src/main/java/org/apache/log4j/chainsaw/color/ColorPanel.java
@@ -439,7 +439,8 @@ public class ColorPanel extends JPanel {
 
             //only update rules if there were no errors
             Map map = new HashMap();
-            map.put(ruleSet, rulesTableModel.rules());
+            List<ColorRule> newRules = new ArrayList<>(rulesTableModel.rules());
+            map.put(ruleSet, newRules);
             applyingColorizer.setRules(map);
 
         } else {
@@ -903,6 +904,7 @@ public class ColorPanel extends JPanel {
             Map map = colorizer.getRules();
             for (Object o1 : map.entrySet()) {
                 Map.Entry entry = (Map.Entry) o1;
+                logger.debug( "entry: {}", o1 );
                 //update ruleset list
                 if (entry.getKey().equals(currentRuleSet)) {
                     m_data.addAll( (List<ColorRule>)entry.getValue() );