Skip to content

Commit 3cf2c04

Browse files
committed
URL Cleanup - polishing
See gh-22680
1 parent c90b6ea commit 3cf2c04

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

spring-core/src/test/java/org/springframework/util/xml/SimpleNamespaceContextTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -50,7 +50,7 @@ public void getNamespaceURI_withNull() throws Exception {
5050
@Test
5151
public void getNamespaceURI() {
5252
context.bindNamespaceUri(XMLConstants.XMLNS_ATTRIBUTE, additionalNamespaceUri);
53-
assertThat("Always returns \"https://www.w3.org/2000/xmlns/\" for \"xmlns\"",
53+
assertThat("Always returns \"http://www.w3.org/2000/xmlns/\" for \"xmlns\"",
5454
context.getNamespaceURI(XMLConstants.XMLNS_ATTRIBUTE), is(XMLConstants.XMLNS_ATTRIBUTE_NS_URI));
5555
context.bindNamespaceUri(XMLConstants.XML_NS_PREFIX, additionalNamespaceUri);
5656
assertThat("Always returns \"http://www.w3.org/XML/1998/namespace\" for \"xml\"",
@@ -76,7 +76,7 @@ public void getPrefix_withNull() throws Exception {
7676

7777
@Test
7878
public void getPrefix() {
79-
assertThat("Always returns \"xmlns\" for \"https://www.w3.org/2000/xmlns/\"",
79+
assertThat("Always returns \"xmlns\" for \"http://www.w3.org/2000/xmlns/\"",
8080
context.getPrefix(XMLConstants.XMLNS_ATTRIBUTE_NS_URI), is(XMLConstants.XMLNS_ATTRIBUTE));
8181
assertThat("Always returns \"xml\" for \"http://www.w3.org/XML/1998/namespace\"",
8282
context.getPrefix(XMLConstants.XML_NS_URI), is(XMLConstants.XML_NS_PREFIX));
@@ -103,7 +103,7 @@ public void getPrefixes_IteratorIsNotModifiable() throws Exception {
103103

104104
@Test
105105
public void getPrefixes() {
106-
assertThat("Returns only \"xmlns\" for \"https://www.w3.org/2000/xmlns/\"",
106+
assertThat("Returns only \"xmlns\" for \"http://www.w3.org/2000/xmlns/\"",
107107
getItemSet(context.getPrefixes(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)),
108108
is(makeSet(XMLConstants.XMLNS_ATTRIBUTE)));
109109
assertThat("Returns only \"xml\" for \"http://www.w3.org/XML/1998/namespace\"",

spring-test/src/main/java/org/springframework/test/web/servlet/htmlunit/HostRequestMatcher.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -43,7 +43,7 @@
4343
*
4444
* <pre class="code">WebRequestMatcher cdnMatcher = new HostMatcher("code.jquery.com:80");</pre>
4545
*
46-
* <p>The above {@code cdnMatcher} would match {@code "https://code.jquery.com/jquery.js"}
46+
* <p>The above {@code cdnMatcher} would match {@code "http://code.jquery.com/jquery.js"}
4747
* which has a default port of {@code 80} and {@code "http://code.jquery.com:80/jquery.js"}.
4848
* However, it would not match {@code "https://code.jquery.com/jquery.js"}
4949
* which has a default port of {@code 443}.

spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/HostRequestMatcherTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ public class HostRequestMatcherTests extends AbstractWebRequestMatcherTests {
3131
public void localhost() throws Exception {
3232
WebRequestMatcher matcher = new HostRequestMatcher("localhost");
3333
assertMatches(matcher, "http://localhost/jquery-1.11.0.min.js");
34-
assertDoesNotMatch(matcher, "https://example.com/jquery-1.11.0.min.js");
34+
assertDoesNotMatch(matcher, "http://example.com/jquery-1.11.0.min.js");
3535
}
3636

3737
@Test
3838
public void multipleHosts() throws Exception {
3939
WebRequestMatcher matcher = new HostRequestMatcher("localhost", "example.com");
4040
assertMatches(matcher, "http://localhost/jquery-1.11.0.min.js");
41-
assertMatches(matcher, "https://example.com/jquery-1.11.0.min.js");
41+
assertMatches(matcher, "http://example.com/jquery-1.11.0.min.js");
4242
}
4343

4444
@Test

spring-web/src/test/java/org/springframework/web/filter/ForwardedHeaderFilterTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ public void sendRedirectWithLocationHasScheme() throws Exception {
441441
this.request.addHeader(X_FORWARDED_HOST, "example.com");
442442
this.request.addHeader(X_FORWARDED_PORT, "443");
443443

444-
String location = "https://weibo.com/otherinfo/foo/bar";
444+
String location = "https://other.info/foo/bar";
445445
String redirectedUrl = sendRedirect(location);
446446
assertEquals(location, redirectedUrl);
447447
}

0 commit comments

Comments
 (0)