[#8355] NullPointerException on Routine.toString() when routine is not attached to a Configuration

This commit is contained in:
lukaseder 2019-02-27 10:21:39 +01:00
parent 245fab2896
commit 32d008c32c

View File

@ -68,8 +68,6 @@ abstract class AbstractQueryPart implements QueryPartInternal {
return new DefaultConfiguration();
}
// -------------------------------------------------------------------------
// Deprecated API
// -------------------------------------------------------------------------
@ -179,7 +177,10 @@ abstract class AbstractQueryPart implements QueryPartInternal {
@Override
public String toString() {
try {
return create(configuration().derive(SettingsTools.clone(configuration().settings()).withRenderFormatted(true))).renderInlined(this);
// [#8355] Subtypes may have null configuration
Configuration configuration = Tools.configuration(configuration());
return create(configuration.derive(SettingsTools.clone(configuration.settings()).withRenderFormatted(true))).renderInlined(this);
}
catch (SQLDialectNotSupportedException e) {
return "[ ... " + e.getMessage() + " ... ]";