Created
March 1, 2021 14:24
-
-
Save wfng92/0e8f52bdb805aa9f7f1bfc3e216de320 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
public class TestJava { | |
private String[] arrString; | |
public void BadCode() { | |
int length = 1; | |
if (length == 0) { | |
// TODO: handle this case | |
} | |
} | |
public void DodgyCode() { | |
Number[] arr = new Integer[10]; | |
arr[0] = 1.0; | |
} | |
public void maliciousCode(String[] stringArg) { | |
arrString = stringArg; | |
// arrString = Arrays.copyOf(stringArg, stringArg.length); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment