@ SuppressWarnings ( "unused" ) private String removeLastToken ( String propertyPath ) { String [ ] propertyKeyArray = propertyPath . split ( "\\." ) ; StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < propertyKeyArray . length - 2 ; i ++ ) { sb . append ( propertyKeyArray [ i ] ) ; sb . append ( ' ' ) ; } sb . append ( propertyKeyArray [ propertyKeyArray . length - 2 ] ) ; return sb . toString ( ) ; }
Remove the last part of a property path .