Skip to content

Commit 08ad119

Browse files
committed
Solves problem with overwhelming WARNS in log during testing
1 parent 120830f commit 08ad119

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ protected Map<String, ResultConfig> buildResults(Element element, PackageConfig.
727727
+ " Did you mean '" + guessResultType(resultType) + "'?", resultElement);
728728
}
729729

730-
String resultClass = config.getClazz();
730+
String resultClass = config.getClassName();
731731

732732
// invalid result type specified in result definition
733733
if (resultClass == null) {
@@ -759,7 +759,7 @@ protected Map<String, ResultConfig> buildResults(Element element, PackageConfig.
759759
}
760760
} else {
761761
if (LOG.isWarnEnabled()) {
762-
LOG.warn("no default parameter defined for result of type " + config.getName());
762+
LOG.warn("No default parameter defined for result [#0] of type [#1] ", config.getName(), config.getClassName());
763763
}
764764
}
765765
}

xwork-core/src/main/java/com/opensymphony/xwork2/mock/MockResult.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*/
2727
public class MockResult implements Result {
2828

29-
public static final String DEFAULT_PARAM = null;
29+
public static final String DEFAULT_PARAM = "foo";
3030

3131
@Override
3232
public boolean equals(Object o) {
@@ -49,4 +49,9 @@ public void execute(ActionInvocation invocation) throws Exception {
4949
public int hashCode() {
5050
return 10;
5151
}
52+
53+
public void setFoo(String foo) {
54+
// no op
55+
}
56+
5257
}

0 commit comments

Comments
 (0)