devtools - BuildFile - possible NPE
https://github.com/quarkusio/quarkus/blob/main/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/BuildFile.java#L131

```java
    private boolean isQuarkusExtension(final ArtifactKey key) {
        if (catalog != null) {
            return findInList(catalog.getExtensions(), key).isPresent();
        }
        return isDefinedInRegistry(catalog.getExtensions(), key);
    }
```

`return isDefinedInRegistry(catalog.getExtensions(), key);` would throw NPE for `catalog` if it is reached
diff --git a/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/BuildFile.java b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/BuildFile.java
index b96b4a80471..0e352cef901 100644
--- a/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/BuildFile.java
+++ b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/BuildFile.java
@@ -17,8 +17,6 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
-import java.util.Objects;
-import java.util.Optional;
 import java.util.Set;
 import java.util.stream.Collectors;
 
@@ -129,10 +127,7 @@ protected void writeToProjectFile(final String fileName, final byte[] content) t
     }
 
     private boolean isQuarkusExtension(final ArtifactKey key) {
-        if (catalog != null) {
-            return findInList(catalog.getExtensions(), key).isPresent();
-        }
-        return isDefinedInRegistry(catalog.getExtensions(), key);
+        return catalog != null ? isDefinedInRegistry(catalog.getExtensions(), key) : false;
     }
 
     private Set<ArtifactKey> getDependenciesKeys() throws IOException {
@@ -142,11 +137,4 @@ private Set<ArtifactKey> getDependenciesKeys() throws IOException {
     public static boolean isDefinedInRegistry(Collection<Extension> registry, final ArtifactKey key) {
         return Extensions.findInList(registry, key).isPresent();
     }
-
-    private static Optional<io.quarkus.registry.catalog.Extension> findInList(
-            Collection<io.quarkus.registry.catalog.Extension> list, final ArtifactKey key) {
-        ArtifactKey k = new ArtifactKey(key.getGroupId(), key.getArtifactId(), key.getClassifier(), key.getType());
-        return list.stream().filter(e -> Objects.equals(e.getArtifact().getKey(), k)).findFirst();
-    }
-
 }
['independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/BuildFile.java']