Polish
This commit is contained in:
		
							parent
							
								
									f86b44f2ec
								
							
						
					
					
						commit
						af8e155c6d
					
				| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
/*
 | 
			
		||||
 * Copyright 2012-2017 the original author or authors.
 | 
			
		||||
 * Copyright 2012-2018 the original author or authors.
 | 
			
		||||
 *
 | 
			
		||||
 * Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
 * you may not use this file except in compliance with the License.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
/*
 | 
			
		||||
 * Copyright 2012-2017 the original author or authors.
 | 
			
		||||
 * Copyright 2012-2018 the original author or authors.
 | 
			
		||||
 *
 | 
			
		||||
 * Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
 * you may not use this file except in compliance with the License.
 | 
			
		||||
| 
						 | 
				
			
			@ -87,7 +87,7 @@ public class OAuth2RestOperationsConfiguration {
 | 
			
		|||
 | 
			
		||||
	@Configuration
 | 
			
		||||
	@ConditionalOnBean(OAuth2ClientConfiguration.class)
 | 
			
		||||
	@Conditional({OAuth2ClientIdCondition.class, NoClientCredentialsCondition.class})
 | 
			
		||||
	@Conditional({ OAuth2ClientIdCondition.class, NoClientCredentialsCondition.class })
 | 
			
		||||
	@Import(OAuth2ProtectedResourceDetailsConfiguration.class)
 | 
			
		||||
	protected static class SessionScopedConfiguration {
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
/*
 | 
			
		||||
 * Copyright 2012-2017 the original author or authors.
 | 
			
		||||
 * Copyright 2012-2018 the original author or authors.
 | 
			
		||||
 *
 | 
			
		||||
 * Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
 * you may not use this file except in compliance with the License.
 | 
			
		||||
| 
						 | 
				
			
			@ -78,8 +78,7 @@ public class OAuth2RestOperationsConfigurationTests {
 | 
			
		|||
		EnvironmentTestUtils.addEnvironment(this.environment,
 | 
			
		||||
				"security.oauth2.client.client-id=acme");
 | 
			
		||||
		initializeContext(ConfigForRequestScopedConfiguration.class, false);
 | 
			
		||||
		assertThat(this.context.containsBean("oauth2ClientContext"))
 | 
			
		||||
				.isTrue();
 | 
			
		||||
		assertThat(this.context.containsBean("oauth2ClientContext")).isTrue();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	@Test
 | 
			
		||||
| 
						 | 
				
			
			@ -95,8 +94,7 @@ public class OAuth2RestOperationsConfigurationTests {
 | 
			
		|||
		EnvironmentTestUtils.addEnvironment(this.environment,
 | 
			
		||||
				"security.oauth2.client.client-id=acme");
 | 
			
		||||
		initializeContext(ConfigForSessionScopedConfiguration.class, false);
 | 
			
		||||
		assertThat(this.context.containsBean("oauth2ClientContext"))
 | 
			
		||||
				.isTrue();
 | 
			
		||||
		assertThat(this.context.containsBean("oauth2ClientContext")).isTrue();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	@Test
 | 
			
		||||
| 
						 | 
				
			
			@ -109,8 +107,7 @@ public class OAuth2RestOperationsConfigurationTests {
 | 
			
		|||
 | 
			
		||||
	private void initializeContext(Class<?> configuration, boolean isClientCredentials) {
 | 
			
		||||
		this.context = new SpringApplicationBuilder(configuration)
 | 
			
		||||
				.environment(this.environment)
 | 
			
		||||
				.web(!isClientCredentials).run();
 | 
			
		||||
				.environment(this.environment).web(!isClientCredentials).run();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	@Configuration
 | 
			
		||||
| 
						 | 
				
			
			@ -126,7 +123,8 @@ public class OAuth2RestOperationsConfigurationTests {
 | 
			
		|||
 | 
			
		||||
	@Configuration
 | 
			
		||||
	@Import({ OAuth2ClientConfiguration.class, OAuth2RestOperationsConfiguration.class })
 | 
			
		||||
	protected static class ConfigForSessionScopedConfiguration extends WebApplicationConfiguration {
 | 
			
		||||
	protected static class ConfigForSessionScopedConfiguration
 | 
			
		||||
			extends WebApplicationConfiguration {
 | 
			
		||||
 | 
			
		||||
		@Bean
 | 
			
		||||
		public SecurityProperties securityProperties() {
 | 
			
		||||
| 
						 | 
				
			
			@ -136,7 +134,8 @@ public class OAuth2RestOperationsConfigurationTests {
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	@Configuration
 | 
			
		||||
	protected static class ConfigForRequestScopedConfiguration extends WebApplicationConfiguration {
 | 
			
		||||
	protected static class ConfigForRequestScopedConfiguration
 | 
			
		||||
			extends WebApplicationConfiguration {
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
/*
 | 
			
		||||
 * Copyright 2012-2017 the original author or authors.
 | 
			
		||||
 * Copyright 2012-2018 the original author or authors.
 | 
			
		||||
 *
 | 
			
		||||
 * Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
 * you may not use this file except in compliance with the License.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -188,17 +188,15 @@ class TypeUtils {
 | 
			
		|||
						+ type.asElement().getSimpleName().toString();
 | 
			
		||||
			}
 | 
			
		||||
			String qualifiedName = getQualifiedName(type.asElement());
 | 
			
		||||
			if  (type.getTypeArguments().isEmpty()) {
 | 
			
		||||
			if (type.getTypeArguments().isEmpty()) {
 | 
			
		||||
				return qualifiedName;
 | 
			
		||||
			}
 | 
			
		||||
			else {
 | 
			
		||||
				StringBuilder name = new StringBuilder();
 | 
			
		||||
				name.append(qualifiedName);
 | 
			
		||||
				if (!type.getTypeArguments().isEmpty()) {
 | 
			
		||||
					appendTypeArguments(type, name);
 | 
			
		||||
				}
 | 
			
		||||
				return name.toString();
 | 
			
		||||
			StringBuilder name = new StringBuilder();
 | 
			
		||||
			name.append(qualifiedName);
 | 
			
		||||
			if (!type.getTypeArguments().isEmpty()) {
 | 
			
		||||
				appendTypeArguments(type, name);
 | 
			
		||||
			}
 | 
			
		||||
			return name.toString();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		private void appendTypeArguments(DeclaredType type, StringBuilder name) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
/*
 | 
			
		||||
 * Copyright 2012-2017 the original author or authors.
 | 
			
		||||
 * Copyright 2012-2018 the original author or authors.
 | 
			
		||||
 *
 | 
			
		||||
 * Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
 * you may not use this file except in compliance with the License.
 | 
			
		||||
| 
						 | 
				
			
			@ -123,8 +123,7 @@ public enum DatabaseDriver {
 | 
			
		|||
	 * Firebird.
 | 
			
		||||
	 */
 | 
			
		||||
	FIREBIRD("Firebird", "org.firebirdsql.jdbc.FBDriver",
 | 
			
		||||
			"org.firebirdsql.ds.FBXADataSource",
 | 
			
		||||
			"SELECT 1 FROM RDB$DATABASE") {
 | 
			
		||||
			"org.firebirdsql.ds.FBXADataSource", "SELECT 1 FROM RDB$DATABASE") {
 | 
			
		||||
 | 
			
		||||
		@Override
 | 
			
		||||
		protected Collection<String> getUrlPrefixes() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
/*
 | 
			
		||||
 * Copyright 2012-2016 the original author or authors.
 | 
			
		||||
 * Copyright 2012-2018 the original author or authors.
 | 
			
		||||
 *
 | 
			
		||||
 * Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
 * you may not use this file except in compliance with the License.
 | 
			
		||||
| 
						 | 
				
			
			@ -337,8 +337,9 @@ public class RestTemplateBuilder {
 | 
			
		|||
	/**
 | 
			
		||||
	 * Set the {@link ClientHttpRequestFactory} that should be used with the
 | 
			
		||||
	 * {@link RestTemplate}.
 | 
			
		||||
   * <p>Note that this request factory will be shared with all builder instances
 | 
			
		||||
   * derived from that point.
 | 
			
		||||
	 * <p>
 | 
			
		||||
	 * Note that this request factory will be shared with all builder instances derived
 | 
			
		||||
	 * from that point.
 | 
			
		||||
	 * @param requestFactory the request factory to use
 | 
			
		||||
	 * @return a new builder instance
 | 
			
		||||
	 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
/*
 | 
			
		||||
 * Copyright 2012-2017 the original author or authors.
 | 
			
		||||
 * Copyright 2012-2018 the original author or authors.
 | 
			
		||||
 *
 | 
			
		||||
 * Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
 * you may not use this file except in compliance with the License.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue