Skip to content

Commit 3eeb63b

Browse files
authored
Update ResourceNamespace.java
Fix Error in this file causing crash in application
1 parent 855a1a8 commit 3eeb63b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

build-tools/xml-repository/src/main/java/com/tyron/xml/completion/repository/api/ResourceNamespace.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@ public String prefixToUri(@NotNull String namespacePrefix) {
145145
@NotNull
146146
public static ResourceNamespace fromPackageName(@NotNull String packageName) {
147147
assert !Strings.isNullOrEmpty(packageName);
148-
if (packageName.equals(SdkConstants.ANDROID_NS_NAME)) {
149-
// Make sure ANDROID is a singleton, so we can use object identity to check for it.
148+
if (packageName != null && packageName.equals(SdkConstants.ANDROID_NS_NAME)) {
150149
return ANDROID;
151150
} else {
152151
return new ResourceNamespace(SdkConstants.URI_PREFIX + packageName, packageName);

0 commit comments

Comments
 (0)