joewitt commented on code in PR #8892: URL: https://github.com/apache/nifi/pull/8892#discussion_r1621459675
########## nifi-extension-bundles/nifi-standard-bundle/nifi-standard-parameter-providers/src/main/java/org/apache/nifi/parameter/DatabaseParameterProvider.java: ########## @@ -233,7 +218,7 @@ private void validateValueNotNull(final String value, final String columnName) { } String getQuery(final ConfigurationContext context, final String tableName, final List<String> columns, final String whereClause) { - final DatabaseAdapter dbAdapter = dbAdapters.get(context.getProperty(DB_TYPE).getValue()); + final DatabaseAdapter dbAdapter = context.getProperty(DATABASE_ADAPTER_PROVIDER).asControllerService(DatabaseAdapter.class); Review Comment: perfect example where we do not need the word adapter anywhere. DatabaseAdapter.class is an interface. There are concrete impls. ########## nifi-extension-bundles/nifi-standard-bundle/nifi-standard-parameter-providers/src/main/java/org/apache/nifi/parameter/DatabaseParameterProvider.java: ########## @@ -233,7 +218,7 @@ private void validateValueNotNull(final String value, final String columnName) { } String getQuery(final ConfigurationContext context, final String tableName, final List<String> columns, final String whereClause) { - final DatabaseAdapter dbAdapter = dbAdapters.get(context.getProperty(DB_TYPE).getValue()); + final DatabaseAdapter dbAdapter = context.getProperty(DATABASE_ADAPTER_PROVIDER).asControllerService(DatabaseAdapter.class); Review Comment: perfect example where we do not need the word provider anywhere. DatabaseAdapter.class is an interface. There are concrete impls. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org