diff options
| author | 2016-03-28 12:00:00 -0700 | |
|---|---|---|
| committer | 2016-03-28 16:34:22 -0700 | |
| commit | 598d37f670bf525f131cb3be52bd72e640ad0018 (patch) | |
| tree | 45e3374a5186fba9abd1465312447428fe6888a9 /rs/java | |
| parent | ca430a881f29ee88ade7a541fa34799c9f47d345 (diff) | |
[RenderScript] Fail with Exception from validateObjectIsPrimitiveArray
Bug: http://b/25982676
Instead of returning null from validateObjectIsPrimitiveArray, fail with
an exception. The callers of this function do not check for null.
Change-Id: Idd2b50a7b137e8d2db7a334bb9a48c1b19ee2403
Diffstat (limited to 'rs/java')
| -rw-r--r-- | rs/java/android/renderscript/Allocation.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rs/java/android/renderscript/Allocation.java b/rs/java/android/renderscript/Allocation.java index 6bcb5b6afc72..57c45a763e41 100644 --- a/rs/java/android/renderscript/Allocation.java +++ b/rs/java/android/renderscript/Allocation.java @@ -142,7 +142,10 @@ public class Allocation extends BaseObj { } return Element.DataType.FLOAT_64; } - return null; + + throw new RSIllegalArgumentException("Parameter of type " + cmp.getSimpleName() + + "[] is not compatible with data type " + mType.mElement.mType.name() + + " of allocation"); } |