Skip to content

Commit

Permalink
8299437: Make InetSocketAddressHolder shallowly immutable
Browse files Browse the repository at this point in the history
Reviewed-by: djelinski, jpai, alanb
  • Loading branch information
minborg authored and jaikiran committed Jan 3, 2023
1 parent 8afd665 commit a9ce772
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/java.base/share/classes/java/net/InetSocketAddress.java
@@ -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
Expand Down Expand Up @@ -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;
Expand Down

1 comment on commit a9ce772

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.