|
19 | 19 | import java.io.Serializable;
|
20 | 20 | import java.lang.reflect.Method;
|
21 | 21 | import java.util.Objects;
|
22 |
| -import java.util.function.BiFunction; |
23 | 22 | import java.util.function.Supplier;
|
24 | 23 |
|
25 |
| -import javax.annotation.Nullable; |
26 |
| - |
27 | 24 | /**
|
28 | 25 | * Represents the line endings which should be written by the tool.
|
29 | 26 | */
|
@@ -76,16 +73,14 @@ public Policy createPolicy(File projectDir, Supplier<Iterable<File>> toFormat) {
|
76 | 73 | }
|
77 | 74 | }
|
78 | 75 |
|
79 |
| - private static volatile @Nullable BiFunction<File, Supplier<Iterable<File>>, Policy> gitAttributesPolicyCreator; |
80 |
| - |
81 | 76 | // @formatter:off
|
82 | 77 | /** Should use {@link #createPolicy(File, Supplier)} instead, but this will work iff its a path-independent LineEnding policy. */
|
83 | 78 | public Policy createPolicy() {
|
84 | 79 | switch (this) {
|
85 | 80 | case PLATFORM_NATIVE: return _platformNativePolicy;
|
86 | 81 | case WINDOWS: return WINDOWS_POLICY;
|
87 | 82 | case UNIX: return UNIX_POLICY;
|
88 |
| - case MAC_CLASSIC: return MAC_CLASSIC_POLICY; |
| 83 | + case MAC_CLASSIC: return MAC_CLASSIC_POLICY; |
89 | 84 | default: throw new UnsupportedOperationException(this + " is a path-specific line ending.");
|
90 | 85 | }
|
91 | 86 | }
|
@@ -129,7 +124,7 @@ public String str() {
|
129 | 124 | case PLATFORM_NATIVE: return _platformNative;
|
130 | 125 | case WINDOWS: return "\r\n";
|
131 | 126 | case UNIX: return "\n";
|
132 |
| - case MAC_CLASSIC: return "\r"; |
| 127 | + case MAC_CLASSIC: return "\r"; |
133 | 128 | default: throw new UnsupportedOperationException(this + " is a path-specific line ending.");
|
134 | 129 | }
|
135 | 130 | }
|
|
0 commit comments