21 changed files with 796 additions and 68 deletions
@ -0,0 +1,73 @@
@@ -0,0 +1,73 @@
|
||||
/* |
||||
* Copyright 2012-present 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. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.boot.build.architecture; |
||||
|
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* Annotations used in architecture checks, which can be overridden in architecture rule |
||||
* tests. |
||||
* |
||||
* @author Scott Frederick |
||||
* @author Stephane Nicoll |
||||
*/ |
||||
public enum ArchitectureCheckAnnotation { |
||||
|
||||
/** |
||||
* Condition on class check. |
||||
*/ |
||||
CONDITIONAL_ON_CLASS, |
||||
|
||||
/** |
||||
* Condition on missing bean check. |
||||
*/ |
||||
CONDITIONAL_ON_MISSING_BEAN, |
||||
|
||||
/** |
||||
* Configuration properties bean. |
||||
*/ |
||||
CONFIGURATION_PROPERTIES, |
||||
|
||||
/** |
||||
* Deprecated configuration property. |
||||
*/ |
||||
DEPRECATED_CONFIGURATION_PROPERTY, |
||||
|
||||
/** |
||||
* Custom implementation to bind configuration properties. |
||||
*/ |
||||
CONFIGURATION_PROPERTIES_BINDING; |
||||
|
||||
private static final Map<String, String> annotationNameToClassName = Map.of(CONDITIONAL_ON_CLASS.name(), |
||||
"org.springframework.boot.autoconfigure.condition.ConditionalOnClass", CONDITIONAL_ON_MISSING_BEAN.name(), |
||||
"org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean", |
||||
CONFIGURATION_PROPERTIES.name(), "org.springframework.boot.context.properties.ConfigurationProperties", |
||||
DEPRECATED_CONFIGURATION_PROPERTY.name(), |
||||
"org.springframework.boot.context.properties.DeprecatedConfigurationProperty", |
||||
CONFIGURATION_PROPERTIES_BINDING.name(), |
||||
"org.springframework.boot.context.properties.ConfigurationPropertiesBinding"); |
||||
|
||||
static Map<String, String> asMap() { |
||||
return annotationNameToClassName; |
||||
} |
||||
|
||||
static String classFor(Map<String, String> annotationProperty, ArchitectureCheckAnnotation annotation) { |
||||
String name = annotation.name(); |
||||
return annotationProperty.getOrDefault(name, asMap().get(name)); |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,46 @@
@@ -0,0 +1,46 @@
|
||||
/* |
||||
* Copyright 2012-present 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. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.boot.build.architecture.annotations; |
||||
|
||||
import java.lang.annotation.Annotation; |
||||
import java.lang.annotation.ElementType; |
||||
import java.lang.annotation.Retention; |
||||
import java.lang.annotation.RetentionPolicy; |
||||
import java.lang.annotation.Target; |
||||
|
||||
/** |
||||
* {@code @ConditionalOnMissingBean} analogue for architecture checks. |
||||
*/ |
||||
@Target({ ElementType.TYPE, ElementType.METHOD }) |
||||
@Retention(RetentionPolicy.RUNTIME) |
||||
public @interface TestConditionalOnMissingBean { |
||||
|
||||
Class<?>[] value() default {}; |
||||
|
||||
String[] type() default {}; |
||||
|
||||
Class<?>[] ignored() default {}; |
||||
|
||||
String[] ignoredType() default {}; |
||||
|
||||
Class<? extends Annotation>[] annotation() default {}; |
||||
|
||||
String[] name() default {}; |
||||
|
||||
Class<?>[] parameterizedContainer() default {}; |
||||
|
||||
} |
||||
@ -0,0 +1,42 @@
@@ -0,0 +1,42 @@
|
||||
/* |
||||
* Copyright 2012-present 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. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.boot.build.architecture.annotations; |
||||
|
||||
import java.lang.annotation.ElementType; |
||||
import java.lang.annotation.Retention; |
||||
import java.lang.annotation.RetentionPolicy; |
||||
import java.lang.annotation.Target; |
||||
|
||||
import org.springframework.core.annotation.AliasFor; |
||||
import org.springframework.stereotype.Indexed; |
||||
|
||||
@Target({ ElementType.TYPE, ElementType.METHOD }) |
||||
@Retention(RetentionPolicy.RUNTIME) |
||||
@Indexed |
||||
public @interface TestConfigurationProperties { |
||||
|
||||
@AliasFor("prefix") |
||||
String value() default ""; |
||||
|
||||
@AliasFor("value") |
||||
String prefix() default ""; |
||||
|
||||
boolean ignoreInvalidFields() default false; |
||||
|
||||
boolean ignoreUnknownFields() default true; |
||||
|
||||
} |
||||
@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
|
||||
/* |
||||
* Copyright 2012-present 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. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.boot.build.architecture.annotations; |
||||
|
||||
import java.lang.annotation.ElementType; |
||||
import java.lang.annotation.Retention; |
||||
import java.lang.annotation.RetentionPolicy; |
||||
import java.lang.annotation.Target; |
||||
|
||||
@Target({ ElementType.TYPE, ElementType.METHOD }) |
||||
@Retention(RetentionPolicy.RUNTIME) |
||||
public @interface TestConfigurationPropertiesBinding { |
||||
|
||||
} |
||||
@ -0,0 +1,29 @@
@@ -0,0 +1,29 @@
|
||||
/* |
||||
* Copyright 2012-present 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. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.boot.build.architecture.collectors.toList; |
||||
|
||||
import java.util.List; |
||||
import java.util.stream.Collectors; |
||||
import java.util.stream.Stream; |
||||
|
||||
class CollectorsToList { |
||||
|
||||
void exampleMethod() { |
||||
List<String> strings = Stream.of("a", "b", "c").collect(Collectors.toList()); |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,30 @@
@@ -0,0 +1,30 @@
|
||||
/* |
||||
* Copyright 2012-present 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. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.boot.build.architecture.conditionalonmissingbean.valueonly; |
||||
|
||||
import org.springframework.boot.build.architecture.annotations.TestConditionalOnMissingBean; |
||||
import org.springframework.context.annotation.Bean; |
||||
|
||||
class TypeSameAsMethodReturnType { |
||||
|
||||
@Bean |
||||
@TestConditionalOnMissingBean(String.class) |
||||
String helloWorld() { |
||||
return "Hello World"; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,30 @@
@@ -0,0 +1,30 @@
|
||||
/* |
||||
* Copyright 2012-present 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. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.boot.build.architecture.conditionalonmissingbean.withname; |
||||
|
||||
import org.springframework.boot.build.architecture.annotations.TestConditionalOnMissingBean; |
||||
import org.springframework.context.annotation.Bean; |
||||
|
||||
class WithNameAttribute { |
||||
|
||||
@Bean |
||||
@TestConditionalOnMissingBean(name = "myBean") |
||||
String helloWorld() { |
||||
return "Hello World"; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,30 @@
@@ -0,0 +1,30 @@
|
||||
/* |
||||
* Copyright 2012-present 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. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.boot.build.architecture.conditionalonmissingbean.withtype; |
||||
|
||||
import org.springframework.boot.build.architecture.annotations.TestConditionalOnMissingBean; |
||||
import org.springframework.context.annotation.Bean; |
||||
|
||||
class WithTypeAttribute { |
||||
|
||||
@Bean |
||||
@TestConditionalOnMissingBean(type = "String") |
||||
String helloWorld() { |
||||
return "Hello World"; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,32 @@
@@ -0,0 +1,32 @@
|
||||
/* |
||||
* Copyright 2012-present 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. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.boot.build.architecture.configurationproperties.bindingnonstatic; |
||||
|
||||
import java.util.List; |
||||
|
||||
import org.springframework.boot.build.architecture.annotations.TestConfigurationPropertiesBinding; |
||||
import org.springframework.context.annotation.Bean; |
||||
|
||||
public class BindingMethodNonStatic { |
||||
|
||||
@Bean |
||||
@TestConfigurationPropertiesBinding |
||||
public List<String> binder() { |
||||
return List.of("hello", "world"); |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,34 @@
@@ -0,0 +1,34 @@
|
||||
/* |
||||
* Copyright 2012-present 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. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.boot.build.architecture.configurationproperties.classprefixandignore; |
||||
|
||||
import org.springframework.boot.build.architecture.annotations.TestConfigurationProperties; |
||||
|
||||
@TestConfigurationProperties(prefix = "testing", ignoreUnknownFields = false) |
||||
public class ConfigurationPropertiesWithPrefixAndIgnore { |
||||
|
||||
private String property; |
||||
|
||||
public String getProperty() { |
||||
return this.property; |
||||
} |
||||
|
||||
public void setProperty(String property) { |
||||
this.property = property; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,34 @@
@@ -0,0 +1,34 @@
|
||||
/* |
||||
* Copyright 2012-present 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. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.boot.build.architecture.configurationproperties.classprefixonly; |
||||
|
||||
import org.springframework.boot.build.architecture.annotations.TestConfigurationProperties; |
||||
|
||||
@TestConfigurationProperties(prefix = "testing") |
||||
public class ConfigurationPropertiesWithPrefixOnly { |
||||
|
||||
private String property; |
||||
|
||||
public String getProperty() { |
||||
return this.property; |
||||
} |
||||
|
||||
public void setProperty(String property) { |
||||
this.property = property; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,34 @@
@@ -0,0 +1,34 @@
|
||||
/* |
||||
* Copyright 2012-present 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. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.boot.build.architecture.configurationproperties.classvalueonly; |
||||
|
||||
import org.springframework.boot.build.architecture.annotations.TestConfigurationProperties; |
||||
|
||||
@TestConfigurationProperties("testing") |
||||
public class ConfigurationPropertiesWithValueOnly { |
||||
|
||||
private String property; |
||||
|
||||
public String getProperty() { |
||||
return this.property; |
||||
} |
||||
|
||||
public void setProperty(String property) { |
||||
this.property = property; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,34 @@
@@ -0,0 +1,34 @@
|
||||
/* |
||||
* Copyright 2012-present 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. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.boot.build.architecture.configurationproperties.methodprefixandignore; |
||||
|
||||
import org.springframework.boot.build.architecture.annotations.TestConfigurationProperties; |
||||
|
||||
public class ConfigurationPropertiesWithPrefixAndIgnore { |
||||
|
||||
private String property; |
||||
|
||||
@TestConfigurationProperties(prefix = "testing", ignoreInvalidFields = true) |
||||
public String getProperty() { |
||||
return this.property; |
||||
} |
||||
|
||||
public void setProperty(String property) { |
||||
this.property = property; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,34 @@
@@ -0,0 +1,34 @@
|
||||
/* |
||||
* Copyright 2012-present 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. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.boot.build.architecture.configurationproperties.methodprefixonly; |
||||
|
||||
import org.springframework.boot.build.architecture.annotations.TestConfigurationProperties; |
||||
|
||||
public class ConfigurationPropertiesWithPrefixOnly { |
||||
|
||||
private String property; |
||||
|
||||
@TestConfigurationProperties(prefix = "testing") |
||||
public String getProperty() { |
||||
return this.property; |
||||
} |
||||
|
||||
public void setProperty(String property) { |
||||
this.property = property; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,34 @@
@@ -0,0 +1,34 @@
|
||||
/* |
||||
* Copyright 2012-present 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. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.boot.build.architecture.configurationproperties.methodvalueonly; |
||||
|
||||
import org.springframework.boot.build.architecture.annotations.TestConfigurationProperties; |
||||
|
||||
public class ConfigurationPropertiesWithValueOnly { |
||||
|
||||
private String property; |
||||
|
||||
@TestConfigurationProperties("testing") |
||||
public String getProperty() { |
||||
return this.property; |
||||
} |
||||
|
||||
public void setProperty(String property) { |
||||
this.property = property; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
|
||||
/* |
||||
* Copyright 2012-present 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. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.boot.build.architecture.url.decode; |
||||
|
||||
import java.io.UnsupportedEncodingException; |
||||
import java.net.URLDecoder; |
||||
|
||||
class UrlDecodeWithStringEncoding { |
||||
|
||||
void exampleMethod() throws UnsupportedEncodingException { |
||||
URLDecoder.decode("https://example.com", "UTF-8"); |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
|
||||
/* |
||||
* Copyright 2012-present 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. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.boot.build.architecture.url.encode; |
||||
|
||||
import java.io.UnsupportedEncodingException; |
||||
import java.net.URLEncoder; |
||||
|
||||
class UrlEncodeWithStringEncoding { |
||||
|
||||
void exampleMethod() throws UnsupportedEncodingException { |
||||
URLEncoder.encode("https://example.com", "UTF-8"); |
||||
} |
||||
|
||||
} |
||||
Loading…
Reference in new issue