135135import com .oracle .svm .hosted .FeatureImpl .BeforeAnalysisAccessImpl ;
136136import com .oracle .svm .hosted .FeatureImpl .DuringSetupAccessImpl ;
137137import com .oracle .svm .hosted .meta .HostedType ;
138+ import com .oracle .svm .hosted .substitute .DeletedElementException ;
138139import com .oracle .svm .truffle .api .SubstrateThreadLocalHandshake ;
139140import com .oracle .svm .truffle .api .SubstrateThreadLocalHandshakeSnippets ;
140141import com .oracle .svm .truffle .api .SubstrateTruffleCompiler ;
@@ -754,10 +755,16 @@ private void initializeMethodBlocklist(MetaAccessProvider metaAccess, FeatureAcc
754755
755756 private void blocklistAllMethods (MetaAccessProvider metaAccess , Class <?> clazz ) {
756757 for (Executable m : clazz .getDeclaredMethods ()) {
757- blocklistMethods .add (metaAccess .lookupJavaMethod (m ));
758+ try {
759+ blocklistMethods .add (metaAccess .lookupJavaMethod (m ));
760+ } catch (DeletedElementException e ) {
761+ }
758762 }
759763 for (Executable m : clazz .getDeclaredConstructors ()) {
760- blocklistMethods .add (metaAccess .lookupJavaMethod (m ));
764+ try {
765+ blocklistMethods .add (metaAccess .lookupJavaMethod (m ));
766+ } catch (DeletedElementException e ) {
767+ }
761768 }
762769 }
763770
@@ -771,10 +778,16 @@ private void blocklistMethod(MetaAccessProvider metaAccess, Class<?> clazz, Stri
771778
772779 private void tempTargetAllowlistAllMethods (MetaAccessProvider metaAccess , Class <?> clazz ) {
773780 for (Executable m : clazz .getMethods ()) {
774- tempTargetAllowlistMethods .add (metaAccess .lookupJavaMethod (m ));
781+ try {
782+ tempTargetAllowlistMethods .add (metaAccess .lookupJavaMethod (m ));
783+ } catch (DeletedElementException e ) {
784+ }
775785 }
776786 for (Executable m : clazz .getConstructors ()) {
777- tempTargetAllowlistMethods .add (metaAccess .lookupJavaMethod (m ));
787+ try {
788+ tempTargetAllowlistMethods .add (metaAccess .lookupJavaMethod (m ));
789+ } catch (DeletedElementException e ) {
790+ }
778791 }
779792 }
780793
0 commit comments