--- old/src/java.base/share/classes/sun/nio/ch/MembershipKeyImpl.java 2020-01-06 11:04:32.000000000 +0000 +++ new/src/java.base/share/classes/sun/nio/ch/MembershipKeyImpl.java 2020-01-06 11:04:32.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2020, 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 @@ -63,6 +63,10 @@ this.source = source; } + int interfaceIndex() { + return interf.getIndex(); + } + /** * MembershipKey will additional context for IPv4 membership */ @@ -103,7 +107,6 @@ */ static class Type6 extends MembershipKeyImpl { private final byte[] groupAddress; - private final int index; private final byte[] sourceAddress; Type6(MulticastChannel ch, @@ -111,12 +114,10 @@ NetworkInterface interf, InetAddress source, byte[] groupAddress, - int index, byte[] sourceAddress) { super(ch, group, interf, source); this.groupAddress = groupAddress; - this.index = index; this.sourceAddress = sourceAddress; } @@ -124,10 +125,6 @@ return groupAddress; } - int index() { - return index; - } - byte[] source() { return sourceAddress; }