135
135
import com .oracle .svm .hosted .FeatureImpl .BeforeAnalysisAccessImpl ;
136
136
import com .oracle .svm .hosted .FeatureImpl .DuringSetupAccessImpl ;
137
137
import com .oracle .svm .hosted .meta .HostedType ;
138
+ import com .oracle .svm .hosted .substitute .DeletedElementException ;
138
139
import com .oracle .svm .truffle .api .SubstrateThreadLocalHandshake ;
139
140
import com .oracle .svm .truffle .api .SubstrateThreadLocalHandshakeSnippets ;
140
141
import com .oracle .svm .truffle .api .SubstrateTruffleCompiler ;
@@ -754,10 +755,16 @@ private void initializeMethodBlocklist(MetaAccessProvider metaAccess, FeatureAcc
754
755
755
756
private void blocklistAllMethods (MetaAccessProvider metaAccess , Class <?> clazz ) {
756
757
for (Executable m : clazz .getDeclaredMethods ()) {
757
- blocklistMethods .add (metaAccess .lookupJavaMethod (m ));
758
+ try {
759
+ blocklistMethods .add (metaAccess .lookupJavaMethod (m ));
760
+ } catch (DeletedElementException e ) {
761
+ }
758
762
}
759
763
for (Executable m : clazz .getDeclaredConstructors ()) {
760
- blocklistMethods .add (metaAccess .lookupJavaMethod (m ));
764
+ try {
765
+ blocklistMethods .add (metaAccess .lookupJavaMethod (m ));
766
+ } catch (DeletedElementException e ) {
767
+ }
761
768
}
762
769
}
763
770
@@ -771,10 +778,16 @@ private void blocklistMethod(MetaAccessProvider metaAccess, Class<?> clazz, Stri
771
778
772
779
private void tempTargetAllowlistAllMethods (MetaAccessProvider metaAccess , Class <?> clazz ) {
773
780
for (Executable m : clazz .getMethods ()) {
774
- tempTargetAllowlistMethods .add (metaAccess .lookupJavaMethod (m ));
781
+ try {
782
+ tempTargetAllowlistMethods .add (metaAccess .lookupJavaMethod (m ));
783
+ } catch (DeletedElementException e ) {
784
+ }
775
785
}
776
786
for (Executable m : clazz .getConstructors ()) {
777
- tempTargetAllowlistMethods .add (metaAccess .lookupJavaMethod (m ));
787
+ try {
788
+ tempTargetAllowlistMethods .add (metaAccess .lookupJavaMethod (m ));
789
+ } catch (DeletedElementException e ) {
790
+ }
778
791
}
779
792
}
780
793
0 commit comments