equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2018, 2019, 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 |
94 protected DynamicConstantDesc(DirectMethodHandleDesc bootstrapMethod, |
94 protected DynamicConstantDesc(DirectMethodHandleDesc bootstrapMethod, |
95 String constantName, |
95 String constantName, |
96 ClassDesc constantType, |
96 ClassDesc constantType, |
97 ConstantDesc... bootstrapArgs) { |
97 ConstantDesc... bootstrapArgs) { |
98 this.bootstrapMethod = requireNonNull(bootstrapMethod); |
98 this.bootstrapMethod = requireNonNull(bootstrapMethod); |
99 this.constantName = validateMemberName(requireNonNull(constantName)); |
99 this.constantName = validateMemberName(requireNonNull(constantName), true); |
100 this.constantType = requireNonNull(constantType); |
100 this.constantType = requireNonNull(constantType); |
101 this.bootstrapArgs = requireNonNull(bootstrapArgs).clone(); |
101 this.bootstrapArgs = requireNonNull(bootstrapArgs).clone(); |
102 |
102 |
103 if (constantName.length() == 0) |
103 if (constantName.length() == 0) |
104 throw new IllegalArgumentException("Illegal invocation name: " + constantName); |
104 throw new IllegalArgumentException("Illegal invocation name: " + constantName); |