You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Jörn Kottmann (JIRA)" <de...@uima.apache.org> on 2011/02/09 17:39:57 UTC
[jira] Created: (UIMA-2043) SolrCASConsumers initialize method
should be refactored
SolrCASConsumers initialize method should be refactored
-------------------------------------------------------
Key: UIMA-2043
URL: https://issues.apache.org/jira/browse/UIMA-2043
Project: UIMA
Issue Type: Improvement
Components: Sandbox
Reporter: Jörn Kottmann
Priority: Minor
In the initialize method the following is done:
String solrInstanceTypeParam = String.valueOf(context.getConfigParameterValue("solrInstanceType"));
assert solrInstanceTypeParam != null;
The assert will always be true since String.valueOf never returns a null reference, even when
you pass a null reference to it, it will return the string "null".
getConfigParameterValue can actually return null, and we should fail the initialization if
not all necessary parameters to run it are specified in the descriptor. It should fail
with a meaningful error message.
Using assert is not a safe way to fail the initialization because asserts are usually
disabled.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (UIMA-2043) SolrCASConsumers initialize method
should be refactored
Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-2043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tommaso Teofili updated UIMA-2043:
----------------------------------
Fix Version/s: 2.3.1Addons
> SolrCASConsumers initialize method should be refactored
> -------------------------------------------------------
>
> Key: UIMA-2043
> URL: https://issues.apache.org/jira/browse/UIMA-2043
> Project: UIMA
> Issue Type: Improvement
> Components: Sandbox
> Reporter: Jörn Kottmann
> Priority: Minor
> Fix For: 2.3.1Addons
>
>
> In the initialize method the following is done:
> String solrInstanceTypeParam = String.valueOf(context.getConfigParameterValue("solrInstanceType"));
> assert solrInstanceTypeParam != null;
> The assert will always be true since String.valueOf never returns a null reference, even when
> you pass a null reference to it, it will return the string "null".
> getConfigParameterValue can actually return null, and we should fail the initialization if
> not all necessary parameters to run it are specified in the descriptor. It should fail
> with a meaningful error message.
> Using assert is not a safe way to fail the initialization because asserts are usually
> disabled.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (UIMA-2043) SolrCASConsumers initialize method
should be refactored
Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-2043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tommaso Teofili closed UIMA-2043.
---------------------------------
Resolution: Fixed
> SolrCASConsumers initialize method should be refactored
> -------------------------------------------------------
>
> Key: UIMA-2043
> URL: https://issues.apache.org/jira/browse/UIMA-2043
> Project: UIMA
> Issue Type: Improvement
> Components: Sandbox
> Reporter: Jörn Kottmann
> Priority: Minor
> Fix For: 2.3.1Addons
>
>
> In the initialize method the following is done:
> String solrInstanceTypeParam = String.valueOf(context.getConfigParameterValue("solrInstanceType"));
> assert solrInstanceTypeParam != null;
> The assert will always be true since String.valueOf never returns a null reference, even when
> you pass a null reference to it, it will return the string "null".
> getConfigParameterValue can actually return null, and we should fail the initialization if
> not all necessary parameters to run it are specified in the descriptor. It should fail
> with a meaningful error message.
> Using assert is not a safe way to fail the initialization because asserts are usually
> disabled.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (UIMA-2043) SolrCASConsumers initialize method
should be refactored
Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-2043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tommaso Teofili resolved UIMA-2043.
-----------------------------------
Resolution: Fixed
> SolrCASConsumers initialize method should be refactored
> -------------------------------------------------------
>
> Key: UIMA-2043
> URL: https://issues.apache.org/jira/browse/UIMA-2043
> Project: UIMA
> Issue Type: Improvement
> Components: Sandbox
> Reporter: Jörn Kottmann
> Priority: Minor
>
> In the initialize method the following is done:
> String solrInstanceTypeParam = String.valueOf(context.getConfigParameterValue("solrInstanceType"));
> assert solrInstanceTypeParam != null;
> The assert will always be true since String.valueOf never returns a null reference, even when
> you pass a null reference to it, it will return the string "null".
> getConfigParameterValue can actually return null, and we should fail the initialization if
> not all necessary parameters to run it are specified in the descriptor. It should fail
> with a meaningful error message.
> Using assert is not a safe way to fail the initialization because asserts are usually
> disabled.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (UIMA-2043) SolrCASConsumers initialize method
should be refactored
Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-2043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tommaso Teofili reopened UIMA-2043:
-----------------------------------
> SolrCASConsumers initialize method should be refactored
> -------------------------------------------------------
>
> Key: UIMA-2043
> URL: https://issues.apache.org/jira/browse/UIMA-2043
> Project: UIMA
> Issue Type: Improvement
> Components: Sandbox
> Reporter: Jörn Kottmann
> Priority: Minor
>
> In the initialize method the following is done:
> String solrInstanceTypeParam = String.valueOf(context.getConfigParameterValue("solrInstanceType"));
> assert solrInstanceTypeParam != null;
> The assert will always be true since String.valueOf never returns a null reference, even when
> you pass a null reference to it, it will return the string "null".
> getConfigParameterValue can actually return null, and we should fail the initialization if
> not all necessary parameters to run it are specified in the descriptor. It should fail
> with a meaningful error message.
> Using assert is not a safe way to fail the initialization because asserts are usually
> disabled.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira