Skip to content

Commit

Permalink
Fixed some problems with Entity and Context in comments (#1180)
Browse files Browse the repository at this point in the history
* Fixed some problems with Entity and Context in comments.

* Updates copyrights.

Signed-off-by: Santiago Pericasgeertsen <[email protected]>

---------

Signed-off-by: Santiago Pericasgeertsen <[email protected]>
  • Loading branch information
spericas authored Oct 2, 2023
1 parent edbf1b6 commit 1a8e36d
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 41 deletions.
4 changes: 2 additions & 2 deletions jaxrs-api/src/main/java/jakarta/ws/rs/BeanParam.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -30,7 +30,7 @@
* <p>
* The JAX-RS runtime will instantiate the object and inject all it's fields and properties annotated with either one of
* the {@code @XxxParam} annotation ({@link PathParam &#64;PathParam}, {@link FormParam &#64;FormParam} ...) or the
* {@link Entity &#64;Context} annotation. For the POJO classes same instantiation and injection rules
* {@link Entity &#64;Entity} annotation. For the POJO classes same instantiation and injection rules
* apply as in case of instantiation and injection of request-scoped root resource classes.
* </p>
* For example:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2019 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -16,12 +16,10 @@

package jakarta.ws.rs.container;

import jakarta.ws.rs.Entity;

/**
* The resource context provides access to instances of resource classes.
* <p>
* This interface can be injected using the {@link Entity} annotation.
* This interface can be injected using the {@link jakarta.inject.Inject} annotation.
* </p>
* <p>
* The resource context can be utilized when instances of managed resource classes are to be returned by sub-resource
Expand Down
10 changes: 4 additions & 6 deletions jaxrs-api/src/main/java/jakarta/ws/rs/core/Application.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2019 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -20,14 +20,12 @@
import java.util.Map;
import java.util.Set;

import jakarta.ws.rs.Entity;

/**
* Defines the components of a JAX-RS application and supplies additional meta-data. A JAX-RS application or
* implementation supplies a concrete subclass of this abstract class.
* <p>
* The implementation-created instance of an Application subclass may be injected into resource classes and providers
* using {@link Entity}.
* The implementation-created instance of an Application subclass may be injected into resource classes and
* providers using {@link jakarta.inject.Inject}.
* </p>
* <p>
* In case any of the {@code Application} subclass methods or it's constructor throws a {@link RuntimeException}, the
Expand Down Expand Up @@ -64,7 +62,7 @@ public Set<Class<?>> getClasses() {
/**
* Get a set of root resource, provider and {@link Feature feature} instances.
*
* Fields and properties of returned instances are injected with their declared dependencies (see {@link Entity}) by
* Fields and properties of returned instances are injected with their declared dependencies by
* the runtime prior to use.
* <p>
* Implementations should warn about and ignore classes that do not conform to the requirements of root resource or
Expand Down
6 changes: 2 additions & 4 deletions jaxrs-api/src/main/java/jakarta/ws/rs/core/Configurable.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -18,8 +18,6 @@

import java.util.Map;

import jakarta.ws.rs.Entity;

/**
* Represents a client or server-side configurable context in JAX-RS.
*
Expand Down Expand Up @@ -263,7 +261,7 @@ public interface Configurable<C extends Configurable> {
* As opposed to components registered via {@link #register(Class)} method, the lifecycle of providers registered using
* this instance-based {@code register(...)} is not managed by JAX-RS runtime. The same registered component instance is
* used during the whole lifespan of the configurable context. Fields and properties of all registered JAX-RS component
* instances are injected with their declared dependencies (see {@link Entity}) by the JAX-RS runtime prior to use.
* instances are injected with their declared dependencies by the JAX-RS runtime prior to use.
* </p>
*
* @param component JAX-RS component instance to be configured in the scope of this configurable context.
Expand Down
7 changes: 3 additions & 4 deletions jaxrs-api/src/main/java/jakarta/ws/rs/core/Configuration.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2019 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -20,7 +20,6 @@
import java.util.Map;
import java.util.Set;

import jakarta.ws.rs.Entity;
import jakarta.ws.rs.RuntimeType;

/**
Expand All @@ -33,7 +32,7 @@
* component classes and/or instances.
* </p>
* <p>
* This interface can be injected using the {@link Entity} annotation.
* This interface can be injected using the {@link jakarta.inject.Inject} annotation.
* </p>
*
* @author Marek Potociar
Expand Down Expand Up @@ -175,7 +174,7 @@ public default boolean hasProperty(String name) {
/**
* Get the immutable set of registered JAX-RS component (such as provider or {@link Feature feature}) instances to be
* utilized by the configurable instance. Fields and properties of returned instances are injected with their declared
* dependencies (see {@link Entity}) by the runtime prior to use.
* dependencies by the runtime prior to use.
* <p>
* For each component type, there can be only a single class-based or instance-based registration present in the
* configuration context at any given time.
Expand Down
5 changes: 1 addition & 4 deletions jaxrs-api/src/main/java/jakarta/ws/rs/core/HttpHeaders.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -21,15 +21,12 @@
import java.util.Locale;
import java.util.Map;

import jakarta.ws.rs.Entity;

/**
* An injectable interface that provides access to HTTP header information. All methods throw
* {@link java.lang.IllegalStateException} if called outside the scope of a request (e.g. from a provider constructor).
*
* @author Paul Sandoz
* @author Marc Hadley
* @see Entity
* @since 1.0
*/
public interface HttpHeaders {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2019 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -18,14 +18,11 @@

import java.security.Principal;

import jakarta.ws.rs.Entity;

/**
* An injectable interface that provides access to security related information.
*
* @author Paul Sandoz
* @author Marc Hadley
* @see Entity
* @since 1.0
*/
public interface SecurityContext {
Expand Down
5 changes: 1 addition & 4 deletions jaxrs-api/src/main/java/jakarta/ws/rs/core/UriInfo.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2019 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -19,8 +19,6 @@
import java.net.URI;
import java.util.List;

import jakarta.ws.rs.Entity;

/**
* An injectable interface that provides access to application and request URI information. Relative URIs are relative
* to the base URI of the application, see {@link #getBaseUri}.
Expand All @@ -32,7 +30,6 @@
*
* @author Paul Sandoz
* @author Marc Hadley
* @see Entity
* @since 1.0
*/
public interface UriInfo {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2019 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -16,8 +16,6 @@

package jakarta.ws.rs.ext;

import jakarta.ws.rs.Entity;

/**
* Contract for a provider that supplies context information to resource classes and other providers.
*
Expand All @@ -32,7 +30,6 @@
* @param <T> type of the context
* @author Paul Sandoz
* @author Marc Hadley
* @see Entity
* @see Providers#getContextResolver(Class, jakarta.ws.rs.core.MediaType)
* @see Provider
* @see jakarta.ws.rs.Produces
Expand Down
4 changes: 1 addition & 3 deletions jaxrs-api/src/main/java/jakarta/ws/rs/ext/Providers.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2019 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -19,15 +19,13 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;

import jakarta.ws.rs.Entity;
import jakarta.ws.rs.core.MediaType;

/**
* An injectable interface providing runtime lookup of provider instances.
*
* @author Paul Sandoz
* @author Marc Hadley
* @see Entity
* @see MessageBodyReader
* @see MessageBodyWriter
* @see ContextResolver
Expand Down
4 changes: 2 additions & 2 deletions jaxrs-api/src/main/java/jakarta/ws/rs/sse/SseEventSink.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2019 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -27,7 +27,7 @@
* &#64;GET
* &#64;Path("eventStream")
* &#64;Produces(MediaType.SERVER_SENT_EVENTS)
* public void eventStream(@Context SseEventSink eventSink) {
* public void eventStream(SseEventSink eventSink) {
* // ...
* }
* </pre>
Expand Down

0 comments on commit 1a8e36d

Please sign in to comment.