{"record":{"id":"34cd4c01234b3ca5","repo":"microg/GmsCore","slug":"transitions-can-t-be-empty","errorCode":null,"errorMessage":"transitions can't be empty.","messagePattern":"transitions can't be empty\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"play-services-location/src/main/java/com/google/android/gms/location/ActivityTransitionRequest.java","lineNumber":62,"sourceCode":"            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) {\n        if (this == o) return true;","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/microg/GmsCore/blob/157c9d86ac46c195a86c2f15ab55c84036223f95/play-services-location/src/main/java/com/google/android/gms/location/ActivityTransitionRequest.java#L44-L80","documentation":"The ActivityTransitionRequest(List<ActivityTransition>) constructor requires at least one transition: an empty transitions list (or one with duplicates) triggers IllegalArgumentException with this message during construction.","triggerScenarios":"Thrown at play-services-location/src/main/java/com/google/android/gms/location/ActivityTransitionRequest.java:62 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add at least one ActivityTransition before constructing the request","Skip requesting transition updates when no transitions are configured"],"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-14T05:17:10.506Z"}