This is an automated email from the ASF dual-hosted git repository.
hiedra pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new 38373b8a72 Fix warning for returning or assigning null to types that
are not allowed to be null. Fix warning comparations types.
38373b8a72 is described below
commit 38373b8a72680ac10501372926407cc96676a56d
Author: mjesteve <[email protected]>
AuthorDate: Tue Dec 10 10:18:13 2024 +0100
Fix warning for returning or assigning null to types that are not allowed
to be null.
Fix warning comparations types.
(cherry picked from commit 6a74112567733a81c49c56c6f92f6a43b2a45dcc)
---
.../src/main/royale/org/apache/royale/collections/ArrayListView.as | 4 ++--
.../Graphics/src/main/royale/org/apache/royale/display/BitmapData.as | 2 +-
.../Graphics/src/main/royale/org/apache/royale/display/Graphics.as | 2 +-
.../src/main/royale/org/apache/royale/html/test/UITestRunner.mxml | 2 +-
.../org/apache/royale/html/test/UITestRunnerWithDisplayArea.mxml | 2 +-
.../projects/SparkRoyale/src/main/royale/spark/components/Grid.as | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git
a/frameworks/projects/Collections/src/main/royale/org/apache/royale/collections/ArrayListView.as
b/frameworks/projects/Collections/src/main/royale/org/apache/royale/collections/ArrayListView.as
index 09341da7c5..2af0438fef 100644
---
a/frameworks/projects/Collections/src/main/royale/org/apache/royale/collections/ArrayListView.as
+++
b/frameworks/projects/Collections/src/main/royale/org/apache/royale/collections/ArrayListView.as
@@ -1008,7 +1008,7 @@ package org.apache.royale.collections
addedItems[l] = localEvent;
localEvent.index = getItemIndex(localEvent.item);
}
- addedItems.sort(function(event1:CollectionEvent,
event2:CollectionEvent):Boolean{return event1.index < event2.index ? -1 : 1});
+ addedItems.sort(function(event1:CollectionEvent,
event2:CollectionEvent):int{return event1.index < event2.index ? -1 : 1});
while (addedItems.length) {
localEvent = addedItems.shift();
dispatchEvent(localEvent);
@@ -1050,7 +1050,7 @@ package org.apache.royale.collections
localUpdate = true;
}
- removedItems.sort(function(event1:CollectionEvent,
event2:CollectionEvent):Boolean{return event1.index < event2.index ? 1 : -1});
+ removedItems.sort(function(event1:CollectionEvent,
event2:CollectionEvent):int{return event1.index < event2.index ? 1 : -1});
var offset:int = 0;
while (removedItems.length) {
localEvent = removedItems.shift();
diff --git
a/frameworks/projects/Graphics/src/main/royale/org/apache/royale/display/BitmapData.as
b/frameworks/projects/Graphics/src/main/royale/org/apache/royale/display/BitmapData.as
index 59349e8280..03b47c9b5f 100644
---
a/frameworks/projects/Graphics/src/main/royale/org/apache/royale/display/BitmapData.as
+++
b/frameworks/projects/Graphics/src/main/royale/org/apache/royale/display/BitmapData.as
@@ -193,7 +193,7 @@
if (!rect) throw new TypeError(nonNullParamError('rect'));
if (!compressor) throw new
TypeError(nonNullParamError('compressor'));
//observed in swf testing... this appears to unlock first
- var wasLocked:Boolean = _lockedData;
+ var wasLocked:Boolean = _lockedData!=null?true:false; // var
wasLocked:Boolean = _lockedData;
if (wasLocked) unlock();
var dataString:String;
switch(compressor.constructor) {
diff --git
a/frameworks/projects/Graphics/src/main/royale/org/apache/royale/display/Graphics.as
b/frameworks/projects/Graphics/src/main/royale/org/apache/royale/display/Graphics.as
index d9d72a4d2b..e651a53299 100644
---
a/frameworks/projects/Graphics/src/main/royale/org/apache/royale/display/Graphics.as
+++
b/frameworks/projects/Graphics/src/main/royale/org/apache/royale/display/Graphics.as
@@ -547,7 +547,7 @@ package org.apache.royale.display
}
COMPILE::JS
{
- var checkForSpawn:Boolean = _currentPath;
+ var checkForSpawn:Boolean = _currentPath!=null?true:false;
//var checkForSpawn:Boolean = _currentPath;
var strokeBase:GraphicsStroke = currentStroke;
caps = caps ? caps: CapsStyle.ROUND;
diff --git
a/frameworks/projects/RoyaleUnitUI/src/main/royale/org/apache/royale/html/test/UITestRunner.mxml
b/frameworks/projects/RoyaleUnitUI/src/main/royale/org/apache/royale/html/test/UITestRunner.mxml
index f16f2be2c6..7a64d8ca52 100644
---
a/frameworks/projects/RoyaleUnitUI/src/main/royale/org/apache/royale/html/test/UITestRunner.mxml
+++
b/frameworks/projects/RoyaleUnitUI/src/main/royale/org/apache/royale/html/test/UITestRunner.mxml
@@ -131,7 +131,7 @@
{
case
UITestRunnerModel.RESULT_TYPE_FAILED:
{
- return test.failure;
+ return test!=null; //
test.failure;
}
case
UITestRunnerModel.RESULT_TYPE_PASSED:
{
diff --git
a/frameworks/projects/RoyaleUnitUI/src/main/royale/org/apache/royale/html/test/UITestRunnerWithDisplayArea.mxml
b/frameworks/projects/RoyaleUnitUI/src/main/royale/org/apache/royale/html/test/UITestRunnerWithDisplayArea.mxml
index 2ad5c69ac5..01d6e7be6f 100644
---
a/frameworks/projects/RoyaleUnitUI/src/main/royale/org/apache/royale/html/test/UITestRunnerWithDisplayArea.mxml
+++
b/frameworks/projects/RoyaleUnitUI/src/main/royale/org/apache/royale/html/test/UITestRunnerWithDisplayArea.mxml
@@ -202,7 +202,7 @@
{
case
UITestRunnerModel.RESULT_TYPE_FAILED:
{
- return test.failure;
+ return test!=null; //
test.failure;
}
case
UITestRunnerModel.RESULT_TYPE_PASSED:
{
diff --git
a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Grid.as
b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Grid.as
index e5170265b3..f1b38340de 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Grid.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Grid.as
@@ -4185,7 +4185,7 @@ package spark.components
public function isCellVisible(rowIndex:int = -1,
columnIndex:int = -1):Boolean
{
const view:GridView = getGridViewAt(rowIndex,
columnIndex);
- return view ;//&&
view.gridViewLayout.isCellVisible(rowIndex, columnIndex);
+ return view!=null ;//&&
view.gridViewLayout.isCellVisible(rowIndex, columnIndex);
}
//--------------------------------------------------------------------------