You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by "Sergey Dudoladov (JIRA)" <ji...@apache.org> on 2016/08/10 21:03:20 UTC

[jira] [Closed] (REEF-968) Handle RequiredParameter set to null

     [ https://issues.apache.org/jira/browse/REEF-968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Dudoladov closed REEF-968.
---------------------------------
       Resolution: Not A Problem
    Fix Version/s: 0.16

The original intent of REEF-968 was to reset the RequiredParameter to the default value, if the configuration attempts to set the parameter to null. 

However,  silently using the default value is not a good policy, as it is better to fail fast with the exception.  The relevant code in ConfigurationModule already raises the exception with a meaningful message, so we close the REEF-968. 


> Handle RequiredParameter set to null
> ------------------------------------
>
>                 Key: REEF-968
>                 URL: https://issues.apache.org/jira/browse/REEF-968
>             Project: REEF
>          Issue Type: Sub-task
>          Components: Tang
>            Reporter: Sergey Dudoladov
>             Fix For: 0.16
>
>
> Attempt to set a {{RequiredParameter}}  to null should probably use a default value if available or throw a meaningful exception.
> To reproduce, see [the comment to REEF-932 | https://issues.apache.org/jira/browse/REEF-932?focusedCommentId=15009618&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15009618]
> I modified that patch to include the default value for 
> {code}
> @NamedParameter(default_value = "abc")
>   class FooStringness implements Name<String> {
>   }
> {code}
>  but that code also throws {{IllegalStateException}}. 
> We probably should use the default value instead and log (a) the warning that the {{RequiredParameter}} is set to null (b) the default we use.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)