Eclipse warns about an unnecessary cast, but as mentioned in the comment in the code, the cast is needed as a workaround for a JDK bug [1]. Add a suppression. [1] https://bugs.openjdk.java.net/browse/JDK-8039214 Change-Id: Ie98d39eca661bc58d7e71a5ffa88e1c579e36806