8215510: j.l.c.ClassDesc is accepting descriptors not allowed by the spec

Reviewed-by: goetz
This commit is contained in:
Vicente Romero 2019-01-09 08:07:23 -05:00
parent f2f7690741
commit eed3a536c0
9 changed files with 116 additions and 46 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2019, 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
@ -68,7 +68,7 @@ final class DirectMethodHandleDescImpl implements DirectMethodHandleDesc {
requireNonNull(kind);
validateClassOrInterface(requireNonNull(owner));
validateMemberName(requireNonNull(name));
validateMemberName(requireNonNull(name), true);
requireNonNull(type);
switch (kind) {