/** * Returns the properties to give to the (un)marshaller. */ private Map<String,?> properties() { if (listeners.hasListeners()) { return Collections.singletonMap(XML.WARNING_LISTENER, new WarningListener<Object>() { /** Returns the type of objects that emit warnings of interest for this listener. */ @Override public Class<Object> getSourceClass() { return Object.class; } /** Reports the occurrence of a non-fatal error during XML unmarshalling. */ @Override public void warningOccured(final Object source, final LogRecord warning) { warning.setLoggerName(Loggers.XML); listeners.warning(warning); } }); } return null; }
/** * Returns the properties to give to the (un)marshaller. */ private Map<String,?> properties() { if (listeners.hasListeners()) { return Collections.singletonMap(XML.WARNING_LISTENER, new WarningListener<Object>() { /** Returns the type of objects that emit warnings of interest for this listener. */ @Override public Class<Object> getSourceClass() { return Object.class; } /** Reports the occurrence of a non-fatal error during XML unmarshalling. */ @Override public void warningOccured(final Object source, final LogRecord warning) { warning.setLoggerName(Loggers.XML); listeners.warning(warning); } }); } return null; }