Skip to content

Commit 4159e59

Browse files
authored
Remove ChildNameGenerator#recordLegacyName (#514)
1 parent 7ad11b2 commit 4159e59

File tree

5 files changed

+0
-32
lines changed

5 files changed

+0
-32
lines changed

src/main/java/com/cloudbees/hudson/plugins/folder/AbstractFolderDescriptor.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,5 @@ public String itemNameFromLegacy(@NonNull AbstractFolder<I> parent, @NonNull Str
237237
public String dirNameFromLegacy(@NonNull AbstractFolder<I> parent, @NonNull String legacyDirName) {
238238
return legacyDirName;
239239
}
240-
241-
@Override
242-
public void recordLegacyName(AbstractFolder<I> parent, I item, String legacyDirName) {
243-
// no-op
244-
}
245240
}
246241
}

src/main/java/com/cloudbees/hudson/plugins/folder/ChildNameGenerator.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -254,18 +254,6 @@ final File ensureItemDirectory(@NonNull P parent, @NonNull I item, @NonNull File
254254
@NonNull
255255
public abstract String dirNameFromLegacy(@NonNull P parent, @NonNull String legacyDirName);
256256

257-
/**
258-
* Record the ideal name inferred in the item when it was missing and has been inferred from the legacy directory
259-
* name.
260-
*
261-
* @param parent the parent.
262-
* @param item the item.
263-
* @param legacyDirName the name of the directory that the item was loaded from.
264-
* @throws IOException if the ideal name could not be attached to the item.
265-
* @deprecated removed without replacement
266-
*/
267-
public abstract void recordLegacyName(P parent, I item, String legacyDirName) throws IOException;
268-
269257
/**
270258
* Traces the creation of a new {@link Item} in a folder. Use
271259
* {@link ChildNameGenerator#beforeCreateItem(AbstractFolder, String, String)} to get the instance.

src/test/java/com/cloudbees/hudson/plugins/folder/ChildNameGeneratorAltTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -587,11 +587,6 @@ public String dirNameFromLegacy(@NonNull F parent,
587587
@NonNull String legacyDirName) {
588588
return mangle(Normalizer.normalize(legacyDirName, Normalizer.Form.NFD));
589589
}
590-
591-
@Override
592-
public void recordLegacyName(F parent, J item, String legacyDirName) throws IOException {
593-
item.addProperty(new NameProperty(Normalizer.normalize(legacyDirName, Normalizer.Form.NFD)));
594-
}
595590
}
596591

597592

src/test/java/com/cloudbees/hudson/plugins/folder/ChildNameGeneratorRecTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -488,11 +488,6 @@ public String dirNameFromLegacy(@NonNull F parent,
488488
@NonNull String legacyDirName) {
489489
return mangle(rawDecode(legacyDirName));
490490
}
491-
492-
@Override
493-
public void recordLegacyName(F parent, J item, String legacyDirName) throws IOException {
494-
item.addProperty(new NameProperty(rawDecode(legacyDirName)));
495-
}
496491
}
497492

498493
/**

src/test/java/com/cloudbees/hudson/plugins/folder/ChildNameGeneratorTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -602,11 +602,6 @@ public String dirNameFromLegacy(@NonNull F parent,
602602
@NonNull String legacyDirName) {
603603
return mangle(legacyDirName);
604604
}
605-
606-
@Override
607-
public void recordLegacyName(F parent, J item, String legacyDirName) throws IOException {
608-
item.addProperty(new NameProperty(legacyDirName));
609-
}
610605
}
611606

612607
static CharSequence asJavaString(String rawString) {

0 commit comments

Comments
 (0)