All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.java.truelicense.maven.plugin.CheckedLog Maven / Gradle / Ivy

Go to download

Provides a Maven plugin with goals for the obfuscation of constant string values in Java class and test-class files (byte code).

There is a newer version: 2.6.6
Show newest version
/*
 * Copyright (C) 2005-2013 Schlichtherle IT Services.
 * All rights reserved. Use is subject to license terms.
 */
package net.java.truelicense.maven.plugin;

import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugin.logging.Log;

/**
 * @author Christian Schlichtherle
 */
final class CheckedLog extends DecoratingLog {

    private boolean error;

    CheckedLog(Log log) { super(log); }

    void check() throws MojoFailureException {
        if (error) throw new MojoFailureException("Check logging output.");
    }

    @Override
    public void error(CharSequence content) {
        log.error(content);
        this.error = true;
    }

    @Override
    public void error(CharSequence content, Throwable error) {
        log.error(content, error);
        this.error = true;
    }

    @Override
    public void error(Throwable error) {
        log.error(error);
        this.error = true;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy