Meituan-Dianping / Meituan-Dianping/Robust
方法构造函数被Proguard优化后。补丁无法正确反射构造函数,造成空指针。
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.5k
- Forks
- 806
- PR merge metrics
- No merged PRs in 30d
Description
异常类型:app运行时异常
手机型号 Nexus 6p
手机系统版本:Android 5.0 - 9.0
Robust版本:0.4.82
Gradle版本:3.0.0
系统:Mac
//编码期默认方法签名
public SAdapter(Context context, List items, IMulItemViewType viewType) {
super(context, items, viewType);
}
//混淆,优化后。线上包中签名
public SAdapter(Context context, List items) {
super(context, items, null);
}
//补丁中反射调用函数
SAdapter sAdapter1 = (SAdapter)EnhancedRobustUtils.
invokeReflectConstruct("com.test.adapter.SAdapter",
getRealParameter(new Object[] { localContext,(List)EnhancedRobustUtils.getFieldValue("h", localObject5,SFragment.class),null }),
new Class[] { Context.class, List.class, a.class });
//补丁之后因为找不到构造函数崩溃。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at EnhancedRobustUtils.invokeReflectConstruct and compare the constructor signatures shown before and after Proguard optimization. Reproduce the reflection failure with the reported Android and Robust versions, then verify that a Proguard-optimized constructor can be resolved without the null-pointer crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100