@Override
    public CheckSum generateCheckSum() {
        if (this.path == null) {
            return super.generateCheckSum();
        }

        InputStream stream = null;
        try {
            stream = openSqlStream();
        } catch (IOException e) {
            throw new UnexpectedLiquibaseException(e);
        }

        try {
            String selectQuery = this.selectQuery;
            if ((stream == null) && (selectQuery == null)) {
                selectQuery = "";
            }

            String encoding = LiquibaseConfiguration.getInstance().getConfiguration(GlobalConfiguration.class).getOutputEncoding();
            if (selectQuery != null) {
                try {
                    stream = new ByteArrayInputStream(selectQuery.getBytes(encoding));
                } catch (UnsupportedEncodingException e) {
                    throw new AssertionError(encoding+" is not supported by the JVM, this should not happen according to the JavaDoc of the Charset class");
                }
            }

			CheckSum checkSum = CheckSum.compute(new AbstractSQLChange.NormalizingStream(";", false, false, stream), false);

            return CheckSum.compute(super.generateCheckSum().toString() + ":" + checkSum.toString());
        } finally {
            if (stream != null) {
                try {
                    stream.close();
                } catch (IOException ignore) {
                }
            }
        }

    }
@Override
    public CheckSum generateCheckSum() {
        if (this.path == null) {
            return super.generateCheckSum();
        }

        InputStream stream = null;
        try {
            stream = openSqlStream();
        } catch (IOException e) {
            throw new UnexpectedLiquibaseException(e);
        }

        try {
            String selectQuery = this.selectQuery;
            if ((stream == null) && (selectQuery == null)) {
                selectQuery = "";
            }

            String encoding = LiquibaseConfiguration.getInstance().getConfiguration(GlobalConfiguration.class).getOutputEncoding();
            if (selectQuery != null) {
                try {
                    stream = new ByteArrayInputStream(selectQuery.getBytes(encoding));
                } catch (UnsupportedEncodingException e) {
                    throw new AssertionError(encoding+" is not supported by the JVM, this should not happen according to the JavaDoc of the Charset class");
                }
            }

			CheckSum checkSum = CheckSum.compute(new AbstractSQLChange.NormalizingStream(";", false, false, stream), false);

            return CheckSum.compute(super.generateCheckSum().toString() + ":" + checkSum.toString());
        } finally {
            if (stream != null) {
                try {
                    stream.close();
                } catch (IOException ignore) {
                }
            }
        }

    }
@ Override public CheckSum generateCheckSum ( ) { if ( this . path == null ) { return super . generateCheckSum ( ) ; } InputStream stream = null ; try { stream = openSqlStream ( ) ; } catch ( IOException e ) { throw new UnexpectedLiquibaseException ( e ) ; } try { String selectQuery = this . selectQuery ; if ( ( stream == null ) && ( selectQuery == null ) ) { selectQuery = "" ; } String encoding = LiquibaseConfiguration . getInstance ( ) . getConfiguration ( GlobalConfiguration . class ) . getOutputEncoding ( ) ; if ( selectQuery != null ) { try { stream = new ByteArrayInputStream ( selectQuery . getBytes ( encoding ) ) ; } catch ( UnsupportedEncodingException e ) { throw new AssertionError ( encoding + " is not supported by the JVM, this should not happen according to the JavaDoc of the Charset class" ) ; } } CheckSum checkSum = CheckSum . compute ( new AbstractSQLChange . NormalizingStream ( ";" , false , false , stream ) , false ) ; return CheckSum . compute ( super . generateCheckSum ( ) . toString ( ) + ":" + checkSum . toString ( ) ) ; } finally { if ( stream != null ) { try { stream . close ( ) ; } catch ( IOException ignore ) { } } } }
Calculates the checksum based on the contained SQL.

@see liquibase.change.AbstractChange#generateCheckSum()
Calculates the checksum based on the contained SQL .