public static void enableCollection(ObjectReference reference) { try { reference.enableCollection(); } catch (UnsupportedOperationException ignored) { // ignore: some J2ME implementations does not provide this operation } }