@Test(expected = AssertionError.class) public void throwsErrorWithNullResult() throws Exception { TargetAction request = new TargetAction(mock(Picasso.class), mockTarget(), null, 0, 0, null, URI_KEY_1, null, 0); request.complete(null, MEMORY); }
@Override void complete(Bitmap result, Picasso.LoadedFrom from) { if (result == null) { throw new AssertionError( String.format("Attempted to complete action with no result!\n%s", this)); } Target target = getTarget(); if (target != null) { target.onBitmapLoaded(result, from); if (result.isRecycled()) { throw new IllegalStateException("Target callback must not recycle bitmap!"); } } }
TargetAction extends Action<Target> { @Override void complete(Bitmap result, Picasso.LoadedFrom from) { if (result == null) { throw new AssertionError( String.format("Attempted to complete action with no result!\n%s", this)); } Target target = getTarget(); if (target != null) { target.onBitmapLoaded(result, from); if (result.isRecycled()) { throw new IllegalStateException("Target callback must not recycle bitmap!"); } } } }
TargetAction extends Action<Target> { @Override void complete(Bitmap result, Picasso.LoadedFrom from) { if (result == null) { throw new AssertionError( String.format("Attempted to complete action with no result!\n%s", this)); } Target target = getTarget(); if (target != null) { target.onBitmapLoaded(result, from); if (result.isRecycled()) { throw new IllegalStateException("Target callback must not recycle bitmap!"); } } } TargetAction(Picasso picasso, Target target, Request data, int memoryPolicy, int networkPolicy,
      Drawable errorDrawable, String key, Object tag, int errorResId); }
TargetAction extends Action<Target> { @Override void complete(Bitmap result, Picasso.LoadedFrom from) { if (result == null) { throw new AssertionError( String.format("Attempted to complete action with no result!\n%s", this)); } Target target = getTarget(); if (target != null) { target.onBitmapLoaded(result, from); if (result.isRecycled()) { throw new IllegalStateException("Target callback must not recycle bitmap!"); } } } TargetAction(Picasso picasso, Target target, Request data, int memoryPolicy, int networkPolicy,
      Drawable errorDrawable, String key, Object tag, int errorResId);  }
TargetAction extends Action<Target> { @Override void complete(Bitmap result, Picasso.LoadedFrom from) { if (result == null) { throw new AssertionError( String.format("Attempted to complete action with no result!\n%s", this)); } Target target = getTarget(); if (target != null) { target.onBitmapLoaded(result, from); if (result.isRecycled()) { throw new IllegalStateException("Target callback must not recycle bitmap!"); } } } TargetAction(Picasso picasso, Target target, Request data, int memoryPolicy, int networkPolicy,
      Drawable errorDrawable, String key, Object tag, int errorResId);   }