Wrong exception thrown when value missing in config

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Wrong exception thrown when value missing in config

John D. Ament
I noticed the following logic:

                if (!hasValue) {
                    deploymentProblems.add(new IllegalArgumentException("Missing converter for '" + key + "' from " + injectionPoint));
                }

The problem isn't that the converter is missing, but that the value is missing (and there's no default set).  Anyone against fixing the message?

John
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Wrong exception thrown when value missing in config

Romain Manni-Bucau
+1


Romain Manni-Bucau
@rmannibucau |  Blog | Old BlogGithub | LinkedIn | JavaEE Factory

2017-07-29 23:55 GMT+02:00 John D. Ament <[hidden email]>:
I noticed the following logic:

                if (!hasValue) {
                    deploymentProblems.add(new IllegalArgumentException("Missing converter for '" + key + "' from " + injectionPoint));
                }

The problem isn't that the converter is missing, but that the value is missing (and there's no default set).  Anyone against fixing the message?

John

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Wrong exception thrown when value missing in config

Mark Struberg
+1

txs and LieGrue,
strub


> Am 30.07.2017 um 09:26 schrieb Romain Manni-Bucau <[hidden email]>:
>
> +1
>
>
> Romain Manni-Bucau
> @rmannibucau |  Blog | Old Blog | Github | LinkedIn | JavaEE Factory
>
> 2017-07-29 23:55 GMT+02:00 John D. Ament <[hidden email]>:
> I noticed the following logic:
>
>                 if (!hasValue) {
>                     deploymentProblems.add(new IllegalArgumentException("Missing converter for '" + key + "' from " + injectionPoint));
>                 }
>
> The problem isn't that the converter is missing, but that the value is missing (and there's no default set).  Anyone against fixing the message?
>
> John
>

Loading...