protected boolean isRecompilationNeeded(int[] loadedChecksums){
  this.checksums[0]=calculateChecksum();
  if (this.checksums[0] != loadedChecksums[0]) {
    if (Trace.swcChecksum) {
      Trace.trace("isRecompilationNeeded: calculated checksum differs from last checksum, recompile");
    }
    return true;
  }
  if (!isSwcChecksumEnabled) {
    if (Trace.swcChecksum) {
      Trace.trace("isRecompilationNeeded: checksums equal, swc-checksum disabled, incremental compile");
    }
    return false;
  }
  Map<QName,Long> signatureChecksums=swcDefSignatureChecksums;
  if (signatureChecksums == null) {
    if (Trace.swcChecksum) {
      Trace.trace("isRecompilationNeeded: checksums equal, signatureChecksums is null, incremental compile");
    }
  }
 else {
    for (    Map.Entry<QName,Long> entry : signatureChecksums.entrySet()) {
      QName qName=(QName)entry.getKey();
      Long dataSignatureChecksum=(Long)entry.getValue();
      Long swcSignatureChecksum=swcContext.getChecksum(qName);
      if (swcSignatureChecksum == null && qName != null) {
        Source source=swcContext.getSource(qName.getNamespace(),qName.getLocalPart());
        if (source != null) {
          swcSignatureChecksum=new Long(source.getLastModified());
        }
      }
      if (Trace.swcChecksum) {
        if (dataSignatureChecksum == null) {
          throw new IllegalStateException("dataSignatureChecksum should never be null");
        }
      }
      if (dataSignatureChecksum != null && swcSignatureChecksum == null) {
        if (Trace.swcChecksum) {
          Trace.trace("isRecompilationNeeded: signature checksums not equal, recompile");
          Trace.trace("compare " + entry.getKey());
          Trace.trace("data =  " + dataSignatureChecksum);
          Trace.trace("swc  =  " + swcSignatureChecksum);
        }
        return true;
      }
      if (dataSignatureChecksum != null) {
        if (dataSignatureChecksum.longValue() != swcSignatureChecksum.longValue()) {
          if (Trace.swcChecksum) {
            Trace.trace("isRecompilationNeeded: signature checksums not equal, recompile");
            Trace.trace("compare " + entry.getKey());
            Trace.trace("data =  " + dataSignatureChecksum);
            Trace.trace("swc  =  " + swcSignatureChecksum);
          }
          return true;
        }
      }
 else {
        return true;
      }
    }
  }
  boolean result=!areSwcFileChecksumsEqual();
  if (Trace.swcChecksum) {
    Trace.trace("isRecompilationNeeded: " + (result ? "recompile" : "incremental compile"));
  }
  return result;
}

protected boolean isRecompilationNeeded ( int [ ] loadedChecksums ) { this . checksums [ 0 ] = calculateChecksum ( ) ; if ( this . checksums [ 0 ] != loadedChecksums [ 0 ] ) { if ( Trace . swcChecksum ) { Trace . trace ( "isRecompilationNeeded: calculated checksum differs from last checksum, recompile" ) ; } return true ; } if ( ! isSwcChecksumEnabled ) { if ( Trace . swcChecksum ) { Trace . trace ( "isRecompilationNeeded: checksums equal, swc-checksum disabled, incremental compile" ) ; } return false ; } Map < QName , Long > signatureChecksums = swcDefSignatureChecksums ; if ( signatureChecksums == null ) { if ( Trace . swcChecksum ) { Trace . trace ( "isRecompilationNeeded: checksums equal, signatureChecksums is null, incremental compile" ) ; } } else { for ( Map . Entry < QName , Long > entry : signatureChecksums . entrySet ( ) ) { QName qName = ( QName ) entry . getKey ( ) ; Long dataSignatureChecksum = ( Long ) entry . getValue ( ) ; Long swcSignatureChecksum = swcContext . getChecksum ( qName ) ; if ( swcSignatureChecksum == null && qName != null ) { Source source = swcContext . getSource ( qName . getNamespace ( ) , qName . getLocalPart ( ) ) ; if ( source != null ) { swcSignatureChecksum = new Long ( source . getLastModified ( ) ) ; } } if ( Trace . swcChecksum ) { if ( dataSignatureChecksum == null ) { throw new IllegalStateException ( "dataSignatureChecksum should never be null" ) ; } } if ( dataSignatureChecksum != null && swcSignatureChecksum == null ) { if ( Trace . swcChecksum ) { Trace . trace ( "isRecompilationNeeded: signature checksums not equal, recompile" ) ; Trace . trace ( "compare " + entry . getKey ( ) ) ; Trace . trace ( "data =  " + dataSignatureChecksum ) ; Trace . trace ( "swc  =  " + swcSignatureChecksum ) ; } return true ; } if ( dataSignatureChecksum != null ) { if ( dataSignatureChecksum . longValue ( ) != swcSignatureChecksum . longValue ( ) ) { if ( Trace . swcChecksum ) { Trace . trace ( "isRecompilationNeeded: signature checksums not equal, recompile" ) ; Trace . trace ( "compare " + entry . getKey ( ) ) ; Trace . trace ( "data =  " + dataSignatureChecksum ) ; Trace . trace ( "swc  =  " + swcSignatureChecksum ) ; } return true ; } } else { return true ; } } } boolean result = ! areSwcFileChecksumsEqual ( ) ; if ( Trace . swcChecksum ) { Trace . trace ( "isRecompilationNeeded: " + ( result ? "recompile" : "incremental compile" ) ) ; } return result ; }
loop thru the saved signature and file checksums in the persisted data and compare them with the signature and file checksums in the swc context .
