import com.google.common.annotations.Beta;
import com.google.common.base.MoreObjects;
import com.google.common.base.MoreObjects.ToStringHelper;
-import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
/**
* @param <T> identifier type
*/
@Beta
-@NonNullByDefault
public abstract class AbstractDOMStoreTransaction<T> implements DOMStoreTransaction {
private final @Nullable Throwable debugContext;
- private final T identifier;
+ private final @NonNull T identifier;
- protected AbstractDOMStoreTransaction(final T identifier) {
+ protected AbstractDOMStoreTransaction(final @NonNull T identifier) {
this(identifier, false);
}
- protected AbstractDOMStoreTransaction(final T identifier, final boolean debug) {
+ protected AbstractDOMStoreTransaction(final @NonNull T identifier, final boolean debug) {
this.identifier = requireNonNull(identifier, "Identifier must not be null.");
- this.debugContext = debug ? new Throwable().fillInStackTrace() : null;
+ debugContext = debug ? new Throwable().fillInStackTrace() : null;
}
@Override
* ToStringHelper instance
* @return ToStringHelper instance which was passed in
*/
- protected ToStringHelper addToStringAttributes(final ToStringHelper toStringHelper) {
+ protected @NonNull ToStringHelper addToStringAttributes(final @NonNull ToStringHelper toStringHelper) {
return toStringHelper.add("id", identifier);
}
}