{"record":{"id":"1686504ee2fe364f","repo":"microg/GmsCore","slug":"transitions-can-t-be-null","errorCode":null,"errorMessage":"transitions can't be null","messagePattern":"transitions can't be null","errorType":"exception","errorClass":"NullPointerException","httpStatus":null,"severity":"error","filePath":"play-services-location/src/main/java/com/google/android/gms/location/ActivityTransitionRequest.java","lineNumber":61,"sourceCode":"            int res = Integer.compare(o1.getActivityType(), o2.getActivityType());\n            if (res != 0) return res;\n            res = Integer.compare(o1.getTransitionType(), o2.getTransitionType());\n            return res;\n        }\n    };\n\n    private ActivityTransitionRequest() {\n    }\n\n    /**\n     * Creates an {@link ActivityTransitionRequest} object by specifying a list of interested activity transitions.\n     *\n     * @param transitions a list of interested activity transitions\n     * @throws NullPointerException     if {@code transitions} is {@code null}\n     * @throws IllegalArgumentException if {@code transitions} is an empty list or if there are duplicated transitions in this list\n     */\n    public ActivityTransitionRequest(List<ActivityTransition> transitions) {\n        if (transitions == null) throw new NullPointerException(\"transitions can't be null\");\n        if (transitions.isEmpty()) throw new IllegalArgumentException(\"transitions can't be empty.\");\n        Set<ActivityTransition> set = new TreeSet<ActivityTransition>(IS_SAME_TRANSITION);\n        set.addAll(transitions);\n        if (transitions.size() != set.size()) throw new IllegalArgumentException(\"Found duplicated transition\");\n        this.activityTransitions = Collections.unmodifiableList(transitions);\n    }\n\n    /**\n     * Serializes this request to the given intent.\n     *\n     * @param intent the intent to serailize this object to\n     */\n    public void serializeToIntentExtra(Intent intent) {\n        intent.putExtra(EXTRA, SafeParcelableSerializer.serializeToBytes(this));\n    }\n\n    @Override\n    public boolean equals(Object o) {","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/microg/GmsCore/blob/157c9d86ac46c195a86c2f15ab55c84036223f95/play-services-location/src/main/java/com/google/android/gms/location/ActivityTransitionRequest.java#L43-L79","documentation":"The ActivityTransitionRequest(List<ActivityTransition>) constructor validates its input: a null transitions list fails the Preconditions check and raises NullPointerException with this message before the request object is built.","triggerScenarios":"Thrown at play-services-location/src/main/java/com/google/android/gms/location/ActivityTransitionRequest.java:61 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a non-null list of ActivityTransition objects","Default to an empty list when source data is absent (then satisfy the non-empty check)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"157c9d86ac46c195a86c2f15ab55c84036223f95","analyzedAt":"2026-09-06T17:27:33.892Z","contentChangedAt":"2026-09-06T17:27:33.892Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}