Skip to content

Commit

Permalink
Fix: fix list apps failed
Browse files Browse the repository at this point in the history
  • Loading branch information
Kr328 committed Feb 15, 2022
1 parent 91a6dee commit 9c90f38
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
Expand Down Expand Up @@ -99,7 +100,12 @@ synchronized void removeExempted(String packageName, int userId) {
}

synchronized Set<String> getAllExempted(int userId) {
return packages.get(userId);
final Set<String> scoped = packages.get(userId);
if (scoped == null) {
return Collections.emptySet();
}

return scoped;
}

private void writePackages() {
Expand Down

0 comments on commit 9c90f38

Please sign in to comment.