Improve unsupported operation messages in GenericWAC
This commit is contained in:
parent
5ebabcf2b3
commit
ec1b016602
|
@ -194,7 +194,8 @@ public class GenericWebApplicationContext extends GenericApplicationContext
|
||||||
}
|
}
|
||||||
|
|
||||||
public ServletConfig getServletConfig() {
|
public ServletConfig getServletConfig() {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException(
|
||||||
|
"GenericWebApplicationContext does not support getServletConfig()");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNamespace(String namespace) {
|
public void setNamespace(String namespace) {
|
||||||
|
@ -202,27 +203,29 @@ public class GenericWebApplicationContext extends GenericApplicationContext
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getNamespace() {
|
public String getNamespace() {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException(
|
||||||
|
"GenericWebApplicationContext does not support getNamespace()");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setConfigLocation(String configLocation) {
|
public void setConfigLocation(String configLocation) {
|
||||||
if (StringUtils.hasText(configLocation)) {
|
if (StringUtils.hasText(configLocation)) {
|
||||||
throw new UnsupportedOperationException(
|
throw new UnsupportedOperationException(
|
||||||
"GenericWebApplicationContext does not support configLocation. Do " +
|
"GenericWebApplicationContext does not support setConfigLocation(). " +
|
||||||
"you still have an 'contextConfigLocations' init-param set?");
|
"Do you still have an 'contextConfigLocations' init-param set?");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setConfigLocations(String[] configLocations) {
|
public void setConfigLocations(String[] configLocations) {
|
||||||
if (!ObjectUtils.isEmpty(configLocations)) {
|
if (!ObjectUtils.isEmpty(configLocations)) {
|
||||||
throw new UnsupportedOperationException(
|
throw new UnsupportedOperationException(
|
||||||
"GenericWebApplicationContext does not support configLocations. Do " +
|
"GenericWebApplicationContext does not support setConfigLocations(). " +
|
||||||
"you still have an 'contextConfigLocations' init-param set?");
|
"Do you still have an 'contextConfigLocations' init-param set?");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] getConfigLocations() {
|
public String[] getConfigLocations() {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException(
|
||||||
|
"GenericWebApplicationContext does not support getConfigLocations()");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue