Skip to content

Commit 86a0ebb

Browse files
committed
Typo
1 parent 2453791 commit 86a0ebb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

java_runtime/src/classes/java/io/byte_array_output_stream.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ impl ByteArrayOutputStream {
1818
JavaMethodProto::new("<init>", "()V", Self::init, Default::default()),
1919
JavaMethodProto::new("<init>", "(I)V", Self::init_with_size, Default::default()),
2020
JavaMethodProto::new("write", "(I)V", Self::write, Default::default()),
21+
JavaMethodProto::new("writeByte", "(I)V", Self::write_byte, Default::default()),
2122
JavaMethodProto::new("toByteArray", "()[B", Self::to_byte_array, Default::default()),
2223
JavaMethodProto::new("close", "()V", Self::close, Default::default()),
2324
],

java_runtime/src/classes/java/io/data_output_stream.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ impl DataOutputStream {
6464
async fn write_boolean(jvm: &Jvm, _: &mut RuntimeContext, this: ClassInstanceRef<Self>, v: bool) -> Result<()> {
6565
tracing::debug!("java.io.DataOutputStream::writeBoolean({this:?}, {v:?})");
6666

67-
let out = jvm.get_field(&this, "out", "Ljava/io/OutputStream;").await?;
68-
let _: () = jvm.invoke_virtual(&out, "writeByte", "(I)V", (v as i32,)).await?;
67+
let _: () = jvm.invoke_virtual(&this, "writeByte", "(I)V", (v as i32,)).await?;
6968

7069
Ok(())
7170
}

0 commit comments

Comments
 (0)