@ Override public String normalize ( String name ) { if ( name == null ) { return null ; } if ( name . isEmpty ( ) ) { return "/" ; } if ( name . charAt ( 0 ) != ' ' && name . charAt ( 0 ) != ' ' ) { name = "/" . concat ( name ) ; } name = FileNameUtil . normalize ( name ) ; if ( name == null ) { return null ; } if ( ! this . appendLostSuffix || name . endsWith ( this . suffix ) || name . charAt ( name . length ( ) - 1 ) == ' ' ) { return name ; } else { for ( String item : this . assistantSuffixs ) { if ( name . endsWith ( item ) ) { return name ; } } return name . concat ( this . suffix ) ; } }
normalize a template s name .