This suggestion comes from Richard:
In most cases, you should inherit from JCas-based components, e.g.
<pre>
public class MASCReader
extends JCasResourceCollectionReader_ImplBase
</pre>
This is because getting the CAS from a JCas is a safe operation
while getting the JCas from a CAS requires handling a potential exception.
Bad:
<pre>
public void getNext(CAS aCAS)
throws IOException, CollectionException
{
JCas jCas;
try {
jCas = aCAS.getJCas();
}
catch (CASException e) {
throw new CollectionException(e);
}
</pre>
Good:
<pre>
public void getNext(JCas jCas)
throws IOException, CollectionException
{
</pre>
Original issue reported on code.google.com by tristan.miller@nothingisreal.com on 9 Jan 2015 at 2:03
Original issue reported on code.google.com by
tristan.miller@nothingisreal.com
on 9 Jan 2015 at 2:03