equal
deleted
inserted
replaced
2965 } |
2965 } |
2966 int outdent = lines().filter(not(String::isBlank)) |
2966 int outdent = lines().filter(not(String::isBlank)) |
2967 .mapToInt(String::indexOfNonWhitespace) |
2967 .mapToInt(String::indexOfNonWhitespace) |
2968 .min() |
2968 .min() |
2969 .orElse(0); |
2969 .orElse(0); |
2970 return indent(n - outdent, true); |
2970 // overflow-conscious code |
|
2971 int indent = n - outdent; |
|
2972 return indent(indent > n ? Integer.MIN_VALUE : indent, true); |
2971 } |
2973 } |
2972 |
2974 |
2973 /** |
2975 /** |
2974 * This object (which is already a string!) is itself returned. |
2976 * This object (which is already a string!) is itself returned. |
2975 * |
2977 * |