提交 bb15c17f 编写于 作者: X xuelei

8000954: Add final keyword to new method in SSLParameters

Reviewed-by: wetmore
上级 c93b0dda
...@@ -291,7 +291,7 @@ public class SSLParameters { ...@@ -291,7 +291,7 @@ public class SSLParameters {
* *
* @since 1.8 * @since 1.8
*/ */
public void setServerNames(List<SNIServerName> serverNames) { public final void setServerNames(List<SNIServerName> serverNames) {
if (serverNames != null) { if (serverNames != null) {
if (!serverNames.isEmpty()) { if (!serverNames.isEmpty()) {
sniNames = new LinkedHashMap<>(serverNames.size()); sniNames = new LinkedHashMap<>(serverNames.size());
...@@ -349,7 +349,7 @@ public class SSLParameters { ...@@ -349,7 +349,7 @@ public class SSLParameters {
* *
* @since 1.8 * @since 1.8
*/ */
public List<SNIServerName> getServerNames() { public final List<SNIServerName> getServerNames() {
if (sniNames != null) { if (sniNames != null) {
if (!sniNames.isEmpty()) { if (!sniNames.isEmpty()) {
return Collections.<SNIServerName>unmodifiableList( return Collections.<SNIServerName>unmodifiableList(
...@@ -386,7 +386,7 @@ public class SSLParameters { ...@@ -386,7 +386,7 @@ public class SSLParameters {
* *
* @since 1.8 * @since 1.8
*/ */
public void setSNIMatchers(Collection<SNIMatcher> matchers) { public final void setSNIMatchers(Collection<SNIMatcher> matchers) {
if (matchers != null) { if (matchers != null) {
if (!matchers.isEmpty()) { if (!matchers.isEmpty()) {
sniMatchers = new HashMap<>(matchers.size()); sniMatchers = new HashMap<>(matchers.size());
...@@ -424,7 +424,7 @@ public class SSLParameters { ...@@ -424,7 +424,7 @@ public class SSLParameters {
* *
* @since 1.8 * @since 1.8
*/ */
public Collection<SNIMatcher> getSNIMatchers() { public final Collection<SNIMatcher> getSNIMatchers() {
if (sniMatchers != null) { if (sniMatchers != null) {
if (!sniMatchers.isEmpty()) { if (!sniMatchers.isEmpty()) {
return Collections.<SNIMatcher>unmodifiableList( return Collections.<SNIMatcher>unmodifiableList(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册