mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8337302: Undefined type variable results in null
Reviewed-by: liach
This commit is contained in:
parent
aeba1ea7c4
commit
1d070a3238
3 changed files with 86 additions and 12 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2024, 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
|
||||
|
@ -106,7 +106,11 @@ public class CoreReflectionFactory implements GenericsFactory {
|
|||
}
|
||||
|
||||
public TypeVariable<?> findTypeVariable(String name){
|
||||
return getScope().lookup(name);
|
||||
TypeVariable<?> variable = getScope().lookup(name);
|
||||
if (variable == null) {
|
||||
throw new TypeNotPresentException(name, null);
|
||||
}
|
||||
return variable;
|
||||
}
|
||||
|
||||
public Type makeNamedType(String name){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue