{"task": {"agent_timeout": 3000, "task": "testgen__fasterxml__jackson-databind-3701", "verifier_timeout": 3000, "instruction": "The following text contains a user issue (in <issue/> brackets) posted at a repository. Further, you are provided with file contents of several files in the repository that contain relevant code (in <code> brackets). It may be necessary to use code from third party dependencies or files not contained in the attached documents however. Your task is to identify the issue and implement a test case that verifies a proposed solution to this issue. More details at the end of this text.\n<issue>\n      **Is your feature request related to a problem? Please describe.**\n`com.fasterxml.jackson.databind.ObjectReader#readValue(JsonNode)` currently only works with `JsonNode` implementations from the `jackson-databind` module. It does not work with custom `JsonNode` implementations. We have a use case where we would like to use custom `JsonNode` implementations.\n\n**Describe the solution you'd like**\n`com.fasterxml.jackson.databind.ObjectReader#readValue(JsonNode)` should work with any  `JsonNode` implementation. The reason this currently does not work is because `ObjectCursor` currently casts to `ObjectNode`\n\nhttps://github.com/FasterXML/jackson-databind/blob/9e3a3113efa918601797c423d981e4f6ddd49a49/src/main/java/com/fasterxml/jackson/databind/node/NodeCursor.java#L198 \n\nThere is no need for this as `#fields()` is defined on `JsonNode`. `ArrayCursor` for example does not cast to `ArrayNode` and just calls `JsonNode#elements()`.\n\n**Usage example**\n```java\nJsonNode jsonNode = new CustomObjectNode();\n\nthis.objectMapper.readerFor(Custom.class).readValue(jsonNode);\n```\n\n**Additional context**\nOn our project we settled on Jackson and jackson-databind for our JSON parsing and object mapping needs. So far this has worked well for us. We also store JSON in the database as LOBs. Our database vendor has introduced a native JSON datatype. Part of this is a custom binary format to send JSON preparsed over the wire to the driver. The driver can use this format directly without the need to serialize to text first. The driver exposes this as `javax.json.JsonObject` objects to our code.\n\nWe are experimenting with [adapting](https://github.com/marschall/jackson-jaxp-bridge/blob/master/src/main/java/com/github/marschall/jacksonjaxpbridge/JsonObjectNode.java) `javax.json.JsonObject` to `com.fasterxml.jackson.databind.JsonNode`. This would give us the efficiency of being able to use the driver to parse the database internal format while still being able to use jackson-databind for the mapping.\n\nSimply removing the cast seems to do the trick. An additional check could be introduced, on the other hand `ArrayCursor` has no such check.\n\nhttps://github.com/marschall/jackson-databind/commit/1209c8480503ad578871136366c72b9b6db5fcfe\n\n</issue>\nPlease generate test cases that check whether an implemented solution resolves the issue of the user (at the top, within <issue/> brackets).\nYou may apply changes to several files.\nApply as much reasoning as you please and see necessary.\nMake sure to implement only test cases and don't try to fix the issue itself.\nYou are not allowed to read git history.\n", "memory": "8192m", "runnable": false, "difficulty": "hard", "language": "", "cpus": "", "instruction_truncated": false, "category": "test-generation", "compose": false, "has_solution": true, "oracle": null, "docker_image": "", "taskset": "devopsgym", "tags": ["test-generation", "devops-bench"]}, "runs": []}