remove instanceof checks and use reflection for admin cmd invocations
- 主要語言
- Java
- 星號
- 3.1k
- 分支
- 1.4k
- 平均合併
- 6 天 19 小時
- 30 天內合併 PR
- 32
描述
##### ISSUE TYPE
* cleanup
##### COMPONENT NAME
~~~
API
~~~
##### CLOUDSTACK VERSION
~~~
4.17
~~~
##### CONFIGURATION
##### OS / ENVIRONMENT
##### SUMMARY
the API classes have instances that are for root admin only, these are checked for using `instanceof` in the service layer. This should be cleaned up in favour for reflection invocations as in #6951. It would be better to do all in one go but the fix in #6951 really needs it and is for a point release, so postponing.
##### STEPS TO REPRODUCE
~~~
~~~
##### EXPECTED RESULTS
~~~
~~~
##### ACTUAL RESULTS
~~~
~~~
貢獻指南
研究方向
從處理 admin 命令呼叫的 API 類別和服務層著手,接著比較 #6951 中描述的 reflection 方法。追蹤針對僅限 root admin 實例的現有 instanceof 檢查,並找出受影響的呼叫路徑。當這些檢查使用預期的 reflection 方法,同時保留僅限 admin 的行為時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- java
- 領域
- api, cloud
- Issue 類型
- 重構
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100