Remove unused getHu()

This commit is contained in:
Paul Schaub 2022-04-02 17:26:42 +02:00
parent d58fd85e5b
commit a91b6660bb
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -25,8 +25,6 @@ public abstract class WkdDirectoryStructure {
openpgpkey = new File(wellKnown, "openpgpkey"); openpgpkey = new File(wellKnown, "openpgpkey");
} }
public abstract File getHu();
public abstract Path getRelativeCertificatePath(String mailAddress); public abstract Path getRelativeCertificatePath(String mailAddress);
public abstract void mkdirs() throws IOException; public abstract void mkdirs() throws IOException;
@ -64,17 +62,12 @@ public abstract class WkdDirectoryStructure {
this.policy = new File(openpgpkey, "policy"); this.policy = new File(openpgpkey, "policy");
} }
@Override
public File getHu() {
return hu;
}
@Override @Override
public Path getRelativeCertificatePath(String mailAddress) { public Path getRelativeCertificatePath(String mailAddress) {
WKDAddress address = WKDAddress.fromEmail(mailAddress); WKDAddress address = WKDAddress.fromEmail(mailAddress);
String path = address.getDirectMethodURI().getPath(); String path = address.getDirectMethodURI().getPath();
String fileName = path.substring(path.lastIndexOf('/') + 1); String fileName = path.substring(path.lastIndexOf('/') + 1);
return rootDir.toPath().relativize(new File(getHu(), fileName).toPath()); return rootDir.toPath().relativize(new File(hu, fileName).toPath());
} }
@Override @Override
@ -111,17 +104,12 @@ public abstract class WkdDirectoryStructure {
this.policy = new File(domainFile, "policy"); this.policy = new File(domainFile, "policy");
} }
@Override
public File getHu() {
return hu;
}
@Override @Override
public Path getRelativeCertificatePath(String mailAddress) { public Path getRelativeCertificatePath(String mailAddress) {
WKDAddress address = WKDAddress.fromEmail(mailAddress); WKDAddress address = WKDAddress.fromEmail(mailAddress);
String path = address.getAdvancedMethodURI().getPath(); String path = address.getAdvancedMethodURI().getPath();
String fileName = path.substring(path.lastIndexOf('/') + 1); String fileName = path.substring(path.lastIndexOf('/') + 1);
return rootDir.toPath().relativize(new File(getHu(), fileName).toPath()); return rootDir.toPath().relativize(new File(hu, fileName).toPath());
} }
@Override @Override