Skip to content

Commit a55261f

Browse files
committed
Polishing
1 parent 5ca2c56 commit a55261f

File tree

2 files changed

+9
-8
lines changed
  • spring-webmvc/src/main/java/org/springframework/web/servlet/tags
  • spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client

2 files changed

+9
-8
lines changed

spring-webmvc/src/main/java/org/springframework/web/servlet/tags/UrlTag.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public class UrlTag extends HtmlEscapingAwareTag implements ParamAware {
166166

167167

168168
/**
169-
* Sets the value of the URL.
169+
* Set the value of the URL.
170170
*/
171171
public void setValue(String value) {
172172
if (value.contains(URL_TYPE_ABSOLUTE)) {
@@ -184,7 +184,8 @@ else if (value.startsWith("/")) {
184184
}
185185

186186
/**
187-
* Set the context path for the URL. Defaults to the current context
187+
* Set the context path for the URL.
188+
* Defaults to the current context.
188189
*/
189190
public void setContext(String context) {
190191
if (context.startsWith("/")) {
@@ -204,8 +205,8 @@ public void setVar(String var) {
204205
}
205206

206207
/**
207-
* Set the scope to export the URL variable to. This attribute has no
208-
* meaning unless var is also defined.
208+
* Set the scope to export the URL variable to.
209+
* This attribute has no meaning unless {@code var} is also defined.
209210
*/
210211
public void setScope(String scope) {
211212
this.scope = TagUtils.getScope(scope);
@@ -375,7 +376,7 @@ protected String replaceUriTemplateParams(String uri, List<Param> params, Set<St
375376
String value = param.getValue();
376377
try {
377378
uri = uri.replace(template,
378-
(value != null ? UriUtils.encodePathSegment(param.getValue(), encoding) : ""));
379+
(value != null ? UriUtils.encodePathSegment(value, encoding) : ""));
379380
}
380381
catch (UnsupportedCharsetException ex) {
381382
throw new JspException(ex);

spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/SockJsUrlInfo.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2018 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.
@@ -27,8 +27,8 @@
2727

2828
/**
2929
* Container for the base URL of a SockJS endpoint with additional helper methods
30-
* to derive related SockJS URLs as the {@link #getInfoUrl() info} URL and
31-
* {@link #getTransportUrl(TransportType) transport} URLs.
30+
* to derive related SockJS URLs: specifically, the {@link #getInfoUrl() info}
31+
* and {@link #getTransportUrl(TransportType) transport} URLs.
3232
*
3333
* @author Rossen Stoyanchev
3434
* @since 4.1

0 commit comments

Comments
 (0)