FindDivergedExceptionLineHandler (@Nullable PsiFile file, @Nullable String className, @Nullable String methodName, @Nullable ExceptionLineRefiner refiner, int lineStart, int lineEnd, @Nullable Editor targetEditor) { //it can be ambiguous to find lambda anonymous classes if (file == null || className == null || methodName == null || refiner == null || targetEditor == null) { return null; } if (DumbService.isDumb(file.getProject())) { return null; } if (!file.getLanguage().is(JavaLanguage.INSTANCE)) { return null; } if (canBeBridge(file, lineStart, lineEnd, methodName)) { return null; } if (hasAnonymousClass(className)) return null; className = className.replaceAll("\\$", "."); MetaInfoCallType callType = MetaInfoCallType.ORDINARY; if (methodName.contains("$")) { int lambdaIndex = methodName.indexOf(LAMBDA_KEYWORD); if (lambdaIndex != -1) { callType = MetaInfoCallType.LAMBDA; methodName = methodName.substring(lambdaIndex + LAMBDA_KEYWORD.length()); int nextDelimiter = methodName.indexOf("$"); if (nextDelimiter != -1) { methodName = methodName.substring(0, nextDelimiter); if (methodName.contains("$") || methodName.equals("static") || methodName.equals("new")) return null; } } else { return null; } if (methodName.isEmpty()) { return null; } } callType = findInitCallType(methodName, callType); MetaInfo metaInfo = new MetaInfo(className, methodName, callType); if (skipByRefiner(file, refiner, lineStart, lineEnd)) return null; return new FindDivergedExceptionLineHandler(file, metaInfo, refiner, targetEditor); }