File tree Expand file tree Collapse file tree
src/main/java/com/antithesis/ffi/internal
sdk/src/test/java/com/antithesis/sdk/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,6 +23,6 @@ The antithesis SDK for Java will expect the following
2323at runtime. Minimum versions are shown and later versions
2424should work.
2525
26- antithesis-ffi 1.4.2 (or above)
26+ antithesis-ffi 1.4.0 (or above)
2727 jackson 2.2.3 (or above)
2828
Original file line number Diff line number Diff line change 11package com .antithesis .ffi .internal ;
22
3- import java .nio .charset .StandardCharsets ;
43import java .util .Optional ;
54
65public class FfiHandler implements OutputHandler {
@@ -34,9 +33,7 @@ public static void notifyModuleEdge(long edgePlusModule) {
3433
3534 @ Override
3635 public void output (final String value ) {
37- // `fuzz_json_data` expects length in UTF-8 encoded bytes.
38- byte [] utf8Bytes = value .getBytes (StandardCharsets .UTF_8 );
39- FfiWrapperJNI .fuzz_json_data (utf8Bytes , utf8Bytes .length );
36+ FfiWrapperJNI .fuzz_json_data (value , value .length ());
4037 FfiWrapperJNI .fuzz_flush ();
4138 }
4239
Original file line number Diff line number Diff line change 11%module FfiWrapper
22
3- %include " various.i"
4- %apply char *BYTE { const char * message }
53%{
64#include < stddef.h>
75#include < stdint.h>
Original file line number Diff line number Diff line change 11org.gradle.java.installations.auto-download =false
2- version = 1.4.2
2+ version = 1.4.1
33com.antithesis.sdk.protocol = 1.1.0
Original file line number Diff line number Diff line change 99import static org .junit .jupiter .api .Assertions .fail ;
1010import static org .junit .jupiter .api .Assumptions .assumeTrue ;
1111
12- import java .nio .charset .StandardCharsets ;
13-
1412public class InstrumentationTest {
1513 @ Test
1614 void testRandom () {
@@ -32,8 +30,7 @@ void testJsonData() {
3230 } catch (JsonProcessingException e ) {
3331 fail (e .getMessage ());
3432 }
35- byte [] utf8Bytes = theString .getBytes (StandardCharsets .UTF_8 );
36- FfiWrapperJNI .fuzz_json_data (utf8Bytes , utf8Bytes .length );
33+ FfiWrapperJNI .fuzz_json_data (theString , theString .length ());
3734 }
3835
3936 @ Test
You can’t perform that action at this time.
0 commit comments