{"record":{"id":"13253f11e01f3462","repo":"microg/GmsCore","slug":"found-duplicated-transition","errorCode":null,"errorMessage":"Found duplicated transition","messagePattern":"Found duplicated transition","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"play-services-location/src/main/java/com/google/android/gms/location/ActivityTransitionRequest.java","lineNumber":65,"sourceCode":"        }\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;\n        if (o == null || getClass() != o.getClass()) return false;\n\n        ActivityTransitionRequest that = (ActivityTransitionRequest) o;","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/microg/GmsCore/blob/157c9d86ac46c195a86c2f15ab55c84036223f95/play-services-location/src/main/java/com/google/android/gms/location/ActivityTransitionRequest.java#L47-L83","documentation":"Validation in the ActivityTransitionRequest constructor: two entries describe the same (activityType, transitionType) pair — detected by the comparator-based duplicate check — which the contract forbids.","triggerScenarios":"Thrown at play-services-location/src/main/java/com/google/android/gms/location/ActivityTransitionRequest.java:65 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["De-duplicate transitions by (activityType, transitionType) before constructing the request","Build the list from a Set keyed on the transition pair"],"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"}