-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Description
@nonnull
public final Registry setResourceDecoderBucketPriorityList(@nonnull List buckets) {
List modifiedBuckets = new ArrayList<>(buckets);
modifiedBuckets.add(0, BUCKET_PREPEND_ALL);
modifiedBuckets.add(BUCKET_APPEND_ALL);
decoderRegistry.setBucketPriorityList(modifiedBuckets);
return this;
}
It may appear here
java.lang.ClassCastException: int[] cannot be cast to java.lang.Object[]
at java.util.Arrays$ArrayList.toArray(Arrays.java:120)
at java.util.ArrayList.(ArrayList.java:97)
at com.bumptech.glide.Registry.setResourceDecoderBucketPriorityList(Registry.java:268)
Can you tell me what caused this?
Discovered by tracking, The last sentence here
public Registry() {
this.modelLoaderRegistry = new ModelLoaderRegistry(throwableListPool);
this.encoderRegistry = new EncoderRegistry();
this.decoderRegistry = new ResourceDecoderRegistry();
this.resourceEncoderRegistry = new ResourceEncoderRegistry();
this.dataRewinderRegistry = new DataRewinderRegistry();
this.transcoderRegistry = new TranscoderRegistry();
this.imageHeaderParserRegistry = new ImageHeaderParserRegistry();
setResourceDecoderBucketPriorityList(
Arrays.asList(BUCKET_GIF, BUCKET_BITMAP, BUCKET_BITMAP_DRAWABLE));
}
public static final String BUCKET_GIF = "Gif";
public static final String BUCKET_BITMAP = "Bitmap";
public static final String BUCKET_BITMAP_DRAWABLE = "BitmapDrawable";
Here is that this error should not occur