/*
 * Copyright 2015-2018 the original author or authors.
 *
 * All rights reserved. This program and the accompanying materials are
 * made available under the terms of the Eclipse Public License v2.0 which
 * accompanies this distribution and is available at
 *
 * http://www.eclipse.org/legal/epl-v20.html
 */

package org.junit.platform.engine.support.descriptor;

import static org.apiguardian.api.API.Status.STABLE;

import java.net.URI;
import java.util.Objects;

import org.apiguardian.api.API;
import org.junit.platform.commons.util.Preconditions;
import org.junit.platform.commons.util.ToStringBuilder;

/**
 * Default implementation of {@link UriSource}.
 *
 * @since 1.3
 */
@API(status = STABLE, since = "1.3")
class DefaultUriSource implements UriSource {

	private static final long serialVersionUID = 1L;

	private final URI uri;

	DefaultUriSource(URI uri) {
		this.uri = Preconditions.notNull(uri, "URI must not be null");
	}

	@Override
	public URI getUri() {
		return uri;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (o == null || getClass() != o.getClass()) {
			return false;
		}
		DefaultUriSource that = (DefaultUriSource) o;
		return Objects.equals(this.uri, that.uri);
	}

	@Override
	public int hashCode() {
		return Objects.hash(this.uri);
	}

	@Override
	public String toString() {
		return new ToStringBuilder(this).append("uri", this.uri).toString();
	}

}

@@ -366,62 +366,8 @@
 r;%0A%0A
-import static org.apiguardian.api.API.Status.STABLE;%0A%0A
 impo
@@ -414,40 +414,8 @@
 s;%0A%0A
-import org.apiguardian.api.API;%0A
 impo
@@ -598,45 +598,8 @@
  */%0A
-@API(status = STABLE, since = %221.3%22)%0A
 clas

Remove unnecessary @API declaration