Skip to content

Commit 5785abd

Browse files
committed
Revert "NullPointerException in HopsworksHttpClient (logicalclocks#352)"
This reverts commit fb4dd2b.
1 parent 87cedb1 commit 5785abd

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

java/hsfs/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksHttpClient.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,12 @@
2222
import org.apache.http.HttpRequest;
2323
import org.apache.http.client.ResponseHandler;
2424
import org.slf4j.Logger;
25-
import org.slf4j.LoggerFactory;
2625

2726
import java.io.File;
2827
import java.io.IOException;
29-
import java.nio.charset.Charset;
3028

3129
public interface HopsworksHttpClient {
32-
Logger LOGGER = LoggerFactory.getLogger(HopsworksHttpClient.class);
30+
static final Logger LOGGER = null;
3331

3432
<T> T handleRequest(HttpRequest request, ResponseHandler<T> responseHandler)
3533
throws IOException, FeatureStoreException;
@@ -48,7 +46,7 @@ <T> T handleRequest(HttpRequest request, ResponseHandler<T> responseHandler)
4846

4947
static String readCertKey(String materialPwd) {
5048
try {
51-
return FileUtils.readFileToString(new File(materialPwd), Charset.defaultCharset());
49+
return FileUtils.readFileToString(new File(materialPwd));
5250
} catch (IOException ex) {
5351
LOGGER.warn("Failed to get cert password.", ex);
5452
}

java/hsfs/src/test/java/com/logicalclocks/hsfs/metadata/TestHopsworksClient.java

-8
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,4 @@ public void testStringEntitySerialization() throws IOException {
4646
Assertions.assertEquals("{\"email\":\"test@test.com\",\"firstName\":\"test\",\"lastName\":\"de la Rúa Martínez\"}",
4747
json);
4848
}
49-
50-
// FSTORE-1562: readCertKey throws NullPointerException if
51-
@Test
52-
public void testReadCertKey_failure() {
53-
String key = HopsworksHttpClient.readCertKey("/this/path/does/not/exists");
54-
Assertions.assertNull(key);
55-
}
56-
5749
}

0 commit comments

Comments
 (0)