|
1 | 1 | /*
|
2 |
| - * Copyright 2012-2018 the original author or authors. |
| 2 | + * Copyright 2012-2019 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
@@ -560,7 +560,7 @@ public void nonExistentUploadDirectoryIsCreatedUponMultipartUpload()
|
560 | 560 | throws IOException, URISyntaxException {
|
561 | 561 | TomcatEmbeddedServletContainerFactory factory = new TomcatEmbeddedServletContainerFactory(
|
562 | 562 | 0);
|
563 |
| - AtomicReference<ServletContext> servletContextReference = new AtomicReference<>(); |
| 563 | + final AtomicReference<ServletContext> servletContextReference = new AtomicReference<ServletContext>(); |
564 | 564 | factory.addInitializers(new ServletContextInitializer() {
|
565 | 565 |
|
566 | 566 | @Override
|
@@ -588,11 +588,11 @@ protected void doPost(HttpServletRequest req,
|
588 | 588 | FileSystemUtils.deleteRecursively(temp);
|
589 | 589 | RestTemplate restTemplate = new RestTemplate();
|
590 | 590 | HttpHeaders headers = new HttpHeaders();
|
591 |
| - MultiValueMap<String, Object> body = new LinkedMultiValueMap<>(); |
| 591 | + MultiValueMap<String, Object> body = new LinkedMultiValueMap<String, Object>(); |
592 | 592 | body.add("file", new ByteArrayResource(new byte[1024 * 1024]));
|
593 | 593 | headers.setContentType(MediaType.MULTIPART_FORM_DATA);
|
594 |
| - HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(body, |
595 |
| - headers); |
| 594 | + HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<MultiValueMap<String, Object>>( |
| 595 | + body, headers); |
596 | 596 | ResponseEntity<String> response = restTemplate
|
597 | 597 | .postForEntity(getLocalUrl("/upload"), requestEntity, String.class);
|
598 | 598 | assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK);
|
|
0 commit comments