Skip to content

Commit e125085

Browse files
committed
Merge branch '1.5.x' into 2.0.x
2 parents 60e4e51 + 4e96587 commit e125085

File tree

138 files changed

+274
-269
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+274
-269
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundrySecurityService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public Map<String, String> fetchTokenKeys() {
111111
return extractTokenKeys(this.restTemplate
112112
.getForObject(getUaaUrl() + "/token_keys", Map.class));
113113
}
114-
catch (HttpStatusCodeException e) {
114+
catch (HttpStatusCodeException ex) {
115115
throw new CloudFoundryAuthorizationException(Reason.SERVICE_UNAVAILABLE,
116116
"UAA not reachable");
117117
}

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/condition/ConditionsReportEndpoint.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ public static class MessageAndConditions {
175175

176176
public MessageAndConditions(ConditionAndOutcomes conditionAndOutcomes) {
177177
for (ConditionAndOutcome conditionAndOutcome : conditionAndOutcomes) {
178-
List<MessageAndCondition> target = conditionAndOutcome.getOutcome()
179-
.isMatch() ? this.matched : this.notMatched;
178+
List<MessageAndCondition> target = (conditionAndOutcome.getOutcome()
179+
.isMatch() ? this.matched : this.notMatched);
180180
target.add(new MessageAndCondition(conditionAndOutcome));
181181
}
182182
}

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementContextConfigurationImportSelector.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ private ManagementContextType readContextType(
132132
private int readOrder(AnnotationMetadata annotationMetadata) {
133133
Map<String, Object> attributes = annotationMetadata
134134
.getAnnotationAttributes(Order.class.getName());
135-
Integer order = (attributes == null ? null
136-
: (Integer) attributes.get("value"));
137-
return (order == null ? Ordered.LOWEST_PRECEDENCE : order);
135+
Integer order = (attributes != null ? (Integer) attributes.get("value")
136+
: null);
137+
return (order != null ? order : Ordered.LOWEST_PRECEDENCE);
138138
}
139139

140140
public String getClassName() {

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/OrderedHealthAggregator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ private class StatusComparator implements Comparator<Status> {
9898
public int compare(Status s1, Status s2) {
9999
int i1 = this.statusOrder.indexOf(s1.getCode());
100100
int i2 = this.statusOrder.indexOf(s2.getCode());
101-
return (i1 < i2 ? -1 : (i1 == i2 ? s1.getCode().compareTo(s2.getCode()) : 1));
101+
return (i1 < i2 ? -1 : (i1 != i2 ? 1 : s1.getCode().compareTo(s2.getCode())));
102102
}
103103

104104
}

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/logging/LoggersEndpoint.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public LoggerLevels(LoggerConfiguration configuration) {
112112
}
113113

114114
private String getName(LogLevel level) {
115-
return (level == null ? null : level.name());
115+
return (level != null ? level.name() : null);
116116
}
117117

118118
public String getConfiguredLevel() {

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/solr/SolrHealthIndicator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ protected void doHealthCheck(Health.Builder builder) throws Exception {
4848
request.setAction(CoreAdminParams.CoreAdminAction.STATUS);
4949
CoreAdminResponse response = request.process(this.solrClient);
5050
int statusCode = response.getStatus();
51-
Status status = (statusCode == 0 ? Status.UP : Status.DOWN);
51+
Status status = (statusCode != 0 ? Status.DOWN : Status.UP);
5252
builder.status(status).withDetail("status", statusCode);
5353
}
5454

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelector.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ private List<String> getExcludeAutoConfigurationsProperty() {
225225
}
226226
String[] excludes = getEnvironment()
227227
.getProperty(PROPERTY_NAME_AUTOCONFIGURE_EXCLUDE, String[].class);
228-
return (excludes == null ? Collections.emptyList() : Arrays.asList(excludes));
228+
return (excludes != null ? Arrays.asList(excludes) : Collections.emptyList());
229229
}
230230

231231
private List<String> filter(List<String> configurations,
@@ -273,7 +273,7 @@ protected final <T> List<T> removeDuplicates(List<T> list) {
273273

274274
protected final List<String> asList(AnnotationAttributes attributes, String name) {
275275
String[] value = attributes.getStringArray(name);
276-
return Arrays.asList(value == null ? new String[0] : value);
276+
return Arrays.asList(value != null ? value : new String[0]);
277277
}
278278

279279
private void fireAutoConfigurationImportEvents(List<String> configurations,

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationSorter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ private int getOrder() {
213213
}
214214
Map<String, Object> attributes = getAnnotationMetadata()
215215
.getAnnotationAttributes(AutoConfigureOrder.class.getName());
216-
return (attributes == null ? AutoConfigureOrder.DEFAULT_ORDER
217-
: (Integer) attributes.get("value"));
216+
return (attributes != null ? (Integer) attributes.get("value")
217+
: AutoConfigureOrder.DEFAULT_ORDER);
218218
}
219219

220220
private boolean wasProcessed() {

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/ImportAutoConfigurationImportSelector.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ protected Set<String> getExclusions(AnnotationMetadata metadata,
109109
for (String annotationName : ANNOTATION_NAMES) {
110110
AnnotationAttributes merged = AnnotatedElementUtils
111111
.getMergedAnnotationAttributes(source, annotationName);
112-
Class<?>[] exclude = (merged == null ? null
113-
: merged.getClassArray("exclude"));
112+
Class<?>[] exclude = (merged != null ? merged.getClassArray("exclude")
113+
: null);
114114
if (exclude != null) {
115115
for (Class<?> excludeClass : exclude) {
116116
exclusions.add(excludeClass.getName());

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public String determineUsername() {
206206
return this.username;
207207
}
208208
Address address = this.parsedAddresses.get(0);
209-
return address.username == null ? this.username : address.username;
209+
return (address.username != null ? address.username : this.username);
210210
}
211211

212212
public void setUsername(String username) {
@@ -229,7 +229,7 @@ public String determinePassword() {
229229
return getPassword();
230230
}
231231
Address address = this.parsedAddresses.get(0);
232-
return address.password == null ? getPassword() : address.password;
232+
return (address.password != null ? address.password : getPassword());
233233
}
234234

235235
public void setPassword(String password) {
@@ -256,7 +256,7 @@ public String determineVirtualHost() {
256256
return getVirtualHost();
257257
}
258258
Address address = this.parsedAddresses.get(0);
259-
return address.virtualHost == null ? getVirtualHost() : address.virtualHost;
259+
return (address.virtualHost != null ? address.virtualHost : getVirtualHost());
260260
}
261261

262262
public void setVirtualHost(String virtualHost) {

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
124124
}
125125

126126
private String[] append(String[] array, String value) {
127-
String[] result = new String[array == null ? 1 : array.length + 1];
127+
String[] result = new String[array != null ? array.length + 1 : 1];
128128
if (array != null) {
129129
System.arraycopy(array, 0, result, 0, array.length);
130130
}

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/BeanTypeRegistry.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,9 @@ else if (!hasMatchingParameterTypes(candidate, uniqueMethod)) {
285285

286286
private Method[] getCandidateFactoryMethods(BeanDefinition definition,
287287
Class<?> factoryClass) {
288-
return shouldConsiderNonPublicMethods(definition)
288+
return (shouldConsiderNonPublicMethods(definition)
289289
? ReflectionUtils.getAllDeclaredMethods(factoryClass)
290-
: factoryClass.getMethods();
290+
: factoryClass.getMethods());
291291
}
292292

293293
private boolean shouldConsiderNonPublicMethods(BeanDefinition definition) {

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public boolean isEmpty() {
6161

6262
@Override
6363
public String toString() {
64-
return (this.message == null ? "" : this.message);
64+
return (this.message != null ? this.message : "");
6565
}
6666

6767
@Override
@@ -358,7 +358,7 @@ public ConditionMessage items(Object... items) {
358358
* @return a built {@link ConditionMessage}
359359
*/
360360
public ConditionMessage items(Style style, Object... items) {
361-
return items(style, items == null ? null : Arrays.asList(items));
361+
return items(style, items != null ? Arrays.asList(items) : null);
362362
}
363363

364364
/**
@@ -415,7 +415,7 @@ protected Object applyToItem(Object item) {
415415
QUOTE {
416416
@Override
417417
protected String applyToItem(Object item) {
418-
return (item == null ? null : "'" + item + "'");
418+
return (item != null ? "'" + item + "'" : null);
419419
}
420420
};
421421

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionOutcome.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public boolean equals(Object obj) {
146146

147147
@Override
148148
public String toString() {
149-
return (this.message == null ? "" : this.message.toString());
149+
return (this.message != null ? this.message.toString() : "");
150150
}
151151

152152
/**

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnBeanCondition.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ private String[] getBeanNamesForAnnotation(
284284
collectBeanNamesForAnnotation(names, beanFactory, annotationType,
285285
considerHierarchy);
286286
}
287-
catch (ClassNotFoundException e) {
287+
catch (ClassNotFoundException ex) {
288288
// Continue
289289
}
290290
return StringUtils.toStringArray(names);

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnExpressionCondition.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ public ConditionOutcome getMatchOutcome(ConditionContext context,
4444
String rawExpression = expression;
4545
expression = context.getEnvironment().resolvePlaceholders(expression);
4646
ConfigurableListableBeanFactory beanFactory = context.getBeanFactory();
47-
BeanExpressionResolver resolver = (beanFactory != null)
48-
? beanFactory.getBeanExpressionResolver() : null;
49-
BeanExpressionContext expressionContext = (beanFactory != null)
50-
? new BeanExpressionContext(beanFactory, null) : null;
47+
BeanExpressionResolver resolver = (beanFactory != null
48+
? beanFactory.getBeanExpressionResolver() : null);
49+
BeanExpressionContext expressionContext = (beanFactory != null
50+
? new BeanExpressionContext(beanFactory, null) : null);
5151
if (resolver == null) {
5252
resolver = new StandardBeanExpressionResolver();
5353
}

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnJavaCondition.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected ConditionOutcome getMatchOutcome(Range range, JavaVersion runningVersi
5353
JavaVersion version) {
5454
boolean match = isWithin(runningVersion, range, version);
5555
String expected = String.format(
56-
range == Range.EQUAL_OR_NEWER ? "(%s or newer)" : "(older than %s)",
56+
range != Range.EQUAL_OR_NEWER ? "(older than %s)" : "(%s or newer)",
5757
version);
5858
ConditionMessage message = ConditionMessage
5959
.forCondition(ConditionalOnJava.class, expected)

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnResourceCondition.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ public ConditionOutcome getMatchOutcome(ConditionContext context,
4646
AnnotatedTypeMetadata metadata) {
4747
MultiValueMap<String, Object> attributes = metadata
4848
.getAllAnnotationAttributes(ConditionalOnResource.class.getName(), true);
49-
ResourceLoader loader = context.getResourceLoader() == null
50-
? this.defaultResourceLoader : context.getResourceLoader();
49+
ResourceLoader loader = (context.getResourceLoader() != null
50+
? context.getResourceLoader() : this.defaultResourceLoader);
5151
List<String> locations = new ArrayList<>();
5252
collectValues(locations, attributes.get("resources"));
5353
Assert.isTrue(!locations.isEmpty(),

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/diagnostics/analyzer/NoSuchBeanDefinitionFailureAnalyzer.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ protected FailureAnalysis analyze(Throwable rootFailure,
8080
cause);
8181
StringBuilder message = new StringBuilder();
8282
message.append(String.format("%s required %s that could not be found.%n",
83-
description == null ? "A component" : description,
83+
(description != null ? description : "A component"),
8484
getBeanDescription(cause)));
8585
if (!autoConfigurationResults.isEmpty()) {
8686
for (AutoConfigurationResult provider : autoConfigurationResults) {
@@ -169,7 +169,7 @@ private class Source {
169169
Source(String source) {
170170
String[] tokens = source.split("#");
171171
this.className = (tokens.length > 1 ? tokens[0] : source);
172-
this.methodName = (tokens.length == 2 ? tokens[1] : null);
172+
this.methodName = (tokens.length != 2 ? null : tokens[1]);
173173
}
174174

175175
public String getClassName() {
@@ -229,8 +229,8 @@ private boolean isMatch(MethodMetadata candidate, Source source,
229229
private boolean hasName(MethodMetadata methodMetadata, String name) {
230230
Map<String, Object> attributes = methodMetadata
231231
.getAnnotationAttributes(Bean.class.getName());
232-
String[] candidates = (attributes == null ? null
233-
: (String[]) attributes.get("name"));
232+
String[] candidates = (attributes != null ? (String[]) attributes.get("name")
233+
: null);
234234
if (candidates != null) {
235235
for (String candidate : candidates) {
236236
if (candidate.equals(name)) {

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public void setUser(String user) {
109109
}
110110

111111
public String getPassword() {
112-
return (this.password == null ? "" : this.password);
112+
return (this.password != null ? this.password : "");
113113
}
114114

115115
public void setPassword(String password) {

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/http/HttpEncodingProperties.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public void setMapping(Map<Locale, Charset> mapping) {
104104
}
105105

106106
public boolean shouldForce(Type type) {
107-
Boolean force = (type == Type.REQUEST ? this.forceRequest : this.forceResponse);
107+
Boolean force = (type != Type.REQUEST ? this.forceResponse : this.forceRequest);
108108
if (force == null) {
109109
force = this.force;
110110
}

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/http/HttpMessageConvertersAutoConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public HttpMessageConvertersAutoConfiguration(
6969
@ConditionalOnMissingBean
7070
public HttpMessageConverters messageConverters() {
7171
return new HttpMessageConverters(
72-
this.converters == null ? Collections.emptyList() : this.converters);
72+
this.converters != null ? this.converters : Collections.emptyList());
7373
}
7474

7575
@Configuration

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/info/ProjectInfoAutoConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public BuildProperties buildProperties() throws Exception {
7272
}
7373

7474
protected Properties loadFrom(Resource location, String prefix) throws IOException {
75-
String p = prefix.endsWith(".") ? prefix : prefix + ".";
75+
String p = (prefix.endsWith(".") ? prefix : prefix + ".");
7676
Properties source = PropertiesLoaderUtils.loadProperties(location);
7777
Properties target = new Properties();
7878
for (String key : source.stringPropertyNames()) {

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public ConditionOutcome getMatchOutcome(ConditionContext context,
121121
private ClassLoader getDataSourceClassLoader(ConditionContext context) {
122122
Class<?> dataSourceClass = DataSourceBuilder
123123
.findType(context.getClassLoader());
124-
return (dataSourceClass == null ? null : dataSourceClass.getClassLoader());
124+
return (dataSourceClass != null ? dataSourceClass.getClassLoader() : null);
125125
}
126126

127127
}

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ private static String parseApplicationPath(String applicationPath) {
195195
if (!applicationPath.startsWith("/")) {
196196
applicationPath = "/" + applicationPath;
197197
}
198-
return applicationPath.equals("/") ? "/*" : applicationPath + "/*";
198+
return (applicationPath.equals("/") ? "/*" : applicationPath + "/*");
199199
}
200200

201201
@Override

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ private ToStringFriendlyFeatureAwareVersion(String version,
257257
Set<Feature> features) {
258258
Assert.notNull(version, "version must not be null");
259259
this.version = version;
260-
this.features = (features == null ? Collections.emptySet() : features);
260+
this.features = (features != null ? features : Collections.emptySet());
261261
}
262262

263263
@Override

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/TemplateAvailabilityProviders.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ protected boolean removeEldestEntry(
7676
* @param applicationContext the source application context
7777
*/
7878
public TemplateAvailabilityProviders(ApplicationContext applicationContext) {
79-
this(applicationContext == null ? null : applicationContext.getClassLoader());
79+
this(applicationContext != null ? applicationContext.getClassLoader() : null);
8080
}
8181

8282
/**
@@ -143,12 +143,12 @@ public TemplateAvailabilityProvider getProvider(String view, Environment environ
143143
if (provider == null) {
144144
synchronized (this.cache) {
145145
provider = findProvider(view, environment, classLoader, resourceLoader);
146-
provider = (provider == null ? NONE : provider);
146+
provider = (provider != null ? provider : NONE);
147147
this.resolved.put(view, provider);
148148
this.cache.put(view, provider);
149149
}
150150
}
151-
return (provider == NONE ? null : provider);
151+
return (provider != NONE ? provider : null);
152152
}
153153

154154
private TemplateAvailabilityProvider findProvider(String view,

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorController.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public ModelAndView errorHtml(HttpServletRequest request,
9191
request, isIncludeStackTrace(request, MediaType.TEXT_HTML)));
9292
response.setStatus(status.value());
9393
ModelAndView modelAndView = resolveErrorView(request, response, status, model);
94-
return (modelAndView == null ? new ModelAndView("error", model) : modelAndView);
94+
return (modelAndView != null ? modelAndView : new ModelAndView("error", model));
9595
}
9696

9797
@RequestMapping

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfiguration.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -311,11 +311,11 @@ private EvaluationContext getContext(Map<String, ?> map) {
311311
@Override
312312
public String resolvePlaceholder(String placeholderName) {
313313
Expression expression = this.expressions.get(placeholderName);
314-
return escape(expression == null ? null : expression.getValue(this.context));
314+
return escape(expression != null ? expression.getValue(this.context) : null);
315315
}
316316

317317
private String escape(Object value) {
318-
return HtmlUtils.htmlEscape(value == null ? null : value.toString());
318+
return HtmlUtils.htmlEscape(value != null ? value.toString() : null);
319319
}
320320

321321
}

spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/app/SpringApplicationWebApplicationInitializer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private String[] getSources(ServletContext servletContext) throws IOException {
6464

6565
private Manifest getManifest(ServletContext servletContext) throws IOException {
6666
InputStream stream = servletContext.getResourceAsStream("/META-INF/MANIFEST.MF");
67-
return (stream == null ? null : new Manifest(stream));
67+
return (stream != null ? new Manifest(stream) : null);
6868
}
6969

7070
@Override

spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/CommandRunner.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ private int handleError(boolean debug, Exception ex) {
260260
}
261261

262262
protected boolean errorMessage(String message) {
263-
Log.error(message == null ? "Unexpected error" : message);
263+
Log.error(message != null ? message : "Unexpected error");
264264
return message != null;
265265
}
266266

@@ -280,8 +280,8 @@ protected void showUsage() {
280280
String usageHelp = command.getUsageHelp();
281281
String description = command.getDescription();
282282
Log.info(String.format("%n %1$s %2$-15s%n %3$s", command.getName(),
283-
(usageHelp == null ? "" : usageHelp),
284-
(description == null ? "" : description)));
283+
(usageHelp != null ? usageHelp : ""),
284+
(description != null ? description : "")));
285285
}
286286
}
287287
Log.info("");

0 commit comments

Comments
 (0)