-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] InternalExecutionError on assignment of inherited instance variables from abstract class #1406
Comments
`public with sharing class SN_MetadataWrappers {
}`
The above fails. If I duplicate inherited instance variables in the class, it passes. "1","3","/Users/jae/code/specright-network/specright-network/main/default/classes/SN_Modules/SN_Settings/SN_SettingsController.cls","355","29","SN_SettingsController","getSpecrightNetworkTemplateMappings","","","","InternalExecutionError","Graph Engine identified your source and sink, but you must manually verify that you have a sanitizer in this path. Then, add an engine directive to skip the path. Next, create a Github issue for the Code Analyzer team that includes the error and stack trace. After we fix this issue, check the Code Analyzer release notes for more info. Error and stacktrace: UnexpectedException: Undefined variable. key=type, value=ApexStringValue{ value=Optional[Object]} ApexValue(ApexStringValue) {status=INITIALIZED, declarationVertex=ApexStringValue{ value=Optional.empty} ApexValue(ApexStringValue) {status=UNINITIALIZED, declarationVertex=Field{properties={FirstChild=false, BeginLine=52, Type=String, DefiningType_CaseSafe=sn_constants, LastChild=false, DefiningType=SN_Constants, EndLine=52, Name_CaseSafe=config_type_object, childIdx=25, BeginColumn=29, Name=CONFIG_TYPE_OBJECT}}, valueVertex=null, resolvedValues={}, returnedFrom=null, invocableExpression=null, method=null}, valueVertex=LiteralExpression{properties={FirstChild=true, BeginLine=52, DefiningType_CaseSafe=sn_constants, LastChild=false, DefiningType=SN_Constants, EndLine=52, Value=Object, childIdx=0, LiteralType=STRING, BeginColumn=50}}, resolvedValues={}, returnedFrom=null, invocableExpression=null, method=null}: com.salesforce.graph.symbols.MethodInvocationScope.updateVariable(MethodInvocationScope.java:114);com.salesforce.graph.symbols.AbstractClassInstanceScope.updateVariable(AbstractClassInstanceScope.java:129);com.salesforce.graph.symbols.PathScopeVisitor.updateVariable(PathScopeVisitor.java:190);com.salesforce.graph.symbols.PathScopeVisitor.afterVisit(PathScopeVisitor.java:1005);com.salesforce.graph.symbols.DefaultSymbolProviderVertexVisitor.afterVisit(DefaultSymbolProviderVertexVisitor.java:744);com.salesforce.graph.vertex.AssignmentExpressionVertex.afterVisit(AssignmentExpressionVertex.java:37)","https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/apexflsviolation-rule.html","InternalExecutionError","sfge" |
@sagar-j-sfdc Do you have any work arounds for this or any idea to get the engine directives to work for this issue? |
@jfeingold35 Any update on this? |
Unfortunately, no updates at this time. We'll look into it and let you know once we have something. Thank you for your patience. |
@jaelee125 , we're able to reproduce. It looks like the problem is that the scope of the child class isn't automatically receiving the properties inherited from the parent class. |
This issue has been linked to a new work item: W-15705191 |
@jfeingold35 We currently don't have a workaround for this but we'll document it in the security review. Thanks |
Marking this a duplicate of #1497 |
I'm not exactly sure what the issue is. SN_Constants class is a class we use to store constants. This class only has public static final String, Integer, Map, List, and Set.
Error and stacktrace: UnexpectedException: Undefined variable. key=mappingType, value=ApexStringValue{ value=Optional[Object]} ApexValue(ApexStringValue) {status=INITIALIZED, declarationVertex=ApexStringValue{ value=Optional.empty} ApexValue(ApexStringValue) {status=UNINITIALIZED, declarationVertex=Field{properties={FirstChild=false, BeginLine=50, Type=String, DefiningType_CaseSafe=sn_constants, LastChild=false, DefiningType=SN_Constants, EndLine=50, Name_CaseSafe=config_type_object, childIdx=24, BeginColumn=29, Name=CONFIG_TYPE_OBJECT}}, valueVertex=null, resolvedValues={}, returnedFrom=null, invocableExpression=null, method=null}, valueVertex=LiteralExpression{properties={FirstChild=true, BeginLine=50, DefiningType_CaseSafe=sn_constants, LastChild=false, DefiningType=SN_Constants, EndLine=50, Value=Object, childIdx=0, LiteralType=STRING, BeginColumn=50}}, resolvedValues={}, returnedFrom=null, invocableExpression=null, method=null}: com.salesforce.graph.symbols.MethodInvocationScope.updateVariable(MethodInvocationScope.java:114);com.salesforce.graph.symbols.AbstractClassInstanceScope.updateVariable(AbstractClassInstanceScope.java:129);com.salesforce.graph.symbols.PathScopeVisitor.updateVariable(PathScopeVisitor.java:190);com.salesforce.graph.symbols.PathScopeVisitor.afterVisit(PathScopeVisitor.java:1005);com.salesforce.graph.symbols.DefaultSymbolProviderVertexVisitor.afterVisit(DefaultSymbolProviderVertexVisitor.java:744);com.salesforce.graph.vertex.AssignmentExpressionVertex.afterVisit(AssignmentExpressionVertex.java:37)
The text was updated successfully, but these errors were encountered: