[ 
https://issues.apache.org/jira/browse/NIFI-6365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16858795#comment-16858795
 ] 

Matt Gilman commented on NIFI-6365:
-----------------------------------

Can you describe the scenario in more details? I cannot tell which endpoints 
your referencing based on the description. Controller Services are reference 
through properties. If this is what you're referring to, there are already 
conventions for these property values that we adhere to. 

A null value in the property map is the convention for removing that property 
when it is dynamic or optional. An empty string is a valid value for a property 
(like a regex replacement value for instance) and probably shouldn't be 
inferred to represent something else for specific types of properties.

> Creation of Controller Services should handle empty strings as it does nulls
> ----------------------------------------------------------------------------
>
>                 Key: NIFI-6365
>                 URL: https://issues.apache.org/jira/browse/NIFI-6365
>             Project: Apache NiFi
>          Issue Type: Task
>            Reporter: Otto Fowler
>            Priority: Major
>
> If the web api is passed service ids as empty strings instead of nulls, the 
> result is an error that the service could not be found with id "".  This can 
> be confusing, especially since the service id may not be the one being 
> created, but rather something referenced.
> the api should treat empty strings the same as if they were nulls, either 
> through a test, logically 
> {code:java}
> if ( controllerService.id() != null) {
>  ...
> }
> // should be 
> if ( !StringUtils.isNullOrEmpty(controllerService.id()) {
>  ...
> }
> {code}
> or something that explicitly cleans up the DTOs



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to