Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LInk is generated to the wrong endpoint #1056

Closed
robinrosenberg opened this issue Sep 2, 2020 · 2 comments
Closed

LInk is generated to the wrong endpoint #1056

robinrosenberg opened this issue Sep 2, 2020 · 2 comments
Milestone

Comments

@robinrosenberg
Copy link

robinrosenberg commented Sep 2, 2020

I tried to deprecate a method and added a link to the recommended method.
When the original method's name is a prefix to the recommended method, the link point back to the referring method, not the new one. If more than one method all(?) methods' links points to the method with the short name, even if the other methods' names are not prefixes of the firsts.

package bug;

import javax.ws.rs.*;
import javax.ws.rs.core.Response;

@Path("bug")
public class Buggy {
    /**
     * The link points to this method, not the other method.
     *
     * <p>the name of the pointed to method has this method's name aa a prefix.
     *
     * @return response
     * @deprecated see {@link #m2()}
     */
    @Deprecated
    @POST
    @Consumes("application/xml")
    public Response m() {
        return null;
    }

    /**
     * The link point is not correct either but if #m is removed, it will be correct.
     * Removing this methods has no effect in the bad link in the first method.
     *
     * <p>The name of the pointed to method does not have this method's name aa a prefix.
     *
     * @return response
     * @deprecated see {@link #m2()}
     */
    @Deprecated
    @POST
    @Consumes("text/plain")
    public Response xx() {
        return null;
    }

    /** @return response*/
    @POST
    @Consumes("application/json")
    public Response m2() {
        return null;
    }
}
@stoicflame
Copy link
Owner

Okay, thanks for the report.

@stoicflame stoicflame added this to the 2.14.0 milestone Sep 2, 2020
@stoicflame
Copy link
Owner

Fixed in 2.13.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants