// Simply checking the bound won't handle our recursive types. We need to check for the
// existance of template, which will be present for all unbounded sequences and for bound
// sequences with recursive type elements. Use the template element to construct each
// object that is in the input stream.
if (sequenceObj.getTemplateElement() != null) {
sequenceObj.clear();
CorbaObjectHandler template = sequenceObj.getTemplateElement();
for (int i = 0; i < length; ++i) {
CorbaObjectHandler seqElement;
if (i < seqElements.size()) {
seqElement = seqElements.get(i);