Instead if/else blocks of simple returns, use a trigraph.
Change-Id: I7f2d1c325dfd07c507327afbde35894c566d26e9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
* @return parameter name, based on given Type
*/
public static String paramValue(final Type returnType, final String paramName) {
* @return parameter name, based on given Type
*/
public static String paramValue(final Type returnType, final String paramName) {
- if (returnType instanceof ConcreteType) {
- return paramName;
- } else {
- return paramName + ".getValue()";
- }
+ return returnType instanceof ConcreteType ? paramName : paramName + ".getValue()";
* @return string with comment in JAVA format
*/
public static String asJavadoc(final String comment) {
* @return string with comment in JAVA format
*/
public static String asJavadoc(final String comment) {
- if (comment == null) {
- return "";
- }
- return wrapToDocumentation(formatToParagraph(comment.trim(), 0));
+ return comment == null ? "" : wrapToDocumentation(formatToParagraph(comment.trim(), 0));
}
private static String formatDataForJavaDoc(final TypeMember type, final String additionalComment) {
}
private static String formatDataForJavaDoc(final TypeMember type, final String additionalComment) {