Closed beckchr closed 12 years ago
[Issue migrated from SourceForge | ID: 3495100 | Submitted by 'martinkoci'] [http://sourceforge.net/support/tracker.php?aid=3495100]
Create HashMap in ELContext lazily, not directly in field.
Index: ELContext.java
--- ELContext.java(revision 227)
+++ ELContext.java(working copy)
@@ -42,7 +42,7 @@
ELContext instance between two or more threads.
*/
public abstract class ELContext {
-private final Map<Class<?>, Object> context = new HashMap<Class<?>, Object>();
+private Map<Class<?>, Object> context;
private Locale locale;
private boolean resolved;
@@ -63,6 +63,9 @@
if key is null.
public Object getContext(Class<?> key) {
return null;
}
if (key == null) {
throw new NullPointerException("key is null");
@@ -134,6 +137,9 @@
if key is null or contextObject is null.
public void putContext(Class<?> key, Object contextObject) {
this.context = new HashMap<Class<?>, Object>();
[Comment migrated from SourceForge | Submitted by 'beckchr']
Applied changes to ELContext in trunk, will be in 2.2.5.
[Issue migrated from SourceForge | ID: 3495100 | Submitted by 'martinkoci'] [http://sourceforge.net/support/tracker.php?aid=3495100]
Create HashMap in ELContext lazily, not directly in field.
Index: ELContext.java
--- ELContext.java(revision 227)
+++ ELContext.java(working copy)
@@ -42,7 +42,7 @@
ELContext instance between two or more threads.
*/
public abstract class ELContext {
-private final Map<Class<?>, Object> context = new HashMap<Class<?>, Object>();
+private Map<Class<?>, Object> context;
private Locale locale;
private boolean resolved;
@@ -63,6 +63,9 @@
*/
public Object getContext(Class<?> key) {
}
if (key == null) {
throw new NullPointerException("key is null");
}
@@ -134,6 +137,9 @@
*/
public void putContext(Class<?> key, Object contextObject) {
}
if (key == null) {
throw new NullPointerException("key is null");
}