Don't validate completely empty yaml subdocs in application.yml

See https://github.com/spring-projects/sts4/issues/711
This commit is contained in:
Kris De Volder
2022-06-21 14:40:58 -07:00
parent 24667d6127
commit 7eccab1262
2 changed files with 28 additions and 1 deletions

View File

@@ -90,6 +90,27 @@ public class ApplicationYamlEditorTest extends AbstractPropsEditorTest {
}
////////////////////////////////////////////////////////////////////////////////////////
@Test public void test_GH_711_error_on_extra_empty_yaml_document() throws Exception {
//https://github.com/spring-projects/sts4/issues/711
defaultTestData();
Editor editor = newEditor(
"spring:\n" +
" application:\n" +
" name: demo\n" +
"---\n" +
"spring:\n" +
" profiles:\n" +
" active: dev\n" +
"services:\n" +
" common:\n" +
" url: https://getguid.azurewebsites.net\n" +
"---\n"
);
editor.assertProblems(
"services|Unknown"
);
}
@Test public void test_GH_615_deprecated_spring_profiles() throws Exception {
IJavaProject p = createPredefinedMavenProject("empty-boot-2.4.4-app");