[seasar-dotnet:2265] Re: S2Container.NET1.4.0のDynamicAopProxyのCreate内の条件について
kotani.k
[E-MAIL ADDRESS DELETED]
2013年 4月 8日 (月) 07:28:07 JST
井上さん
小谷です。
ご指摘ありがとうございます。
182行目が呼ばれないのは確かですね。。。
この処理が呼ばれないことによる問題はないか、確認した上で修正します。
2013年4月5日 16:52 <Hideki_Inoue @ tsc.toray.co.jp>:
> こんにちは。井上です。
>
> Seasar.Framework.Aop.Proxy.DynamicAopProxyについて
> 個人的には実害はないですが、たまたま気づいたことがあったので、投稿させていただきます。
>
> ソースの172行目から189行目の以下の部分です。
> ---- 引用開始 ----
> 172 public object Create(Type receiptType, object target)
> 173 {
> 174 if (receiptType.IsInterface && target.GetType() == typeof(object))
> 175 {
> 176 if (target.GetType() == typeof(object))
> 177 {
> 178 return
> _generator.CreateInterfaceProxyWithoutTarget(receiptType, _interceptors);
> 179 }
> 180 else
> 181 {
> 182 return
> _generator.CreateInterfaceProxyWithTarget(receiptType, target,
> _interceptors);
> 183 }
> 184 }
> 185 else
> 186 {
> 187 return _generator.CreateClassProxy(_componentType,
> _interceptors);
> 188 }
> 189 }
> ---- 引用終了 ----
>
> 最初のif文(174行目)に && target.GetType() == typeof(object)があり
> 176行目で条件がかぶっているので182行目の
> _generator.CreateInterfaceProxyWithTarget(receiptType, target,
> _interceptors)
> が呼び出されるパターンが無い結果になると思われます。
> 文脈的には、174行目のGetTypeの比較が不要なのかな?と思います。
>
> ちなみにS2Container.NETのバージョンは1.4.0です。
>
> では。
>
> _______________________________________________
> seasar-dotnet mailing list
> seasar-dotnet @ ml.seasar.org
> https://ml.seasar.org/mailman/listinfo/seasar-dotnet
>
>
-------------- next part --------------
HTMLの添付ファイルを保管しました...
URL: <http://ml.seasar.org/archives/seasar-dotnet/attachments/20130408/61d135b9/attachment.html>
seasar-dotnet メーリングリストの案内