{"record":{"id":"f8b16e83817bc8b4","repo":"Tencent/tinker","slug":"listener-must-not-be-null","errorCode":null,"errorMessage":"listener must not be null.","messagePattern":"listener must not be null\\.","errorType":"exception","errorClass":"TinkerRuntimeException","httpStatus":null,"severity":"error","filePath":"tinker-android/tinker-android-lib-no-op/src/main/java/com/tencent/tinker/lib/tinker/Tinker.java","lineNumber":357,"sourceCode":"            }\n            this.loadReporter = loadReporter;\n            return this;\n        }\n\n        public Builder patchReporter(PatchReporter patchReporter) {\n            if (patchReporter == null) {\n                throw new TinkerRuntimeException(\"patchReporter must not be null.\");\n            }\n            if (this.patchReporter != null) {\n                throw new TinkerRuntimeException(\"patchReporter is already set.\");\n            }\n            this.patchReporter = patchReporter;\n            return this;\n        }\n\n        public Builder listener(PatchListener listener) {\n            if (listener == null) {\n                throw new TinkerRuntimeException(\"listener must not be null.\");\n            }\n            if (this.listener != null) {\n                throw new TinkerRuntimeException(\"listener is already set.\");\n            }\n            this.listener = listener;\n            return this;\n        }\n\n        public Tinker build() {\n            if (status == -1) {\n                status = ShareConstants.TINKER_ENABLE_ALL;\n            }\n\n            if (loadReporter == null) {\n                loadReporter = new DefaultLoadReporter(context);\n            }\n\n            if (patchReporter == null) {","sourceCodeStart":339,"sourceCodeEnd":375,"githubUrl":"https://github.com/Tencent/tinker/blob/1b7ea02c239840f563ea64fb5bd286eb98d4011e/tinker-android/tinker-android-lib-no-op/src/main/java/com/tencent/tinker/lib/tinker/Tinker.java#L339-L375","documentation":"Error \"listener must not be null.\" thrown in Tencent/tinker.","triggerScenarios":"Thrown at tinker-android/tinker-android-lib-no-op/src/main/java/com/tencent/tinker/lib/tinker/Tinker.java:357 when the library encounters an invalid state.","commonSituations":"Thrown from Tinker.Builder.listener() when the supplied PatchListener is null. Usually caused by a listener field that was never initialized before Tinker installation.","solutions":["Pass a non-null PatchListener implementation to Builder.listener().","Guard the call: only call Builder.listener(listener) after verifying listener != null."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1b7ea02c239840f563ea64fb5bd286eb98d4011e","analyzedAt":"2026-08-14T15:16:52.110Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}