-
Notifications
You must be signed in to change notification settings - Fork 145
Closed
Description
Expected behavior
When called with a Stream.class as second parameter, GraphClient.customRequest should return a Stream.
Actual behavior
GraphClient.customRequest returns a java.io.BufferedInputStream that causes a ClassCastException
Steps to reproduce the behavior
Use the very same code that is shown in the documentation.
String contentRequest = String.format(
"/drives/%s/items/%s/content",
DRIVE_ID,
ITEM_ID
);
Stream stream = graphClient.customRequest(contentRequest, Stream.class)
.buildRequest()
.get();When executing this code, I am getting a ClassCastException.
Exception in thread "main" java.lang.ClassCastException: java.io.BufferedInputStream cannot be cast to java.util.stream.Stream
at com.acmeinc.msgraph.TestSharepointAccess.getFile(TestSharepointAccess.java:249)
at com.acmeinc.msgraph.TestSharepointAccess.testSharepoint(TestSharepointAccess.java:90)
at Main.main(Main.java:27)
aaukhatov