Commit ffe99433 authored by Stephane Nicoll's avatar Stephane Nicoll

Merge branch '1.5.x' into 2.0.x

parents a18c4137 fec5ecc5
...@@ -142,8 +142,7 @@ class TypeUtils { ...@@ -142,8 +142,7 @@ class TypeUtils {
String javadoc = (element != null String javadoc = (element != null
? this.env.getElementUtils().getDocComment(element) : null); ? this.env.getElementUtils().getDocComment(element) : null);
if (javadoc != null) { if (javadoc != null) {
javadoc = javadoc.replaceAll("\\n", ""); javadoc = javadoc.replaceAll("[\r\n]+", "").trim();
javadoc = javadoc.trim();
} }
return ("".equals(javadoc) ? null : javadoc); return ("".equals(javadoc) ? null : javadoc);
} }
......
...@@ -222,7 +222,7 @@ public class ConfigurationMetadataAnnotationProcessorTests { ...@@ -222,7 +222,7 @@ public class ConfigurationMetadataAnnotationProcessorTests {
assertThat(metadata).has(Metadata assertThat(metadata).has(Metadata
.withProperty("description.multi-line", String.class) .withProperty("description.multi-line", String.class)
.fromSource(DescriptionProperties.class).withDescription( .fromSource(DescriptionProperties.class).withDescription(
"This is a lengthy description that spans across multiple lines to showcase that the carriage return is cleaned automatically.")); "This is a lengthy description that spans across multiple lines to showcase that the line separators are cleaned automatically."));
} }
@Test @Test
......
...@@ -33,7 +33,7 @@ public class DescriptionProperties { ...@@ -33,7 +33,7 @@ public class DescriptionProperties {
/** /**
* This is a lengthy description that spans across multiple lines to showcase that the * This is a lengthy description that spans across multiple lines to showcase that the
* carriage return is cleaned automatically. * line separators are cleaned automatically.
*/ */
private String multiLine; private String multiLine;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment