Skip to content

Commit

Permalink
WW-4321 Adds missing location property during copy
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszlenart committed Apr 11, 2014
1 parent 3414c1b commit 96156df
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ protected ActionConfig(ActionConfig orig) {
this.results = new LinkedHashMap<String,ResultConfig>(orig.results);
this.exceptionMappings = new ArrayList<ExceptionMappingConfig>(orig.exceptionMappings);
this.allowedMethods = new HashSet<String>(orig.allowedMethods);
this.location = orig.location;
}

public String getName() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ protected ExceptionMappingConfig(ExceptionMappingConfig target) {
this.exceptionClassName = target.exceptionClassName;
this.result = target.result;
this.params = new LinkedHashMap<String,String>(target.params);
this.location = target.location;
}

public String getName() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ protected InterceptorConfig(InterceptorConfig orig) {
this.name = orig.name;
this.className = orig.className;
this.params = new LinkedHashMap<String,String>(orig.params);
this.location = orig.location;
}

public String getClassName() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ protected InterceptorStackConfig() {
protected InterceptorStackConfig(InterceptorStackConfig orig) {
this.name = orig.name;
this.interceptors = new ArrayList<InterceptorMapping>(orig.interceptors);
this.location = orig.location;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ protected PackageConfig(PackageConfig orig) {
this.resultTypeConfigs = new LinkedHashMap<String, ResultTypeConfig>(orig.resultTypeConfigs);
this.globalExceptionMappingConfigs = new ArrayList<ExceptionMappingConfig>(orig.globalExceptionMappingConfigs);
this.parents = new ArrayList<PackageConfig>(orig.parents);
this.location = orig.location;
}

public boolean isAbstract() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ protected ResultConfig(ResultConfig orig) {
this.params = orig.params;
this.name = orig.name;
this.className = orig.className;
this.location = orig.location;
}

public String getClassName() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ protected ResultTypeConfig(ResultTypeConfig orig) {
this.className = orig.className;
this.defaultResultParam = orig.defaultResultParam;
this.params = orig.params;
this.location = orig.location;
}

public void setDefaultResultParam(String defaultResultParam) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@
*/
package com.opensymphony.xwork2.config.entities;

public class UnknownHandlerConfig {
import com.opensymphony.xwork2.util.location.Located;
import com.opensymphony.xwork2.util.location.Location;

public class UnknownHandlerConfig extends Located {

private String name;

public UnknownHandlerConfig(String name) {
public UnknownHandlerConfig(String name, Location location) {
this.name = name;
this.location = location;
}

public String getName() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ public void register(ContainerBuilder containerBuilder, LocatableProperties prop

for (int k = 0; k < unknownHandlersSize; k++) {
Element unknownHandler = (Element) unknownHandlers.item(k);
unknownHandlerStack.add(new UnknownHandlerConfig(unknownHandler.getAttribute("name")));
Location location = LocationUtils.getLocation(unknownHandler);
unknownHandlerStack.add(new UnknownHandlerConfig(unknownHandler.getAttribute("name"), location));
}

if (!unknownHandlerStack.isEmpty())
Expand Down

0 comments on commit 96156df

Please sign in to comment.