mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Make it easier to subclass Launchers
Change constructors from `package private` to `protected` for subclasses to use. Closes gh-3741
This commit is contained in:
parent
60b8cb8a47
commit
61ac04aa4c
@ -55,7 +55,7 @@ public abstract class ExecutableArchiveLauncher extends Launcher {
|
||||
this.javaAgentDetector = javaAgentDetector;
|
||||
}
|
||||
|
||||
ExecutableArchiveLauncher(Archive archive) {
|
||||
protected ExecutableArchiveLauncher(Archive archive) {
|
||||
this.javaAgentDetector = new InputArgumentsJavaAgentDetector();
|
||||
this.archive = archive;
|
||||
}
|
||||
|
@ -31,6 +31,13 @@ public class JarLauncher extends ExecutableArchiveLauncher {
|
||||
|
||||
private static final AsciiBytes LIB = new AsciiBytes("lib/");
|
||||
|
||||
public JarLauncher() {
|
||||
}
|
||||
|
||||
protected JarLauncher(Archive archive) {
|
||||
super(archive);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isNestedArchive(Archive.Entry entry) {
|
||||
return !entry.isDirectory() && entry.getName().startsWith(LIB);
|
||||
|
@ -42,7 +42,7 @@ public class WarLauncher extends ExecutableArchiveLauncher {
|
||||
super();
|
||||
}
|
||||
|
||||
WarLauncher(Archive archive) {
|
||||
protected WarLauncher(Archive archive) {
|
||||
super(archive);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user