Skip to content

Commit ee30d57

Browse files
committed
Remove duplicate escaped-names property
1 parent c87e3ba commit ee30d57

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/main/java/net/fabricmc/mappingio/format/tiny/Tiny2FileReader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ private static void read(ColumnFileReader reader, MappingVisitor visitor) throws
8989
if (visitHeader || firstIteration) {
9090
while (reader.nextLine(1)) {
9191
if (!visitHeader) {
92-
if (!escapeNames && reader.nextCol(Tiny2Util.escapedNamesProperty)) {
92+
if (!escapeNames && reader.nextCol(TinyProperties.ESCAPED_NAMES)) {
9393
escapeNames = true;
9494
}
9595
} else {
9696
String key = reader.nextCol();
9797
if (key == null) throw new IOException("missing property key in line "+reader.getLineNumber());
9898
String value = reader.nextEscapedCol(); // may be missing -> null
9999

100-
if (key.equals(Tiny2Util.escapedNamesProperty)) {
100+
if (key.equals(TinyProperties.ESCAPED_NAMES)) {
101101
escapeNames = true;
102102
}
103103

src/main/java/net/fabricmc/mappingio/format/tiny/Tiny2FileWriter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void visitNamespaces(String srcNamespace, List<String> dstNamespaces) thr
6060

6161
@Override
6262
public void visitMetadata(String key, String value) throws IOException {
63-
if (key.equals(Tiny2Util.escapedNamesProperty)) {
63+
if (key.equals(TinyProperties.ESCAPED_NAMES)) {
6464
escapeNames = true;
6565
wroteEscapedNamesProperty = true;
6666
}
@@ -80,7 +80,7 @@ public void visitMetadata(String key, String value) throws IOException {
8080
public boolean visitContent() throws IOException {
8181
if (escapeNames && !wroteEscapedNamesProperty) {
8282
write("\t");
83-
write(Tiny2Util.escapedNamesProperty);
83+
write(TinyProperties.ESCAPED_NAMES);
8484
writeLn();
8585
}
8686

src/main/java/net/fabricmc/mappingio/format/tiny/Tiny2Util.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,4 @@ public static String unescape(String str) {
8484

8585
private static final String toEscape = "\\\n\r\0\t";
8686
private static final String escaped = "\\nr0t";
87-
88-
static final String escapedNamesProperty = "escaped-names";
8987
}

0 commit comments

Comments
 (0)