Make Code 10 Years Older
if (method == null) return null; PsiClassType classType = ObjectUtils.tryCast(call.getType(), PsiClassType.class); if (classType == null) return null; PsiResolveHelper resolveHelper = JavaPsiFacade.getInstance(call.getProject()).getR... boolean hasNonResolvedTypeParams = Arrays.stream(classType.getParameters()) .map(PsiUtil::resolveClassInClassTypeOnly) .anyMatch(aClass -> isNonResolvedTypeParameter(aClass, call, resolveHelper)); Expand boolean declaration to 'if else' Make code 10 years older Split it into the declaration and assignment Add method contract to 'andMatch' if (method == null) return null; PsiClassType classType = ObjectUtils.tryCast(call.getType(), PsiClassType.class); if (classType == null) return null; PsiResolveHelper resolveHelper = JavaPsiFacade.getInstance(call.getProject()).getR... boolean hasNonResolvedTypeParams = false; for (PsiType psiType : classType.getParameters()) { PsiClass aClass = PsiUtil.resolveClassInClassTypeOnly(psiType); if (isNonResolvedTypeParameter(aClass, call, resolveHelper)) { hasNonResolvedTypeParams = true; break; } } if (hasNonResolvedTypeParams) return null;
A programming IDE screenshot shows a modern Java stream-based boolean expression and a refactoring menu option to “Make code 10 years older.” The lower panel rewrites the same logic as an old-fashioned for loop with mutable state and break, parodying how legacy code looks compared with modern concise code. It is used as a reaction to deliberately outdated, verbose, or archaic programming style. EN: A programming IDE screenshot shows a modern Java stream-based boolean expression and a refactoring menu option to “Make code 10 years older.” The lower panel rewrites the same logic as an old-fashioned for loop with mutable state and break, parodying how legacy code looks compared with modern concise code. It is used as a reaction to deliberately outdated, verbose, or archaic programming style.
- @profunctor_io / 2665 2019-07-19
- Type
- image
- Size
- 800×675 · 124.2 KiB
- Mood
- саркастичный, абсурдный
- Language
- en
- Added