diff --git a/spring-web/src/test/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverterTests.java index b06544ac23..da5dcd4281 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverterTests.java @@ -62,7 +62,7 @@ import static org.mockito.Mockito.verify; */ public class MappingJackson2HttpMessageConverterTests { - protected static final String NEWLINE_SYSTEM_PROPERTY = System.getProperty("line.separator"); + protected static final String NEWLINE_SYSTEM_PROPERTY = System.lineSeparator(); private final MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(); diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandlerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandlerTests.java index 00998c0dd2..42161e7e0c 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandlerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandlerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -80,7 +80,7 @@ import static org.springframework.web.testfixture.method.ResolvableMethod.on; */ public class ResponseEntityResultHandlerTests { - private static final String NEWLINE_SYSTEM_PROPERTY = System.getProperty("line.separator"); + private static final String NEWLINE_SYSTEM_PROPERTY = System.lineSeparator(); private ResponseEntityResultHandler resultHandler; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorTests.java index 75d1217408..b5f128d64a 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -87,7 +87,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException @SuppressWarnings("unused") public class RequestResponseBodyMethodProcessorTests { - protected static final String NEWLINE_SYSTEM_PROPERTY = System.getProperty("line.separator"); + protected static final String NEWLINE_SYSTEM_PROPERTY = System.lineSeparator(); private ModelAndViewContainer container;