Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Godin committed May 10, 2023
1 parent f9dfa07 commit 0b7cf75
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@
public class SafetySlotTest {

@Test
public void original() throws Exception {
public void jvm_should_verify_original_class_without_errors()
throws Exception {
final byte[] original = createClass();

new TargetLoader().add("Sample", original).newInstance();
}

@Test
public void instrumented() throws Exception {
public void jvm_should_verify_instrumented_class_without_errors()
throws Exception {
final IRuntime runtime = new SystemPropertiesRuntime();
runtime.startup(new RuntimeData());

Expand All @@ -46,7 +48,7 @@ public void instrumented() throws Exception {
new TargetLoader().add("Sample", instrumented).newInstance();
}

private static byte[] createClass() throws Exception {
private static byte[] createClass() {
final ClassWriter writer = new ClassWriter(0);
writer.visit(bytecodeVersion(), Opcodes.ACC_PUBLIC, "Sample", null,
"java/lang/Object", new String[0]);
Expand Down

0 comments on commit 0b7cf75

Please sign in to comment.