void (ObjectReference reference) { if (reference instanceof ObjectReferenceImpl) { ((ObjectReferenceImpl)reference).enableCollectionAsync(); } else { try { reference.enableCollection(); } catch (UnsupportedOperationException ignored) { // ignore: some J2ME implementations does not provide this operation } } }