private void handleImageString(final String str) { forceHashCodeComputation(str); if (HostedStringDeduplication.isInternedString(str)) { /* The string is interned by the host VM, so it must also be interned in our image. */ assert internedStrings.containsKey(str) || internStringsPhase.isAllowed() : "Should not intern string during phase " + internStringsPhase.toString(); internedStrings.put(str, str); } }