
io.tracee.contextlogger.integrationtest.BrokenCustomContextDataWrapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of contextlogger-integration-test Show documentation
Show all versions of contextlogger-integration-test Show documentation
Please refer to https://github.com/tracee/contextlogger.
The newest version!
package io.tracee.contextlogger.integrationtest;
import io.tracee.contextlogger.contextprovider.api.TraceeContextProvider;
import io.tracee.contextlogger.contextprovider.api.TraceeContextProviderMethod;
import io.tracee.contextlogger.contextprovider.api.WrappedContextData;
/**
* Broken context data wrapper that throws a NullPointerException at deserialization.
*/
@TraceeContextProvider(displayName = "brokenCustomContextDataWrapper", order = 50)
public class BrokenCustomContextDataWrapper implements WrappedContextData {
public static final String PROPERTY_NAME = "io.tracee.contextlogger.integrationtest.BrokenCustomContextDataWrapper.output";
private WrappedBrokenTestContextData contextData;
public BrokenCustomContextDataWrapper() {
}
public BrokenCustomContextDataWrapper(final WrappedBrokenTestContextData contextData) {
this.contextData = contextData;
}
@Override
public void setContextData(Object instance) throws ClassCastException {
this.contextData = (WrappedBrokenTestContextData) instance;
}
@Override
public Class getWrappedType() {
return WrappedBrokenTestContextData.class;
}
@SuppressWarnings("unused")
@TraceeContextProviderMethod(displayName = "testoutput", order = 10)
public String getOutput() {
throw new NullPointerException("Whoops!!!");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy