Skip to content

Commit 33ab34a

Browse files
v0.0.2 - Move SimpleHttpResponse to its own file & Fix warning
1 parent 583f89e commit 33ab34a

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.github.lightlibs</groupId>
88
<artifactId>SimpleHttpWrapper</artifactId>
9-
<version>0.0.1</version>
9+
<version>0.0.2</version>
1010

1111
<build>
1212
<plugins>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package com.github.lightlibs.simplehttpwrapper;
2+
3+
public record SimpleHttpResponse(int statusCode, String data) {}

src/main/java/com/github/lightlibs/simplehttpwrapper/SimpleHttpWrapper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ private static SimpleHttpResponse httpRequest(@NotNull String method, String url
3535

3636
if (headers != null) {
3737
for (String headerEntry : headers) {
38+
if (headerEntry == null) continue;
39+
3840
String[] parts = headerEntry.split(":");
3941
if (parts.length != 2) continue;
4042

@@ -71,6 +73,4 @@ private static SimpleHttpResponse httpRequest(@NotNull String method, String url
7173
return new SimpleHttpResponse(responseCode, strb.toString());
7274
}
7375

74-
public record SimpleHttpResponse(int statusCode, String data) {}
75-
7676
}

0 commit comments

Comments
 (0)