[Minor] minor exception message changes on refP

This commit is contained in:
Robert von Burg 2015-02-11 23:02:30 +01:00
parent 5aef65861b
commit 9a8f29de34
5 changed files with 22 additions and 13 deletions

@ -1 +1 @@
Subproject commit 8861db85091eea43f06ed2a480360ba670d3c30e
Subproject commit 72d470fd26350a7b1c79a0e8da8f29c1b9026e05

View File

@ -28,9 +28,11 @@ public class CachedOrderMap extends CachedElementMap<Order> implements OrderMap
@Override
protected void assertIsRefParam(Parameter<?> refP) {
if (!refP.getInterpretation().equals(INTERPRETATION_ORDER_REF)) {
String msg = "{0} is not an Order reference as its interpretation is not {1}"; //$NON-NLS-1$
throw new StrolchException(MessageFormat.format(msg, refP.getLocator(), INTERPRETATION_ORDER_REF));
String interpretation = refP.getInterpretation();
if (!interpretation.equals(INTERPRETATION_ORDER_REF)) {
String msg = "{0} is not an Order reference as its interpretation is not {1} it is {2}"; //$NON-NLS-1$
throw new StrolchException(MessageFormat.format(msg, refP.getLocator(), INTERPRETATION_ORDER_REF,
interpretation));
}
if (refP.getUom().equals(UOM_NONE)) {

View File

@ -27,9 +27,12 @@ public class CachedResourceMap extends CachedElementMap<Resource> implements Res
@Override
protected void assertIsRefParam(Parameter<?> refP) {
if (!refP.getInterpretation().equals(INTERPRETATION_RESOURCE_REF)) {
String msg = MessageFormat.format("{0} is not an Resource reference as its interpretation is not {1}", //$NON-NLS-1$
refP.getLocator(), INTERPRETATION_RESOURCE_REF);
String interpretation = refP.getInterpretation();
if (!interpretation.equals(INTERPRETATION_RESOURCE_REF)) {
String msg = MessageFormat.format(
"{0} is not an Resource reference as its interpretation is not {1} it is {2}", //$NON-NLS-1$
refP.getLocator(), INTERPRETATION_RESOURCE_REF, interpretation);
throw new StrolchException(msg);
}

View File

@ -20,9 +20,11 @@ public class TransactionalOrderMap extends TransactionalElementMap<Order> implem
@Override
protected void assertIsRefParam(Parameter<?> refP) {
if (!refP.getInterpretation().equals(INTERPRETATION_ORDER_REF)) {
String msg = "{0} is not an Order reference as its interpretation is not {1}"; //$NON-NLS-1$
throw new StrolchException(MessageFormat.format(msg, refP.getLocator(), INTERPRETATION_ORDER_REF));
String interpretation = refP.getInterpretation();
if (!interpretation.equals(INTERPRETATION_ORDER_REF)) {
String msg = "{0} is not an Order reference as its interpretation is not {1} it is {2}"; //$NON-NLS-1$
throw new StrolchException(MessageFormat.format(msg, refP.getLocator(), INTERPRETATION_ORDER_REF,
interpretation));
}
if (refP.getUom().equals(UOM_NONE)) {

View File

@ -20,9 +20,11 @@ public class TransactionalResourceMap extends TransactionalElementMap<Resource>
@Override
protected void assertIsRefParam(Parameter<?> refP) {
if (!refP.getInterpretation().equals(INTERPRETATION_RESOURCE_REF)) {
String msg = "{0} is not an Resource reference as its interpretation is not {1}"; //$NON-NLS-1$
throw new StrolchException(MessageFormat.format(msg, refP.getLocator(), INTERPRETATION_RESOURCE_REF));
String interpretation = refP.getInterpretation();
if (!interpretation.equals(INTERPRETATION_RESOURCE_REF)) {
String msg = "{0} is not an Resource reference as its interpretation is not {1} it is {2}"; //$NON-NLS-1$
throw new StrolchException(MessageFormat.format(msg, refP.getLocator(), INTERPRETATION_RESOURCE_REF,
interpretation));
}
if (refP.getUom().equals(UOM_NONE)) {