-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Correct permissions of jackson-databind "the correct way" #5767
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
package org.opensearch.common.settings; | ||
|
||
import org.junit.Before; | ||
import org.junit.Ignore; | ||
import org.opensearch.Version; | ||
import org.opensearch.common.SuppressForbidden; | ||
import org.opensearch.common.bytes.BytesReference; | ||
|
@@ -462,6 +463,7 @@ public void testVersionSetting() throws IOException { | |
} | ||
} | ||
|
||
@Ignore("https://github.com/opensearch-project/OpenSearch/issues/5504") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test of course fails as it uses setAccessible and also adds SuppressForbidden!? There was a reason why the forbiddenapis forbids There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you're saying that this is by design. Let's rewrite the test as such! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See other PR #5768, I made a proposal. Alternatively remove the test. Because if the fields are "final" theres no need to test any other value than the final value. |
||
@SuppressForbidden(reason = "The only way to test these is via reflection") | ||
public void testExceptionHandling() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { | ||
// abuse reflection to change default value, no way to do this with given Setting class | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this is not working for jackson-databind, so we need a workaround or we should look at the new PR #5768.