private boolean stage3 ( final Document document ) { beginStage ( PHASE1_STAGE3_HDR , "3" , NUM_PHASES ) ; final StringBuilder bldr = new StringBuilder ( ) ; if ( hasOption ( NO_SYNTAX_CHECK ) ) { bldr . append ( SYMBOL_CHECKS_DISABLED ) ; markEndStage ( bldr ) ; stageOutput ( bldr . toString ( ) ) ; return true ; } bldr . append ( "Verifying symbols in " ) ; bldr . append ( document . getName ( ) ) ; stageOutput ( bldr . toString ( ) ) ; boolean warnings = false ; long t1 = currentTimeMillis ( ) ; try { p1 . stage3SymbolVerification ( document ) ; } catch ( SymbolWarning e ) { warnings = true ; String resname = e . getName ( ) ; if ( resname == null ) { e . setName ( document . getName ( ) ) ; } else { e . setName ( resname + " (" + document . getName ( ) + ")" ) ; } stageWarning ( e . getUserFacingMessage ( ) ) ; } catch ( IndexingFailure e ) { stageError ( "Failed to open namespace index file for symbol " + "verification." ) ; } catch ( ResourceDownloadError e ) { stageError ( "Failed to resolve namespace during symbol " + "verification." ) ; } long t2 = currentTimeMillis ( ) ; bldr . setLength ( 0 ) ; if ( warnings ) { bldr . append ( "Symbol verification resulted in warnings in " ) ; bldr . append ( document . getName ( ) ) ; bldr . append ( "\n" ) ; } markTime ( bldr , t1 , t2 ) ; markEndStage ( bldr ) ; stageOutput ( bldr . toString ( ) ) ; if ( warnings ) { return false ; } return true ; }
Stage three symbol verification of the document .