Skip to content

Commit 6a1bc8f

Browse files
authored
Merge pull request #183 from uarlouski/chore-status-getter
chores: Move set operation out of getter
2 parents 0a0275a + 403d3d9 commit 6a1bc8f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main/java/de/sstoehr/harreader/model/HarResponse.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class HarResponse {
2222

2323
protected static final Long DEFAULT_SIZE = -1L;
2424

25-
private HttpStatus parsedStatus;
25+
private HttpStatus parsedStatus = HttpStatus.UNKNOWN_HTTP_STATUS;
2626
private int status = HttpStatus.UNKNOWN_HTTP_STATUS.getCode();
2727
private String statusText;
2828
private String httpVersion;
@@ -39,9 +39,6 @@ public class HarResponse {
3939
* @return Response status, 0 if not present or unknown.
4040
*/
4141
public int getStatus() {
42-
if (parsedStatus == null) {
43-
parsedStatus = HttpStatus.UNKNOWN_HTTP_STATUS;
44-
}
4542
return parsedStatus.getCode();
4643
}
4744

0 commit comments

Comments
 (0)