Fix 2 NPEs

Former-commit-id: fb9a2e5e4592904dc2fad20650e4cfd5a9fbdcd2 [formerly 017e93c41b672c20ba040948b3feaece0ca64e33]
Former-commit-id: 63c6f57c75d4d9e6afaa1b8e2956705d7d22470f
This commit is contained in:
Ghost_chu committed 2019-06-14 19:36:04 +08:00
1 parent 9678d1ce12
commit fc585bfc45
2 files changed
+4 -2

No files matched your search

@@ -1106,7 +1106,7 @@ public class Util {
* @param strArray Target array
* @return str
*/
public static String array2String(String[] strArray) {
public static String array2String(@NotNull String[] strArray) {
StringBuilder builder = new StringBuilder();
for (int i = 0; i < strArray.length; i++) {
builder.append(strArray[i]);
@@ -1123,7 +1123,7 @@ public class Util {
* @param strList Target list
* @return str
*/
public static String list2String(List<String> strList) {
public static String list2String(@NotNull List<String> strList) {
StringBuilder builder = new StringBuilder();
for (int i = 0; i < strList.size(); i++) {
builder.append(strList.get(i));
@@ -35,6 +35,8 @@ public class LogWatcher implements Runnable {
new BukkitRunnable() {
public void run() {
for (String log : logs) {
if (ps == null)
continue;
ps.print(log);
}
logs.clear();