src/share/classes/com/sun/tools/javac/util/UnsharedNameTable.java

changeset 1772
824932ecdbc8
parent 816
7c537f4298fb
child 2525
2eb010b6cb22
equal deleted inserted replaced
1771:67cbd6d756f4 1772:824932ecdbc8
1 /* 1 /*
2 * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
123 123
124 byte[] bytes = new byte[len]; 124 byte[] bytes = new byte[len];
125 System.arraycopy(cs, start, bytes, 0, len); 125 System.arraycopy(cs, start, bytes, 0, len);
126 n = new NameImpl(this, bytes, index++); 126 n = new NameImpl(this, bytes, index++);
127 127
128 System.arraycopy(cs, start, n.bytes, 0, len);
129
130 HashEntry newEntry = new HashEntry(n); 128 HashEntry newEntry = new HashEntry(n);
131 129
132 if (previousNonNullTableEntry == null) { // We are not the first name with that hashCode. 130 if (previousNonNullTableEntry == null) { // We are not the first name with that hashCode.
133 hashes[h] = newEntry; 131 hashes[h] = newEntry;
134 } 132 }

mercurial