mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-08 20:01:20 +01:00
Fixes NullPointerException at parse by checking if the line is null instead of checking if the line is empty
This commit is contained in:
parent
cf721a84a1
commit
7e03c1dcc0
@ -1,13 +1,10 @@
|
|||||||
package main.java.com.djrapitops.plan.ui.webserver;
|
package main.java.com.djrapitops.plan.ui.webserver;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import main.java.com.djrapitops.plan.Log;
|
||||||
import java.io.Closeable;
|
|
||||||
import java.io.IOException;
|
import java.io.*;
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import main.java.com.djrapitops.plan.Log;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a HTTP Request.
|
* Represents a HTTP Request.
|
||||||
@ -57,7 +54,7 @@ public class Request implements Closeable {
|
|||||||
BufferedReader in = new BufferedReader(new InputStreamReader(input));
|
BufferedReader in = new BufferedReader(new InputStreamReader(input));
|
||||||
close = in;
|
close = in;
|
||||||
String line;
|
String line;
|
||||||
while (!(line = in.readLine()).isEmpty()) {
|
while ((line = in.readLine()) != null) {
|
||||||
headerB.append(line);
|
headerB.append(line);
|
||||||
headerB.append(":::");
|
headerB.append(":::");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user