[LOGBack-dev] svn commit: r293 - logback/core/trunk/src/main/java/ch/qos/logback/core/joran/spi

noreply.seb at qos.ch noreply.seb at qos.ch
Tue Jul 25 15:00:31 CEST 2006


Author: seb
Date: Tue Jul 25 15:00:30 2006
New Revision: 293

Modified:
   logback/core/trunk/src/main/java/ch/qos/logback/core/joran/spi/SimpleRuleStore.java
Log:
Type Safety

Modified: logback/core/trunk/src/main/java/ch/qos/logback/core/joran/spi/SimpleRuleStore.java
==============================================================================
--- logback/core/trunk/src/main/java/ch/qos/logback/core/joran/spi/SimpleRuleStore.java	(original)
+++ logback/core/trunk/src/main/java/ch/qos/logback/core/joran/spi/SimpleRuleStore.java	Tue Jul 25 15:00:30 2006
@@ -25,7 +25,7 @@
 public class SimpleRuleStore extends ContextAwareBase implements RuleStore {
 
   // key: Pattern instance, value: ArrayList containing actions
-  HashMap rules = new HashMap();
+  HashMap<Pattern, List<Action>> rules = new HashMap<Pattern, List<Action>>();
   
 //  public SimpleRuleStore() {
 //  }
@@ -43,10 +43,10 @@
   public void addRule(Pattern pattern, Action action) {
     action.setContext(context);
     
-    List a4p = (List) rules.get(pattern);
+    List<Action> a4p = rules.get(pattern);
 
     if (a4p == null) {
-      a4p = new ArrayList();
+      a4p = new ArrayList<Action>();
       rules.put(pattern, a4p);
     }
 



More information about the logback-dev mailing list