/** * Write the service contexts in scMap in a desired order. Right now, the only special case we have is * UnknownExceptionInfo, so I'm merely writing it last if present. */ private void writeServiceContextsInOrder(OutputStream os, GIOPVersion gv) { // Temporarily remove this rather than check it per iteration Integer ueInfoId = new Integer(UEInfoServiceContext.SERVICE_CONTEXT_ID); Object unknownExceptionInfo = scMap.remove(ueInfoId); Iterator<Integer> iter = scMap.keySet().iterator(); while (iter.hasNext()) { Integer id = iter.next(); writeMapEntry(os, id, scMap.get(id), gv); } // Write the UnknownExceptionInfo service context last // (so it will be after the CodeBase) and restore it in // the map. if (unknownExceptionInfo != null) { writeMapEntry(os, ueInfoId, unknownExceptionInfo, gv); scMap.put(ueInfoId, unknownExceptionInfo); } }
/** * Write the service contexts in scMap in a desired order. Right now, the only special case we have is * UnknownExceptionInfo, so I'm merely writing it last if present. */ private void writeServiceContextsInOrder(OutputStream os, GIOPVersion gv) { // Temporarily remove this rather than check it per iteration Integer ueInfoId = new Integer(UEInfoServiceContext.SERVICE_CONTEXT_ID); Object unknownExceptionInfo = scMap.remove(ueInfoId); Iterator<Integer> iter = scMap.keySet().iterator(); while (iter.hasNext()) { Integer id = iter.next(); writeMapEntry(os, id, scMap.get(id), gv); } // Write the UnknownExceptionInfo service context last // (so it will be after the CodeBase) and restore it in // the map. if (unknownExceptionInfo != null) { writeMapEntry(os, ueInfoId, unknownExceptionInfo, gv); scMap.put(ueInfoId, unknownExceptionInfo); } }