Closed oliviarla closed 4 months ago
@uhm0311 ๋ฆฌ๋ทฐ ๋ฐ์ํ์ต๋๋ค.
@oliviarla
allowNullValue ์ฌ๋ถ์ ๋ฐ๋ผ null์ ์ ์ฅํ๋ ค๊ณ ์๋ํ์ ๋ ์ฑ๊ณต/์คํจ๋ฅผ ๊ฒ์ฆํ๋ ํ ์คํธ ์ฝ๋๋ ์ถ๊ฐํด์ฃผ์ธ์.
@uhm0311
ํ
์คํธ ์ฝ๋๋ฅผ ์ถ๊ฐํ๊ธฐ ์ํด NullValue.INSTANCE
์ ์ ํ๋๋ฅผ ์ด์ฉํด ๊ฐ์ฒด๋ฅผ ๊ฐ์ ธ์ค๋ ค๊ณ ํ์ผ๋, ํ์ฌ spring 4.3.0 ๋ฒ์ ๊ธฐ์ค์ผ๋ก๋ package private ์ด๋ฏ๋ก NullValue ๊ฐ์ฒด๋ฅผ ์์ฑํ ์ ์์ต๋๋ค.
spring 4.3.10 ๋ฒ์ ์ดํ๋ถํฐ๋ public์ผ๋ก ๋ฐ๋์๊ธฐ ๋๋ฌธ์ NullValue.INSTANCE
์ ์ ํ๋๋ฅผ ์ฌ์ฉํ ์ ์์ผ๋, ํ์ฌ๋ก์๋ reflection์ ํตํด์๋ง ๊ฐ์ฒด๋ฅผ ์์ฑํ ์ ์์ต๋๋ค.
spring ํจ์น ๋ฒ์ ์ ์ฌ๋ฆฌ๊ณ ํ ์คํธ ์ฝ๋๋ฅผ ์์ฑํ ์ง, ์๋๋ฉด reflection์ผ๋ก ์์ฑํด๋์ง ์๊ฒฌ์ ์ฃผ์๋ฉด ๊ฐ์ฌํ๊ฒ ์ต๋๋ค.
@uhm0311 ์ด๋ฏธ ํ ์คํธ์ฝ๋์์ reflection์ ํตํด protected ์ ๊ทผ ์ ์ด์์ธ toStoreValue ๋ฉ์๋๋ฅผ ์ฌ์ฉํ๊ณ ์๋๋ฐ, ์ด๋ค ์๋ฏธ์ธ๊ฐ์?
@oliviarla
๋ฆฌํ๋ ์ ์ด๋ 4.3.10์ผ๋ก ์ ๊ทธ๋ ์ด๋ ํ์ง ์๊ณ ๋ NullValue ์ ๊ทผ์ด ๊ฐ๋ฅํ๋ค๋ฉด ์๋ํด๋ณด๋ผ๋ ์๋ฏธ์์ต๋๋ค. ๋ถ๊ฐ๋ฅํ๋ค๋ฉด 4.3.10์ผ๋ก ์ ๊ทธ๋ ์ด๋ ํ์์ฃ .
๐ Related Issue
โจ๏ธ What I did
get(Object key)
๋ฉ์๋์์๋ wantToGetException ์์ฑ์ด ์ ํจํ์ง๋ง, ํ์ฌ๋ ํด๋น ์ค์ ์ด ๋ฌดํจํ์ฌ ์์ธ๊ฐ ๋ฐ์ํ๋ฉด ๊ทธ๋๋ก ์ ํ๋ฉ๋๋ค.