Skip to content
This repository was archived by the owner on Jul 31, 2022. It is now read-only.

Can not remove extended HttpContext contexts [EXTERNAL ISSUE] #87

Closed
1 task done
Katsute opened this issue Aug 10, 2020 · 1 comment
Closed
1 task done

Can not remove extended HttpContext contexts [EXTERNAL ISSUE] #87

Katsute opened this issue Aug 10, 2020 · 1 comment
Labels
bug Something isn't working as expected dropped This is not being worked on

Comments

@Katsute
Copy link
Member

Katsute commented Aug 10, 2020

Prerequisites

If all checks are not passed then the issue will be closed

  • I have checked that no other similar issue already exists

Operating System: Operating system name and version
Windows 10

Release Version: Release version or branch where the issue occurred
03.05.06

Issue

Explain your issue. Add any screenshots here
HttpServer can not remove HttpContexts that don't extend HttpContextImpl. This is a clear design flaw for a non-final class.

This issue is caused by HttpServer and is not a SimpleHttpServer issue.

Expected Behavior

Explain what was supposed to happen
HttpServer should be able to remove HttpContexts that don't extend HttpContextImpl

Steps To Reproduce

Explain how and/or when the error occurred
Remove context using extended HttpContext.

@Katsute Katsute added the bug Something isn't working as expected label Aug 10, 2020
@Katsute Katsute added the dropped This is not being worked on label Sep 19, 2020
@Ktt-Development Ktt-Development locked as off-topic and limited conversation to collaborators Sep 20, 2020
@Katsute
Copy link
Member Author

Katsute commented Sep 29, 2020

sun.net.httpserver.ServerImpl

...
    public synchronized void removeContext (HttpContext context) throws IllegalArgumentException {
        if (!(context instanceof HttpContextImpl)) {
                                        ^ here
            throw new IllegalArgumentException ("wrong HttpContext type");
        }
        contexts.remove ((HttpContextImpl)context);
        logger.log (Level.DEBUG, "context removed: " + context.getPath());
    }
...

@Katsute Katsute closed this as completed Sep 29, 2020
@Katsute Katsute pinned this issue Sep 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working as expected dropped This is not being worked on
Projects
None yet
Development

No branches or pull requests

1 participant