The fix for JDK-8295351 reemployed the basic union trick for converting int<->float in sharedRuntime.cpp. But we also have the the existing JavaValue type which is also a union and can be used for the same conversion trick. And then we also have the cast function in metaprogramming/primitiveConversions.hpp. There may be other cases too. It would be good if we could standardise on the use of this technique so that we don't duplicate it in numerous places.