diff --git a/core/src/main/java/pl/wmsdev/usos4j/api/progs/UsosProgsAPI.java b/core/src/main/java/pl/wmsdev/usos4j/api/progs/UsosProgsAPI.java index bdca68f..8281115 100644 --- a/core/src/main/java/pl/wmsdev/usos4j/api/progs/UsosProgsAPI.java +++ b/core/src/main/java/pl/wmsdev/usos4j/api/progs/UsosProgsAPI.java @@ -50,12 +50,11 @@ public UsosStage stage(UsosStageParam params) { UsosStage.class); } - @SuppressWarnings("unchecked") public List student() { - return requestWithAccessToken(requestFactory.get( + return List.of(requestWithAccessToken(requestFactory.get( "services/progs/student", FieldSelector.fromRequest(UsosStudentProgramme.class)), - List.class); + UsosStudentProgramme[].class)); } public UsosStudentProgramme studentProgramme(UsosStudentProgrammeParam params) { diff --git a/integration-tests/src/test/java/pl/wmsdev/UsosProgsAPITest.java b/integration-tests/src/test/java/pl/wmsdev/UsosProgsAPITest.java index 0bf8267..e1a936c 100644 --- a/integration-tests/src/test/java/pl/wmsdev/UsosProgsAPITest.java +++ b/integration-tests/src/test/java/pl/wmsdev/UsosProgsAPITest.java @@ -45,6 +45,7 @@ void stage() { @Test void student() { log(userApi.progs().student()); + log(userApi.progs().student().get(0).programme().id()); } @Test