public void disposeAndValidate ( ) throws ObjectNotFoundException , ComposedException { List < NlsObject > errorList = this . duplicateIdErrors ; this . duplicateIdErrors = null ; for ( Resolver resolver : this . id2callableMap . values ( ) ) { if ( ! resolver . resolved ) { errorList . add ( this . bundle . errorObjectNotFound ( resolver . type , resolver . id ) ) ; } } this . id2valueMap = null ; this . id2callableMap = null ; int errorCount = errorList . size ( ) ; if ( errorCount > 0 ) { NlsObject [ ] errors = errorList . toArray ( new NlsObject [ errorCount ] ) ; throw new ComposedException ( errors ) ; } }
This method disposes this context and performs a validation that all IDs have been resolved .