
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 tracee-context-logger-integration-test Show documentation
Show all versions of tracee-context-logger-integration-test Show documentation
Please refer to https://github.com/holisticon/tracee.
The newest version!
package io.tracee.contextlogger.integrationtest;
import io.tracee.contextlogger.api.TraceeContextProvider;
import io.tracee.contextlogger.api.TraceeContextProviderMethod;
import io.tracee.contextlogger.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 = "brokenCustomContextDataWrapper.testOutputPropertyName";
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", propertyName = TestContextDataWrapper.PROPERTY_NAME, order = 10)
public String getOutput() {
throw new NullPointerException("Whoops!!!");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy