List of usage examples for org.apache.commons.beanutils NestedNullException getLocalizedMessage
public String getLocalizedMessage()
From source file:de.hybris.platform.commercefacades.address.converters.populator.SingleLineAddressFormatPopulator.java
@Override public void populate(final AddressModel addressModel, final StringBuilder addressLine) throws ConversionException { for (final String field : addressFormatList) { try {/*from ww w . j a v a 2s. c o m*/ final String fieldValue = (String) PropertyUtils.getProperty(addressModel, field); if (fieldValue != null) { addressLine.append(fieldValue); addressLine.append(", "); } } catch (final NestedNullException e) { if (LOG.isDebugEnabled()) { LOG.debug(e.getLocalizedMessage()); } } catch (final Exception e) { throw new ConversionException(e.getLocalizedMessage()); } } if (addressLine.length() > 2) { // Trim last ", " addressLine.setLength(addressLine.length() - 2); } }