-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[java] remove unused code from ErrorHandler #14195
base: trunk
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
CI Failure Feedback 🧐(Checks updated until commit 6255037)
✨ CI feedback usage guide:The CI feedback tool (
In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:
where Configuration options
See more information about the |
With this change, what happens to the stacktraces that are sent from the remote end? The |
@shs96c i do not think decoding of stacktraces is working at all:
Therefore i think it is safe to remove this code. |
User description
Description
Therefore this PR does:
ErrorHandler
and the related unit testsErrorHandler
to decode an errorLet's see what the tests in the CI look like with this change :D
(And we should propably ask some of the Appium people too.)
Motivation and Context
@diemol From the current structure of the code i would assume:
The
...ResponseCodec
should be able to decode aHttpResponse
into aResponse
with the knowledge of the protocol.The
ErrorHandler
should only work with thisResponse
regardless of the used protocol and not try to guess what theHttpResponse
could be.In the time before the W3C protocol the
ErrorHandler
was propably responsible for decoding, but this code should be unused now.Types of changes
Checklist
PR Type
Enhancement, Tests
Description
ErrorHandler
class by removing unused code, constructors, and methods.W3CHttpResponseCodec
to handle gateway errors by settingWebDriverException
.ErrorHandlerTest
to align with the newErrorHandler
implementation.ErrorHandler
.Changes walkthrough 📝
ErrorHandler.java
Simplified ErrorHandler class by removing unused code.
java/src/org/openqa/selenium/remote/ErrorHandler.java
ErrorHandler
class by removing redundant methods andconstructors.
WebDriverException
directly.W3CHttpResponseCodec.java
Updated W3CHttpResponseCodec error handling.
java/src/org/openqa/selenium/remote/codec/w3c/W3CHttpResponseCodec.java
WebDriverException
for gateway errors.ErrorHandlerTest.java
Simplified ErrorHandler tests.
java/test/org/openqa/selenium/remote/ErrorHandlerTest.java
ErrorHandler
.ErrorHandler
implementation.
RemotableByTest.java
Updated RemotableByTest for new ErrorHandler implementation.
java/test/org/openqa/selenium/remote/RemotableByTest.java
ErrorHandler
implementation.
RemoteWebDriverUnitTest.java
Updated RemoteWebDriverUnitTest for new ErrorHandler messages.
java/test/org/openqa/selenium/remote/RemoteWebDriverUnitTest.java
ErrorHandler
.RemoteWebElementTest.java
Updated RemoteWebElementTest for new ErrorHandler messages.
java/test/org/openqa/selenium/remote/RemoteWebElementTest.java
ErrorHandler
.W3CHttpResponseCodecTest.java
Updated W3CHttpResponseCodecTest for new error handling.
java/test/org/openqa/selenium/remote/codec/w3c/W3CHttpResponseCodecTest.java
WebDriverException
instances.