@ SuppressWarnings ( { "unchecked" } ) @ Nullable @ Override public DataType < D > dataType ( ) { String className = vertex ( ) . property ( Schema . VertexProperty . DATA_TYPE ) ; if ( className == null ) return null ; try { return ( DataType < D > ) DataType . of ( Class . forName ( className ) ) ; } catch ( ClassNotFoundException e ) { throw TransactionException . unsupportedDataType ( className ) ; } }
This unsafe cast is suppressed because at this stage we do not know what the type is when reading from the rootGraph .