-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Bootstrapper's intitialize method should be named initialize #25400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for spotting this and opening a PR, @cprayer. We'll have to refine things a bit to deprecate the |
f32bfcb
to
a7367b4
Compare
@wilkinsona Thank you for your review. I have changed the code as you said. How about this? |
5bea2ec
to
78297b9
Compare
Oh dear, that's an embarrassing typo from me in the original 🤦 . Thanks for spotting it @cprayer. |
This doesn't handle the case where |
Thanks for looking, @spencergibb.
I think it would be better if we could get into a situation where implementors don't have to have any code in the deprecated method. Would it work if we make |
I wonder if we're going to have a binary compatibility issue if people are using the |
I'm guessing we might need to put the smarts in |
I'm fine either way, just as long as existing implementors don't get broken because they may use the deprecated method or have used a lambda. |
I don't believe we will.
That feels risky to me as, depending on how someone has implemented their I think we can do this with a |
@wilkinsona First version (https://github.com/cprayer/binary-compatibility-test-first-version) Main.java package org.example;
public class Main {
public static void main(String[] args) {
Typo typo = () -> "hello world";
Test test = new Test();
test.test(typo);
System.out.println(typo.typpo());
}
} Test.java package org.example;
public class Test {
public void test(Typo typo) {
System.out.println(typo.typpo());
}
} Typo.java package org.example;
public interface Typo {
String typpo();
} First version result shasum -a 256 first/build/classes/java/main/org/example/Main.class
11425f57f59d52ef0076638eb71d7478d6be2ab4a9e2b9ff5d1f89872022a7d4 first/build/classes/java/main/org/example/Main.class Second version(https://github.com/cprayer/binary-compatibility-test-second-version) Main.java package org.example;
public class Main {
public static void main(String[] args) {
Typo typo = () -> "hello world";
Test test = new Test();
test.test(typo);
System.out.println(typo.typpo());
}
} Test.java package org.example;
public class Test {
public void test(Typo typo) {
System.out.println(typo.typo());
}
} Typo.java package org.example;
public interface Typo {
String typpo();
default String typo() {
return typpo();
}
} Second version result shasum -a 256 second/build/classes/java/main/org/example/Main.class
11425f57f59d52ef0076638eb71d7478d6be2ab4a9e2b9ff5d1f89872022a7d4 second/build/classes/java/main/org/example/Main.class I think it doesn't have binary compatibility issue. |
That's really helpful, @cprayer. Thank you. In addition to that check, I've built 2.4.4-SNAPSHOT locally and used Spring Cloud Context 3.0.1 with it. |
Thanks for checking on that @wilkinsona. |
@cprayer Thanks very much for making your first contribution to Spring Boot. |
This PR fixes a minor typo in Bootstrapper class.