Skip to content

Commit 48798f9

Browse files
committed
Remove duplicate escaped-names property
1 parent 420e73c commit 48798f9

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
@@ -86,15 +86,15 @@ private static void read(ColumnFileReader reader, MappingVisitor visitor) throws
8686
if (visitHeader || firstIteration) {
8787
while (reader.nextLine(1)) {
8888
if (!visitHeader) {
89-
if (!escapeNames && reader.nextCol(Tiny2Util.escapedNamesProperty)) {
89+
if (!escapeNames && reader.nextCol(TinyProperties.ESCAPED_NAMES)) {
9090
escapeNames = true;
9191
}
9292
} else {
9393
String key = reader.nextCol();
9494
if (key == null) throw new IOException("missing property key in line "+reader.getLineNumber());
9595
String value = reader.nextEscapedCol(); // may be missing -> null
9696

97-
if (key.equals(Tiny2Util.escapedNamesProperty)) {
97+
if (key.equals(TinyProperties.ESCAPED_NAMES)) {
9898
escapeNames = true;
9999
}
100100

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
@@ -81,6 +81,4 @@ public static String unescape(String str) {
8181

8282
private static final String toEscape = "\\\n\r\0\t";
8383
private static final String escaped = "\\nr0t";
84-
85-
static final String escapedNamesProperty = "escaped-names";
8684
}

0 commit comments

Comments
 (0)