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

Removing constructor in CookieCache on minor version Change of artifact #11509

Closed
stbischof opened this issue Mar 12, 2024 · 5 comments · Fixed by #11512
Closed

Removing constructor in CookieCache on minor version Change of artifact #11509

stbischof opened this issue Mar 12, 2024 · 5 comments · Fixed by #11512
Assignees
Labels
Bug For general bugs on Jetty side

Comments

@stbischof
Copy link

stbischof commented Mar 12, 2024

Jetty version(s)
3853628

Jetty Environment
Ee10 in combinattion with apache felix http jetty

Description
In the commit 3853628 the constructor changed from

  • public CookieCache(CookieCompliance compliance, ComplianceViolation.Listener complianceListener)
    To
  • public CookieCache(CookieCompliance compliance)

The released Version had just a micro change. This will break compatibiliity between two micro Version

@stbischof stbischof added the Bug For general bugs on Jetty side label Mar 12, 2024
@joakime
Copy link
Contributor

joakime commented Mar 12, 2024

CookieCache is not something we expected someone to use like that.

The Compliance mode without the violation listener was an invalid setup (as it failed to report the violations properly).

The default constructor is still valid though.

@stbischof
Copy link
Author

stbischof commented Mar 12, 2024

When i have version bump for jetty-ee10-servlets from 12.0.5 to 12.0.7.
And using and core with in version 12.0.5 then this will cause the problem.

And. At least one release with an deprecated annotation would help others to see that a breaking change will come in next micro.

java.lang.NoSuchMethodError: 'void org.eclipse.jetty.http.CookieCache.<init>(org.eclipse.jetty.http.CookieCompliance, org.eclipse.jetty.http.ComplianceViolation$Listener)'
	at org.eclipse.jetty.server.Request.getCookies(Request.java:593)
	at org.eclipse.jetty.session.AbstractSessionManager.resolveRequestedSessionId(AbstractSessionManager.java:1228)
	at org.eclipse.jetty.ee10.servlet.SessionHandler.handle(SessionHandler.java:690)
	at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:761)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:151)
	at org.eclipse.jetty.server.Server.handle(Server.java:179)
	at org.eclipse.jetty.server.internal.HttpChannelState$HandlerInvoker.run(HttpChannelState.java:594)
	at org.eclipse.jetty.server.internal.HttpConnection.onFillable(HttpConnection.java:424)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:322)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:99)
	at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:478)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:441)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:293)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.produce(AdaptiveExecutionStrategy.java:195)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:971)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1201)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1156)
	at java.base/java.lang.Thread.run(Thread.java:1583)
DEBUG o.e.j.server.internal.HttpConnection - HttpConnection@325d2d45::SocketChannelEndPoint@3c9ad4a6[{l=/127.0.0.1:8080,r=/127.0.0.1:55846,OPEN,fill=-,flush=-,to=2/60000}{io=0/0,kio=0,kro=1}]->[HttpConnection@325d2d45[p=HttpParser{s=CONTENT,0 of -1},g=HttpGenerator@7360277e{s=START}]=>HttpChannelState@19b5e250{handling=Thread[#36,qtp1940407755-36,5,main], handled=false, send=SENDING, completed=false, request=GET@0 http://localhost:8080/ HTTP/1.1}] parse null

@gregw
Copy link
Contributor

gregw commented Mar 12, 2024

Whilst we don't expect anybody to use that class, we should not have changed a public API in a dot release.
We'll put it back deprecated, so things at least compile, but the Listener will probably be ignored.

@stbischof
Copy link
Author

Thank you. Also for information about usage if this constructor.

The constructor is really not important for me and i see why you did this change. But when a dot Release will break your dependabot ci job because of a java.lang.NoSuchMethodError this is a bit surprise.

@gregw gregw assigned gregw and unassigned joakime Mar 12, 2024
gregw added a commit that referenced this issue Mar 12, 2024
Fix #11509 by restoring removed constructor as deprecated
@gregw
Copy link
Contributor

gregw commented Mar 12, 2024

I've created a PR. This class definitely has some bigger changes coming... in fact the whole class will be deprecated and marked for removal when #11451 lands, potentially for the next release. But the class will remain, with the restored constructor, for a few more releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
No open projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants