You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Marshall Schor (JIRA)" <de...@uima.apache.org> on 2010/07/16 21:20:51 UTC
[jira] Assigned: (UIMA-1839) String-subtype features can't be set
to null?
[ https://issues.apache.org/jira/browse/UIMA-1839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marshall Schor reassigned UIMA-1839:
------------------------------------
Assignee: Marshall Schor
> String-subtype features can't be set to null?
> ---------------------------------------------
>
> Key: UIMA-1839
> URL: https://issues.apache.org/jira/browse/UIMA-1839
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Affects Versions: 2.3
> Reporter: Adam Lally
> Assignee: Marshall Schor
> Priority: Minor
>
> If you try to set a string-subtype feature to null, you get a NullPointerException:
> java.lang.NullPointerException
> at java.lang.String.compareTo(String.java:1167)
> at java.lang.String.compareTo(String.java:92)
> at java.util.Arrays.binarySearch0(Arrays.java:2001)
> at java.util.Arrays.binarySearch(Arrays.java:1943)
> at org.apache.uima.cas.impl.CASImpl.ll_setStringValue(CASImpl.java:3203)
> at org.apache.uima.cas.impl.FeatureStructureImpl.setStringValue(FeatureStructureImpl.java:130)
> The documentation doesn't specifically address whether this is allowed, but my intuition was that it should be. For one thing, a string-subtype feature can have the value null when it is uninitialized, so why shouldn't I be able to explicitly set it to null?
> A simple way to replicate is to add the line
> fs.setStringValue(stringSetFeat, null);
> to the test case method StringSubtypeTest.testCas()
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.