diff --git a/spring-oxm/src/test/java/org/springframework/oxm/AbstractMarshallerTests.java b/spring-oxm/src/test/java/org/springframework/oxm/AbstractMarshallerTests.java index dac51837633a4620e3949054c154044d46f6fb0d..715dd0b2106510b58afa26f0b73c0a72d4b2cee9 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/AbstractMarshallerTests.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/AbstractMarshallerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2010 the original author or authors. + * Copyright 2002-2019 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. @@ -74,7 +74,7 @@ public abstract class AbstractMarshallerTests { marshaller.marshal(flights, domResult); Document expected = builder.newDocument(); Element flightsElement = expected.createElementNS("http://samples.springframework.org/flight", "tns:flights"); - Attr namespace = expected.createAttributeNS("https://www.w3.org/2000/xmlns/", "xmlns:tns"); + Attr namespace = expected.createAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:tns"); namespace.setNodeValue("http://samples.springframework.org/flight"); flightsElement.setAttributeNode(namespace); expected.appendChild(flightsElement); @@ -98,7 +98,7 @@ public abstract class AbstractMarshallerTests { Document result = (Document) domResult.getNode(); Document expected = builder.newDocument(); Element flightsElement = expected.createElementNS("http://samples.springframework.org/flight", "tns:flights"); - Attr namespace = expected.createAttributeNS("https://www.w3.org/2000/xmlns/", "xmlns:tns"); + Attr namespace = expected.createAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:tns"); namespace.setNodeValue("http://samples.springframework.org/flight"); flightsElement.setAttributeNode(namespace); expected.appendChild(flightsElement); diff --git a/spring-oxm/src/test/java/org/springframework/oxm/castor/CastorMarshallerTests.java b/spring-oxm/src/test/java/org/springframework/oxm/castor/CastorMarshallerTests.java index ced9a0de8dd600db0ea568e49af9a47685ad44e7..85e310eb5e34f76781bfe1aeb7f84285c6245cfd 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/castor/CastorMarshallerTests.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/castor/CastorMarshallerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2019 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. @@ -79,7 +79,7 @@ public class CastorMarshallerTests extends AbstractMarshallerTests { */ private static final String XSI_EXPECTED_STRING = "" + "" + "test8"; @@ -94,7 +94,7 @@ public class CastorMarshallerTests extends AbstractMarshallerTests { */ private static final String ROOT_WITH_XSI_EXPECTED_STRING = "" + "" + "" + "test8"; @@ -104,7 +104,7 @@ public class CastorMarshallerTests extends AbstractMarshallerTests { */ private static final String ROOT_WITHOUT_XSI_EXPECTED_STRING = "" + "" + "test8"; diff --git a/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2UnmarshallerTests.java b/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2UnmarshallerTests.java index 01d7a03b2a60b16b8fea54fefb7e8d145fc1b3c2..1c812f8e5ae0bd69046aa1d52cf96b3d47d2863c 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2UnmarshallerTests.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2UnmarshallerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2019 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. @@ -77,9 +77,9 @@ public class Jaxb2UnmarshallerTests extends AbstractUnmarshallerTests { given(mimeContainer.getAttachment("<99bd1592-0521-41a2-9688-a8bfb40192fb@http://springframework.org/spring-ws>")).willReturn(dataHandler); given(mimeContainer.getAttachment("696cfb9a-4d2d-402f-bb5c-59fa69e7f0b3@spring-ws.png")).willReturn(dataHandler); String content = "" + "" + - "" + + "" + "" + "" + - "" + + "" + "" + "696cfb9a-4d2d-402f-bb5c-59fa69e7f0b3@spring-ws.png" + ""; diff --git a/spring-web/src/test/java/org/springframework/http/server/ServletServerHttpRequestTests.java b/spring-web/src/test/java/org/springframework/http/server/ServletServerHttpRequestTests.java index 05bce08de80d3f58e6432624377a386b7f428edd..6006bce5b2f46bc1abb4c8235dabff64ece9d44e 100644 --- a/spring-web/src/test/java/org/springframework/http/server/ServletServerHttpRequestTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/ServletServerHttpRequestTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2019 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. @@ -57,6 +57,7 @@ public class ServletServerHttpRequestTests { @Test public void getURI() throws Exception { URI uri = new URI("https://example.com/path?query"); + mockRequest.setScheme(uri.getScheme()); mockRequest.setServerName(uri.getHost()); mockRequest.setServerPort(uri.getPort()); mockRequest.setRequestURI(uri.getPath()); diff --git a/spring-web/src/test/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequestTests.java b/spring-web/src/test/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequestTests.java index a48110a7d499d5710aa26db3647e14811970ec9a..5a7ccff4f022813a27ac23379a5ada3c156258ce 100644 --- a/spring-web/src/test/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequestTests.java +++ b/spring-web/src/test/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequestTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2019 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. @@ -58,6 +58,7 @@ public class RequestPartServletServerHttpRequestTests { @Test public void getURI() throws Exception { URI uri = new URI("https://example.com/path?query"); + mockRequest.setScheme("https"); mockRequest.setServerName(uri.getHost()); mockRequest.setServerPort(uri.getPort()); mockRequest.setRequestURI(uri.getPath()); diff --git a/spring-web/src/test/java/org/springframework/web/util/UriComponentsBuilderTests.java b/spring-web/src/test/java/org/springframework/web/util/UriComponentsBuilderTests.java index 905ac07980234106374b3ed5afe3b855604a5f7a..e28195f37b8ea64f59a2804a4706741aaf240da6 100644 --- a/spring-web/src/test/java/org/springframework/web/util/UriComponentsBuilderTests.java +++ b/spring-web/src/test/java/org/springframework/web/util/UriComponentsBuilderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2019 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. @@ -41,8 +41,8 @@ public class UriComponentsBuilderTests { @Test public void plain() throws URISyntaxException { UriComponentsBuilder builder = UriComponentsBuilder.newInstance(); - UriComponents result = builder.scheme("http").host("example.com").path("foo").queryParam("bar").fragment("baz").build(); - assertEquals("http", result.getScheme()); + UriComponents result = builder.scheme("https").host("example.com").path("foo").queryParam("bar").fragment("baz").build(); + assertEquals("https", result.getScheme()); assertEquals("example.com", result.getHost()); assertEquals("foo", result.getPath()); assertEquals("bar", result.getQuery()); @@ -54,18 +54,18 @@ public class UriComponentsBuilderTests { @Test public void multipleFromSameBuilder() throws URISyntaxException { - UriComponentsBuilder builder = UriComponentsBuilder.newInstance().scheme("http").host("example.com").pathSegment("foo"); + UriComponentsBuilder builder = UriComponentsBuilder.newInstance().scheme("https").host("example.com").pathSegment("foo"); UriComponents result1 = builder.build(); builder = builder.pathSegment("foo2").queryParam("bar").fragment("baz"); UriComponents result2 = builder.build(); - assertEquals("http", result1.getScheme()); + assertEquals("https", result1.getScheme()); assertEquals("example.com", result1.getHost()); assertEquals("/foo", result1.getPath()); URI expected = new URI("https://example.com/foo"); assertEquals("Invalid result URI", expected, result1.toUri()); - assertEquals("http", result2.getScheme()); + assertEquals("https", result2.getScheme()); assertEquals("example.com", result2.getHost()); assertEquals("/foo/foo2", result2.getPath()); assertEquals("bar", result2.getQuery()); @@ -97,7 +97,7 @@ public class UriComponentsBuilderTests { public void fromHierarchicalUri() throws URISyntaxException { URI uri = new URI("https://example.com/foo?bar#baz"); UriComponents result = UriComponentsBuilder.fromUri(uri).build(); - assertEquals("http", result.getScheme()); + assertEquals("https", result.getScheme()); assertEquals("example.com", result.getHost()); assertEquals("/foo", result.getPath()); assertEquals("bar", result.getQuery()); @@ -131,7 +131,7 @@ public class UriComponentsBuilderTests { @Test public void fromUriString() { UriComponents result = UriComponentsBuilder.fromUriString("https://www.ietf.org/rfc/rfc3986.txt").build(); - assertEquals("http", result.getScheme()); + assertEquals("https", result.getScheme()); assertNull(result.getUserInfo()); assertEquals("www.ietf.org", result.getHost()); assertEquals(-1, result.getPort()); @@ -143,7 +143,7 @@ public class UriComponentsBuilderTests { result = UriComponentsBuilder.fromUriString( "https://arjen:foobar@java.sun.com:80/javase/6/docs/api/java/util/BitSet.html?foo=bar#and(java.util.BitSet)") .build(); - assertEquals("http", result.getScheme()); + assertEquals("https", result.getScheme()); assertEquals("arjen:foobar", result.getUserInfo()); assertEquals("java.sun.com", result.getHost()); assertEquals(80, result.getPort()); diff --git a/spring-web/src/test/java/org/springframework/web/util/WebUtilsTests.java b/spring-web/src/test/java/org/springframework/web/util/WebUtilsTests.java index 8e4d15b01907c8d1985e5712174e135b569444e9..3ba3da6ce6a139605839359047c6a81a5210f4b8 100644 --- a/spring-web/src/test/java/org/springframework/web/util/WebUtilsTests.java +++ b/spring-web/src/test/java/org/springframework/web/util/WebUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2019 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.