According to this article, https://www.javacodegeeks.com/2018/08/memory-hogging-enum-values-method.html
“A recent post on the OpenJDK compiler-dev mailing list titled “about Enum.values() memory allocation” observes that “Enum.values() allocates a significant amount of memory when called in a tight loop as it clones the constant values array.” The poster of that message adds that this “is probably for immutability” and states, “I can understand that.” This message also references a March 2012 message and associated thread on this same mailing list.”
I’ve seen many inner loops in graphics/games engines using the Enum.values() call. I just suspect we should avoid such calls. It seems that escape analisys has little to do here.