Commit 0cf6efca authored by Phillip Webb's avatar Phillip Webb

Polish

parent afd357f4
...@@ -131,4 +131,5 @@ public class MailProperties { ...@@ -131,4 +131,5 @@ public class MailProperties {
public void setTestConnection(boolean testConnection) { public void setTestConnection(boolean testConnection) {
this.testConnection = testConnection; this.testConnection = testConnection;
} }
} }
...@@ -18,6 +18,7 @@ package org.springframework.boot.autoconfigure.mail; ...@@ -18,6 +18,7 @@ package org.springframework.boot.autoconfigure.mail;
import java.util.Map; import java.util.Map;
import java.util.Properties; import java.util.Properties;
import javax.activation.MimeType; import javax.activation.MimeType;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
import javax.mail.MessagingException; import javax.mail.MessagingException;
...@@ -120,8 +121,8 @@ public class MailSenderAutoConfiguration { ...@@ -120,8 +121,8 @@ public class MailSenderAutoConfiguration {
} }
/** /**
* Condition to trigger the creation of a {@link JavaMailSenderImpl}. This kicks in if * Condition to trigger the creation of a {@link JavaMailSenderImpl}. This kicks
* either the host or jndi name property is set. * in if either the host or jndi name property is set.
*/ */
static class MailSenderCondition extends AnyNestedCondition { static class MailSenderCondition extends AnyNestedCondition {
...@@ -161,6 +162,7 @@ public class MailSenderAutoConfiguration { ...@@ -161,6 +162,7 @@ public class MailSenderAutoConfiguration {
} }
} }
} }
} }
} }
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package org.springframework.boot.autoconfigure.mail; package org.springframework.boot.autoconfigure.mail;
import java.util.Properties; import java.util.Properties;
import javax.mail.MessagingException; import javax.mail.MessagingException;
import javax.mail.Session; import javax.mail.Session;
import javax.naming.Context; import javax.naming.Context;
...@@ -237,5 +238,4 @@ public class MailSenderAutoConfigurationTests { ...@@ -237,5 +238,4 @@ public class MailSenderAutoConfigurationTests {
} }
} }
...@@ -100,7 +100,7 @@ import static org.hamcrest.MatcherAssert.assertThat; ...@@ -100,7 +100,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
* @author Greg Turnquist * @author Greg Turnquist
* @author Dave Syer * @author Dave Syer
*/ */
public class SpringSecurityOAuth2AutoConfigurationTests { public class OAuth2AutoConfigurationTests {
private static final Class<?> RESOURCE_SERVER_CONFIG = OAuth2ResourceServerConfiguration.class; private static final Class<?> RESOURCE_SERVER_CONFIG = OAuth2ResourceServerConfiguration.class;
......
...@@ -367,7 +367,6 @@ The table below summarizes the list of supported providers: ...@@ -367,7 +367,6 @@ The table below summarizes the list of supported providers:
|=== |===
TIP: No more than one provider can be active for a given property but you can specify TIP: No more than one provider can be active for a given property but you can specify
several providers if they can all manage the property _in some ways_. Make sure to place several providers if they can all manage the property _in some ways_. Make sure to place
the most powerful provider first as the IDE must use the first one in the JSON section it the most powerful provider first as the IDE must use the first one in the JSON section it
...@@ -600,6 +599,8 @@ NOTE: The binder is not aware of the meta-data so if you provide that hint, you ...@@ -600,6 +599,8 @@ NOTE: The binder is not aware of the meta-data so if you provide that hint, you
will still need to transform the bean name into an actual Bean reference using will still need to transform the bean name into an actual Bean reference using
the `ApplicationContext`. the `ApplicationContext`.
===== Spring profile name ===== Spring profile name
The **spring-profile-name** provider auto-completes the Spring profiles that are The **spring-profile-name** provider auto-completes the Spring profiles that are
defined in the configuration of the current project. defined in the configuration of the current project.
......
...@@ -356,8 +356,8 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor ...@@ -356,8 +356,8 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor
catch (FileNotFoundException ex) { catch (FileNotFoundException ex) {
// No additional metadata // No additional metadata
} }
catch (InvalidConfigurationMetadataException e) { catch (InvalidConfigurationMetadataException ex) {
log(e.getKind(), e.getMessage()); log(ex.getKind(), ex.getMessage());
} }
catch (Exception ex) { catch (Exception ex) {
logWarning("Unable to merge additional metadata"); logWarning("Unable to merge additional metadata");
......
...@@ -21,13 +21,13 @@ import java.io.FileInputStream; ...@@ -21,13 +21,13 @@ import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import javax.annotation.processing.ProcessingEnvironment; import javax.annotation.processing.ProcessingEnvironment;
import javax.tools.Diagnostic; import javax.tools.Diagnostic;
import javax.tools.FileObject; import javax.tools.FileObject;
import javax.tools.StandardLocation; import javax.tools.StandardLocation;
import org.json.JSONException; import org.json.JSONException;
import org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata; import org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata;
import org.springframework.boot.configurationprocessor.metadata.InvalidConfigurationMetadataException; import org.springframework.boot.configurationprocessor.metadata.InvalidConfigurationMetadataException;
import org.springframework.boot.configurationprocessor.metadata.JsonMarshaller; import org.springframework.boot.configurationprocessor.metadata.JsonMarshaller;
...@@ -87,8 +87,9 @@ public class MetadataStore { ...@@ -87,8 +87,9 @@ public class MetadataStore {
return null; return null;
} }
catch (JSONException ex) { catch (JSONException ex) {
throw new InvalidConfigurationMetadataException("Invalid additional meta-data in '" + throw new InvalidConfigurationMetadataException(
METADATA_PATH + "': " + ex.getMessage(), Diagnostic.Kind.ERROR); "Invalid additional meta-data in '" + METADATA_PATH + "': "
+ ex.getMessage(), Diagnostic.Kind.ERROR);
} }
finally { finally {
in.close(); in.close();
......
...@@ -19,8 +19,8 @@ package org.springframework.boot.configurationprocessor.metadata; ...@@ -19,8 +19,8 @@ package org.springframework.boot.configurationprocessor.metadata;
import javax.tools.Diagnostic; import javax.tools.Diagnostic;
/** /**
* Thrown to indicate that some meta-data is invalid. Define the * Thrown to indicate that some meta-data is invalid. Define the severity to determine
* severity to determine whether it has to fail the build. * whether it has to fail the build.
* *
* @author Stephane Nicoll * @author Stephane Nicoll
* @since 1.3.0 * @since 1.3.0
...@@ -36,7 +36,7 @@ public class InvalidConfigurationMetadataException extends RuntimeException { ...@@ -36,7 +36,7 @@ public class InvalidConfigurationMetadataException extends RuntimeException {
} }
public Diagnostic.Kind getKind() { public Diagnostic.Kind getKind() {
return kind; return this.kind;
} }
} }
...@@ -356,8 +356,8 @@ public class ConfigurationMetadataAnnotationProcessorTests { ...@@ -356,8 +356,8 @@ public class ConfigurationMetadataAnnotationProcessorTests {
File additionalMetadataFile = createAdditionalMetadataFile(); File additionalMetadataFile = createAdditionalMetadataFile();
FileCopyUtils.copy("Hello World", new FileWriter(additionalMetadataFile)); FileCopyUtils.copy("Hello World", new FileWriter(additionalMetadataFile));
thrown.expect(IllegalStateException.class); this.thrown.expect(IllegalStateException.class);
thrown.expectMessage("Compilation failed"); this.thrown.expectMessage("Compilation failed");
compile(SimpleProperties.class); compile(SimpleProperties.class);
} }
......
...@@ -208,8 +208,7 @@ public class RepackageMojo extends AbstractDependencyFilterMojo { ...@@ -208,8 +208,7 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
} }
else if (!source.equals(target)) { else if (!source.equals(target)) {
this.project.getArtifact().setFile(target); this.project.getArtifact().setFile(target);
getLog().info( getLog().info("Replacing main artifact " + source + " to " + target);
"Replacing main artifact " + source + " to " +target);
} }
} }
......
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