@@ -88,7 +88,6 @@ public TemplateRegistry(TemplateRegistry registry) {
8888 }
8989 chain = createTemplateBuilderChain ();
9090 cache = new HashMap <Type , Template <Type >>();
91- //genericCache = parent.genericCache;
9291 genericCache = new HashMap <Type , GenericTemplate >();
9392 registerTemplatesWhichRefersRegistry ();
9493 }
@@ -103,7 +102,6 @@ public void setClassLoader(final ClassLoader cl) {
103102 }
104103
105104 private void registerTemplates () {
106-
107105 register (boolean .class , BooleanTemplate .getInstance ());
108106 register (Boolean .class , BooleanTemplate .getInstance ());
109107 register (byte .class , ByteTemplate .getInstance ());
@@ -136,14 +134,12 @@ private void registerTemplates() {
136134
137135 }
138136
139-
140137 protected void registerTemplatesWhichRefersRegistry () {
141138 AnyTemplate anyTemplate = new AnyTemplate (this );
142139
143- register (List .class , new ListTemplate (anyTemplate ));//new ListTemplate(AnyTemplate.getInstance(this)));
144- register (Collection .class ,new CollectionTemplate (anyTemplate ));//new CollectionTemplate(AnyTemplate.getInstance(this)));
145- register (Map .class ,new MapTemplate (anyTemplate ,anyTemplate ));//new MapTemplate(AnyTemplate.getInstance(this), AnyTemplate.getInstance(this)));
146-
140+ register (List .class , new ListTemplate (anyTemplate ));
141+ register (Collection .class , new CollectionTemplate (anyTemplate ));
142+ register (Map .class , new MapTemplate (anyTemplate ,anyTemplate ));
147143 registerGeneric (List .class , new GenericCollectionTemplate (this , ListTemplate .class ));
148144 registerGeneric (Collection .class , new GenericCollectionTemplate (this , CollectionTemplate .class ));
149145 registerGeneric (Map .class , new GenericMapTemplate (this , MapTemplate .class ));
0 commit comments