fix: nullpointer in findOrFallback function

This commit is contained in:
zaaarf 2023-03-27 12:24:18 +02:00
parent 96c06c797e
commit b9e1ae971e
No known key found for this signature in database
GPG key ID: 82240E075E31FA4C

View file

@ -126,6 +126,7 @@ public class ClassContainer {
* @since 0.5.0 * @since 0.5.0
*/ */
public static ClassContainer findOrFallback(ClassContainer fallback, Find f, ProcessingEnvironment env, ObfuscationMapper mapper) { public static ClassContainer findOrFallback(ClassContainer fallback, Find f, ProcessingEnvironment env, ObfuscationMapper mapper) {
if(f == null) return fallback;
ClassContainer cl = ClassContainer.from(f, Find::value, f.className(), env, mapper); ClassContainer cl = ClassContainer.from(f, Find::value, f.className(), env, mapper);
return cl.fqn.equals("java.lang.Object") return cl.fqn.equals("java.lang.Object")
? fallback ? fallback