{"id":"af6ac804731850da","repo":"junit-team/junit5","slug":"detected-cycle-in-inner-class-hierarchy-between-s","errorCode":null,"errorMessage":"Detected cycle in inner class hierarchy between %s and %s","messagePattern":"Detected cycle in inner class hierarchy between (.+?) and (.+?)","errorType":"exception","errorClass":"JUnitException","httpStatus":null,"severity":"error","filePath":"junit-platform-commons/src/main/java/org/junit/platform/commons/util/ReflectionUtils.java","lineNumber":2022,"sourceCode":"\t * exception}; otherwise, this method returns the supplied {@code Throwable}.\n\t */\n\tstatic Throwable getUnderlyingCause(Throwable t) {\n\t\tif (t instanceof InvocationTargetException ite) {\n\t\t\treturn getUnderlyingCause(ite.getTargetException());\n\t\t}\n\t\treturn t;\n\t}\n\n\t/**\n\t * @since 1.13.2\n\t */\n\t@API(status = INTERNAL, since = \"1.13.2\")\n\tpublic enum CycleErrorHandling {\n\n\t\tTHROW_EXCEPTION {\n\t\t\t@Override\n\t\t\tvoid handle(Class<?> clazz, Class<?> enclosing) {\n\t\t\t\tthrow new JUnitException(\"Detected cycle in inner class hierarchy between %s and %s\".formatted(\n\t\t\t\t\tclazz.getName(), enclosing.getName()));\n\t\t\t}\n\t\t},\n\n\t\tABORT_VISIT {\n\t\t\t@Override\n\t\t\tvoid handle(Class<?> clazz, Class<?> enclosing) {\n\t\t\t\t// ignore\n\t\t\t}\n\t\t};\n\n\t\tabstract void handle(Class<?> clazz, Class<?> enclosing);\n\t}\n\n}\n","sourceCodeStart":2004,"sourceCodeEnd":2038,"githubUrl":"https://github.com/junit-team/junit5/blob/956246301e03d757539f7b76dd5a91f298637563/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ReflectionUtils.java#L2004-L2038","documentation":"Error \"Detected cycle in inner class hierarchy between %s and %s\" thrown in junit-team/junit5.","triggerScenarios":"Thrown at junit-platform-commons/src/main/java/org/junit/platform/commons/util/ReflectionUtils.java:2022 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"956246301e03d757539f7b76dd5a91f298637563","analyzedAt":"2026-08-04T19:25:17.049Z","schemaVersion":2}