private boolean hasConfigChanged ( Document newConfig ) { NodeList list = newConfig . getElementsByTagName ( "*" ) ; int currentHash = nodeListHashValue ( list ) ; // Either this is the first time checking the config or there has been some change if ( this . previousConfigHash == null || currentHash != this . previousConfigHash ) { this . previousConfigHash = currentHash ; return true ; } // No config changes else { return false ; } }
Check to see if the current config has the same information as the previously written config . If this config has no new information return false .