-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] Use of incorrect Object type in synthetic methods #913
Comments
@skylot |
@sergey-wowwow I made a fix for this case, please check. |
@skylot Before public <T> retrofit2.Converter<T, java.lang.String> stringConverter(java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotationArr) {
retrofit2.Utils.checkNotNull(type, "type == null");
retrofit2.Utils.checkNotNull(annotationArr, "annotations == null");
int size = this.converterFactories.size();
for (int i = 0; i < size; i++) {
retrofit2.Converter stringConverter = this.converterFactories.get(i).stringConverter(type, annotationArr, this);
if (stringConverter != null) {
return stringConverter;
}
}
return retrofit2.BuiltInConverters.ToStringConverter.INSTANCE;
} Now /* JADX WARN: Type inference failed for: r2v3, types: [retrofit2.Converter, retrofit2.Converter<T, java.lang.String>], assign insn: 0x001b: INVOKE (r2v3 ? I:retrofit2.Converter) =
(r2v2 retrofit2.Converter$Factory)
(r4v0 java.lang.reflect.Type)
(r5v0 java.lang.annotation.Annotation[])
(r3v0 'this' retrofit2.Retrofit A[THIS])
type: VIRTUAL call: retrofit2.Converter.Factory.stringConverter(java.lang.reflect.Type, java.lang.annotation.Annotation[], retrofit2.Retrofit):retrofit2.Converter */
public <T> retrofit2.Converter<T, java.lang.String> stringConverter(java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotationArr) {
retrofit2.Utils.checkNotNull(type, "type == null");
retrofit2.Utils.checkNotNull(annotationArr, "annotations == null");
int size = this.converterFactories.size();
for (int i = 0; i < size; i++) {
? stringConverter = this.converterFactories.get(i).stringConverter(type, annotationArr, this);
if (stringConverter != 0) {
return stringConverter;
}
}
return retrofit2.BuiltInConverters.ToStringConverter.INSTANCE;
} |
And one more in class public final class zzb implements android.os.Parcelable.Creator<com.google.android.gms.wallet.zza> {
@Override // android.os.Parcelable.Creator
public final /* synthetic */ java.lang.Object[] newArray(int i) {
return new com.google.android.gms.wallet.zza[i];
} |
Sorry, tested on this APK https://drive.google.com/file/d/1qC3tlWs9AtPBpyS6iU9kcSphLryfJOxi/view?usp=sharing two last bugs |
@sergey-wowwow |
@skylot private static final class ContentAsResult<Data> extends com.ebay.nautilus.domain.content.DmResultAdapter<Data, com.ebay.nautilus.domain.content.Content<Data>> {
//...
@Override // com.ebay.nautilus.domain.content.DmResultAdapter
@androidx.annotation.NonNull
public com.ebay.nautilus.domain.content.Content<Data> createResult(@androidx.annotation.NonNull Data data) {
return new com.ebay.nautilus.domain.content.Content<>((java.lang.Object) data); // invalid cast to Object
}
} |
And the last thing probably related to the root issue. Class final class zzada implements com.google.android.gms.internal.ads.zzanl<com.google.android.gms.internal.ads.zzaqw> {
//...
@Override // com.google.android.gms.internal.ads.zzanl
public final /* synthetic */ void zzh(java.lang.Object obj) { // Error! "com.google.android.gms.internal.ads.zzada" should be here
((com.google.android.gms.internal.ads.zzaqw) obj).destroy();
}
} package com.google.android.gms.internal.ads;
public interface zzanl<V> {
void zzb(java.lang.Throwable th);
void zzh(@javax.annotation.Nullable V v);
} |
And thanks for the fixes, I see that they resolve all the bugs and don't create new ones! :D |
@skylot |
@sergey-wowwow |
Thanks @skylot, Please check public V putIfAbsent(@androidx.annotation.NonNull K k, @androidx.annotation.NonNull V v) {
androidx.arch.core.internal.SafeIterableMap.Entry entry = get(k); // should be parametrized with <K, V>
if (entry != null) {
return entry.mValue; // error!
}
put(k, v);
return null;
} and similar thing in public class ArrayQueue<T> {
private java.lang.Object[] elements = new java.lang.Object[16];
//...
@org.jetbrains.annotations.Nullable
public final T removeFirstOrNull() {
int i = this.head;
if (i == this.tail) {
return null;
}
T[] tArr = this.elements; // error! |
And one more thing, class public void subscribeActual(io.reactivex.Observer<? super java.lang.Boolean> observer) { But |
@skylot |
@skylot |
Hi, I've noticed that many synthetic methods are corrupted. Example in class
com.google.android.gms.internal.measurement.Df
Type
com.google.android.gms.internal.measurement.zzx
should be used instead ofjava.lang.Object
APK: https://drive.google.com/file/d/1ICfL4A22K-KhVkw5RwvWdLJA8111iYvG/view?usp=sharing
The text was updated successfully, but these errors were encountered: