From 6bbcef53154e6b669ef53e01eb95bc1b568dc0c6 Mon Sep 17 00:00:00 2001 From: Andrey Turbanov Date: Mon, 14 Aug 2023 07:04:29 +0000 Subject: [PATCH] 8313948: Remove unnecessary static fields defaultUpper/defaultLower in sun.net.PortConfig Reviewed-by: dfuchs --- src/java.base/unix/classes/sun/net/PortConfig.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/java.base/unix/classes/sun/net/PortConfig.java b/src/java.base/unix/classes/sun/net/PortConfig.java index 4e9deeb90fb..428870c9222 100644 --- a/src/java.base/unix/classes/sun/net/PortConfig.java +++ b/src/java.base/unix/classes/sun/net/PortConfig.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -35,13 +35,14 @@ import jdk.internal.util.OperatingSystem; public final class PortConfig { - private static int defaultUpper, defaultLower; private static final int upper, lower; private PortConfig() {} static { jdk.internal.loader.BootLoader.loadLibrary("net"); + int defaultUpper; + int defaultLower; switch (OperatingSystem.current()) { case LINUX: defaultLower = 32768;