8299437: Make InetSocketAddressHolder shallowly immutable
Reviewed-by: djelinski, jpai, alanb
This commit is contained in:
parent
8afd665bf9
commit
a9ce7726a7
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -53,13 +53,13 @@ public class InetSocketAddress
|
||||
extends SocketAddress
|
||||
{
|
||||
// Private implementation class pointed to by all public methods.
|
||||
private static class InetSocketAddressHolder {
|
||||
private static final class InetSocketAddressHolder {
|
||||
// The hostname of the Socket Address
|
||||
private String hostname;
|
||||
private final String hostname;
|
||||
// The IP address of the Socket Address
|
||||
private InetAddress addr;
|
||||
private final InetAddress addr;
|
||||
// The port number of the Socket Address
|
||||
private int port;
|
||||
private final int port;
|
||||
|
||||
private InetSocketAddressHolder(String hostname, InetAddress addr, int port) {
|
||||
this.hostname = hostname;
|
||||
|
Loading…
Reference in New Issue
Block a user