File tree Expand file tree Collapse file tree
main/java/de/tum/cit/aet/core/web
test/java/de/tum/cit/aet/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package de .tum .cit .aet .core .web ;
22
3+ import de .tum .cit .aet .application .domain .Application ;
34import de .tum .cit .aet .core .domain .DocumentDictionary ;
45import de .tum .cit .aet .core .exception .AccessDeniedException ;
56import de .tum .cit .aet .core .service .CurrentUserService ;
@@ -63,7 +64,7 @@ public ResponseEntity<Resource> downloadDocument(@PathVariable UUID documentDict
6364 */
6465 private void verifyAccess (DocumentDictionary documentDictionary ) {
6566 if (documentDictionary .getApplication () != null ) {
66- var application = documentDictionary .getApplication ();
67+ Application application = documentDictionary .getApplication ();
6768 if (currentUserService .isProfessor () || currentUserService .isEmployee ()) {
6869 currentUserService .verifyJobAccess (application .getJob ());
6970 return ;
@@ -73,7 +74,7 @@ private void verifyAccess(DocumentDictionary documentDictionary) {
7374 }
7475
7576 if (documentDictionary .getCustomFieldAnswer () != null ) {
76- var application = documentDictionary .getCustomFieldAnswer ().getApplication ();
77+ Application application = documentDictionary .getCustomFieldAnswer ().getApplication ();
7778 if (currentUserService .isProfessor () || currentUserService .isEmployee ()) {
7879 currentUserService .verifyJobAccess (application .getJob ());
7980 return ;
Original file line number Diff line number Diff line change 1010import de .tum .cit .aet .core .config .UserRetentionProperties ;
1111import de .tum .cit .aet .core .constants .DocumentType ;
1212import de .tum .cit .aet .core .constants .Language ;
13+ import de .tum .cit .aet .core .domain .DocumentDictionary ;
1314import de .tum .cit .aet .core .domain .ProfileImage ;
1415import de .tum .cit .aet .core .repository .DocumentDictionaryRepository ;
1516import de .tum .cit .aet .core .repository .DocumentRepository ;
@@ -163,7 +164,7 @@ void setUp() {
163164 }
164165
165166 @ Test
166- void shouldDeleteApplicantAndAllAssociatedData () throws Exception {
167+ void shouldDeleteApplicantAndAllAssociatedData () {
167168 User professor = UserTestData .saveProfessor (researchGroup , userRepository );
168169 User savedApplicantUser = ApplicantTestData .saveApplicant ("applicant@test.local" , userRepository );
169170 UUID applicantId = savedApplicantUser .getUserId ();
@@ -186,7 +187,7 @@ void shouldDeleteApplicantAndAllAssociatedData() throws Exception {
186187 DocumentType .CV ,
187188 "cv.pdf"
188189 );
189- var applicantProfileDictionary = DocumentTestData .savedDictionaryWithMockDocument (
190+ DocumentDictionary applicantProfileDictionary = DocumentTestData .savedDictionaryWithMockDocument (
190191 documentRepository ,
191192 documentDictionaryRepository ,
192193 savedApplicantUser ,
Original file line number Diff line number Diff line change 3030import java .util .Map ;
3131import java .util .Set ;
3232import java .util .UUID ;
33+ import java .util .stream .Stream ;
3334import java .util .zip .ZipEntry ;
3435import java .util .zip .ZipInputStream ;
3536import org .junit .jupiter .api .BeforeEach ;
@@ -183,7 +184,7 @@ void pendingExportIsProcessedAndZipCreated() throws Exception {
183184 }
184185
185186 @ Test
186- void downloadRequiresAuthenticationAndUpdatesStatus () throws Exception {
187+ void downloadRequiresAuthenticationAndUpdatesStatus () {
187188 User user = savedUser ("download-user@tum.de" );
188189
189190 DataExportRequest request = new DataExportRequest ();
@@ -300,7 +301,7 @@ private User savedUser(String email) {
300301 private void cleanExportRoot () {
301302 Path root = Paths .get (exportRootConfig ).toAbsolutePath ().normalize ();
302303 if (Files .exists (root )) {
303- try (var stream = Files .walk (root )) {
304+ try (Stream < Path > stream = Files .walk (root )) {
304305 stream
305306 .sorted (Comparator .reverseOrder ())
306307 .forEach (path -> {
You can’t perform that action at this time.
0 commit comments