mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
Simplifies when map should be unmodifiable
This commit is contained in:
@@ -69,7 +69,7 @@ public class ResultTypeConfig extends Located implements Serializable {
|
||||
}
|
||||
|
||||
public Map<String,String> getParams() {
|
||||
return this.params;
|
||||
return Collections.unmodifiableMap(this.params);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -148,14 +148,9 @@ public class ResultTypeConfig extends Located implements Serializable {
|
||||
}
|
||||
|
||||
public ResultTypeConfig build() {
|
||||
embalmTarget();
|
||||
ResultTypeConfig result = target;
|
||||
target = new ResultTypeConfig(target);
|
||||
return result;
|
||||
}
|
||||
|
||||
protected void embalmTarget() {
|
||||
target.params = Collections.unmodifiableMap(target.params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user