From: everLEEst(SangHyeon Lee) Date: Fri, 13 May 2022 09:32:53 +0000 (-0700) Subject: [NUI] fix warnings. add null argument exception and comments. X-Git-Tag: accepted/tizen/unified/20231205.024657~954 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d3a52f3fe6cfa405f1414fd556152015c23a9b07;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] fix warnings. add null argument exception and comments. --- diff --git a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs index e478e55..6cba3ea 100755 --- a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs +++ b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs @@ -27,8 +27,11 @@ namespace Tizen.NUI.Components /// ScrollEventArgs is a class to record scroll event arguments which will sent to user. /// /// 8 + [global::System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1001: Types that own disposable fields should be disposable.", Justification = "Scroll event is temporarily used for notifying scroll position update, so position will not be disposed during the event processing.")] public class ScrollEventArgs : EventArgs { + // Position class is derived class of Disposable class and they will be implicitly disposed by DisposeQueue, + // so that there will be no memory leak. private Position position; private Position scrollPosition; @@ -1720,6 +1723,7 @@ namespace Tizen.NUI.Components [EditorBrowsable(EditorBrowsableState.Never)] protected virtual void Decelerating(float velocity, Animation animation) { + if (animation == null) throw new ArgumentNullException(nameof(animation)); // Decelerating using deceleration equation =========== // // V : velocity (pixel per millisecond)