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

com.github.datalking.exception.BeansException Maven / Gradle / Ivy

package com.github.datalking.exception;

import com.github.datalking.util.ObjectUtils;

/**
 * bean相关普通异常
 *
 * @author yaoo on 5/28/18
 */
public class BeansException extends RuntimeException {

    public BeansException(String msg) {
        super(msg);
    }

    public BeansException(String msg, Throwable cause) {
        super(msg, cause);
    }

    @Override
    public boolean equals(Object other) {
        if (this == other) {
            return true;
        }
        if (!(other instanceof BeansException)) {
            return false;
        }
        BeansException otherBe = (BeansException) other;
        return (getMessage().equals(otherBe.getMessage()) &&
                ObjectUtils.nullSafeEquals(getCause(), otherBe.getCause()));
    }

    @Override
    public int hashCode() {
        return getMessage().hashCode();
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy