linghengqian commented on pull request #15260:
URL: https://github.com/apache/shardingsphere/pull/15260#issuecomment-1035900247


   - Traced to 
`org.apache.shardingsphere.infra.yaml.engine.constructor.ShardingSphereYamlConstructor`,
 there is a step in its constructor 
`YamlRuleConfigurationSwapperEngine.getYamlShortcuts().forEach((key, value) -> 
addTypeDescription(new TypeDescription(value, key))) ;` , at this step, generic 
information is lost due to post-compilation generic erasure. This causes 
`org.apache.shardingsphere.infra.yaml.engine.YamlEngine#unmarshal` to have an 
incorrect reference to it.
   What should be done to handle it? I still don't understand why this step is 
fine on `snakeyaml 1.16`, generic information should be additionally tagged.
   
   - 
![image](https://user-images.githubusercontent.com/20187731/153542907-5c3f173a-bd53-4baa-8235-67f93a18a45d.png)
   
   - The relevant class whose generics are erased is 
`org.apache.shardingsphere.infra.executor.sql.process.model.yaml.YamlExecuteProcessContext`
 .
   
   - 
![image](https://user-images.githubusercontent.com/20187731/153543148-8c795b0d-8388-4c37-a424-b33ca6359965.png)
    
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to