Commit c73c01c
committed
Prevent nested proxies and improve error safety in rebind
- Unwrap freshBean if createBean() returns an AOP proxy to avoid
double-proxied targets where advice executes twice
- Create fresh instance before destroying old target so a failure
in createBean()/setTargetSource() does not leave the proxy
pointing at an already-destroyed target
- On setTargetSource failure, destroy freshBean before rethrowing
Signed-off-by: seonghyeoklee <dltjdgur327@gmail.com>1 parent 4b14063 commit c73c01c
1 file changed
Lines changed: 12 additions & 2 deletions
File tree
- spring-cloud-context/src/main/java/org/springframework/cloud/context/properties
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
144 | 143 | | |
145 | 144 | | |
146 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
147 | 156 | | |
148 | 157 | | |
| 158 | + | |
149 | 159 | | |
150 | 160 | | |
151 | 161 | | |
| |||
0 commit comments