Fix checkstyle method order issues
Fix checkstyle issues with method ordering following the spring-javaformat upgrade. See gh-13932
This commit is contained in:
@@ -382,11 +382,6 @@ public abstract class EndpointDiscoverer<E extends ExposableEndpoint<O>, O exten
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.key.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
@@ -398,6 +393,11 @@ public abstract class EndpointDiscoverer<E extends ExposableEndpoint<O>, O exten
|
||||
return this.key.equals(((OperationKey) obj).key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.key.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.description.get();
|
||||
|
||||
@@ -88,32 +88,6 @@ public final class WebOperationRequestPredicate {
|
||||
return Collections.unmodifiableCollection(this.produces);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder result = new StringBuilder(
|
||||
this.httpMethod + " to path '" + this.path + "'");
|
||||
if (!CollectionUtils.isEmpty(this.consumes)) {
|
||||
result.append(" consumes: "
|
||||
+ StringUtils.collectionToCommaDelimitedString(this.consumes));
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(this.produces)) {
|
||||
result.append(" produces: "
|
||||
+ StringUtils.collectionToCommaDelimitedString(this.produces));
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + this.consumes.hashCode();
|
||||
result = prime * result + this.httpMethod.hashCode();
|
||||
result = prime * result + this.canonicalPath.hashCode();
|
||||
result = prime * result + this.produces.hashCode();
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -131,4 +105,30 @@ public final class WebOperationRequestPredicate {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + this.consumes.hashCode();
|
||||
result = prime * result + this.httpMethod.hashCode();
|
||||
result = prime * result + this.canonicalPath.hashCode();
|
||||
result = prime * result + this.produces.hashCode();
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder result = new StringBuilder(
|
||||
this.httpMethod + " to path '" + this.path + "'");
|
||||
if (!CollectionUtils.isEmpty(this.consumes)) {
|
||||
result.append(" consumes: "
|
||||
+ StringUtils.collectionToCommaDelimitedString(this.consumes));
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(this.produces)) {
|
||||
result.append(" produces: "
|
||||
+ StringUtils.collectionToCommaDelimitedString(this.produces));
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
@@ -102,16 +102,6 @@ public final class Status {
|
||||
return this.description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.code.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
@@ -123,4 +113,14 @@ public final class Status {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.code.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -147,9 +147,8 @@ public abstract class AutoConfigurationPackages {
|
||||
this.packageName = ClassUtils.getPackageName(metadata.getClassName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.packageName.hashCode();
|
||||
public String getPackageName() {
|
||||
return this.packageName;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -160,8 +159,9 @@ public abstract class AutoConfigurationPackages {
|
||||
return this.packageName.equals(((PackageImport) obj).packageName);
|
||||
}
|
||||
|
||||
public String getPackageName() {
|
||||
return this.packageName;
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.packageName.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -59,16 +59,6 @@ public final class ConditionMessage {
|
||||
return !StringUtils.hasLength(this.message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return (this.message != null) ? this.message : "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ObjectUtils.nullSafeHashCode(this.message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null || !ConditionMessage.class.isInstance(obj)) {
|
||||
@@ -80,6 +70,16 @@ public final class ConditionMessage {
|
||||
return ObjectUtils.nullSafeEquals(((ConditionMessage) obj).message, this.message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ObjectUtils.nullSafeHashCode(this.message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return (this.message != null) ? this.message : "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a new {@link ConditionMessage} based on the instance and an appended
|
||||
* message.
|
||||
|
||||
@@ -122,12 +122,6 @@ public class ConditionOutcome {
|
||||
return this.message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Boolean.hashCode(this.match) * 31
|
||||
+ ObjectUtils.nullSafeHashCode(this.message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -144,6 +138,12 @@ public class ConditionOutcome {
|
||||
return super.equals(obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Boolean.hashCode(this.match) * 31
|
||||
+ ObjectUtils.nullSafeHashCode(this.message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return (this.message != null) ? this.message.toString() : "";
|
||||
|
||||
@@ -269,20 +269,6 @@ public class EmbeddedMongoAutoConfiguration {
|
||||
return this.features.contains(feature);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.version;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + this.features.hashCode();
|
||||
result = prime * result + this.version.hashCode();
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -301,6 +287,20 @@ public class EmbeddedMongoAutoConfiguration {
|
||||
return super.equals(obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + this.features.hashCode();
|
||||
result = prime * result + this.version.hashCode();
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.version;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
@@ -98,22 +98,6 @@ public final class Dependency {
|
||||
return this.exclusions;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.groupId + ":" + this.artifactId + ":" + this.version;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + this.groupId.hashCode();
|
||||
result = prime * result + this.artifactId.hashCode();
|
||||
result = prime * result + this.version.hashCode();
|
||||
result = prime * result + this.exclusions.hashCode();
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -134,6 +118,22 @@ public final class Dependency {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + this.groupId.hashCode();
|
||||
result = prime * result + this.artifactId.hashCode();
|
||||
result = prime * result + this.version.hashCode();
|
||||
result = prime * result + this.exclusions.hashCode();
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.groupId + ":" + this.artifactId + ":" + this.version;
|
||||
}
|
||||
|
||||
/**
|
||||
* A dependency exclusion.
|
||||
*/
|
||||
@@ -166,16 +166,6 @@ public final class Dependency {
|
||||
return this.groupId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.groupId + ":" + this.artifactId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.groupId.hashCode() * 31 + this.artifactId.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -194,6 +184,16 @@ public final class Dependency {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.groupId.hashCode() * 31 + this.artifactId.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.groupId + ":" + this.artifactId;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
@@ -54,12 +54,6 @@ public final class RepositoryConfiguration {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RepositoryConfiguration [name=" + this.name + ", uri=" + this.uri
|
||||
+ ", snapshotsEnabled=" + this.snapshotsEnabled + "]";
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the URI of the repository.
|
||||
* @return the repository URI
|
||||
@@ -76,11 +70,6 @@ public final class RepositoryConfiguration {
|
||||
return this.snapshotsEnabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ObjectUtils.nullSafeHashCode(this.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -96,4 +85,15 @@ public final class RepositoryConfiguration {
|
||||
return ObjectUtils.nullSafeEquals(this.name, other.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ObjectUtils.nullSafeHashCode(this.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RepositoryConfiguration [name=" + this.name + ", uri=" + this.uri
|
||||
+ ", snapshotsEnabled=" + this.snapshotsEnabled + "]";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
@@ -81,11 +81,6 @@ public final class ChangedFile {
|
||||
return fileName.substring(folderName.length() + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.file.hashCode() * 31 + this.type.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
@@ -101,6 +96,11 @@ public final class ChangedFile {
|
||||
return super.equals(obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.file.hashCode() * 31 + this.type.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.file + " (" + this.type + ")";
|
||||
|
||||
@@ -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.
|
||||
@@ -61,11 +61,6 @@ public final class ChangedFiles implements Iterable<ChangedFile> {
|
||||
return this.files;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.files.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null) {
|
||||
@@ -82,6 +77,11 @@ public final class ChangedFiles implements Iterable<ChangedFile> {
|
||||
return super.equals(obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.files.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.sourceFolder + " " + this.files;
|
||||
|
||||
@@ -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.
|
||||
@@ -62,13 +62,13 @@ class OverrideAutoConfigurationContextCustomizerFactory
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getClass().hashCode();
|
||||
public boolean equals(Object obj) {
|
||||
return (obj != null && obj.getClass() == getClass());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
return (obj != null && obj.getClass() == getClass());
|
||||
public int hashCode() {
|
||||
return getClass().hashCode();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -117,21 +117,6 @@ public abstract class AnnotationCustomizableTypeExcludeFilter extends TypeExclud
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 0;
|
||||
result = prime * result + Boolean.hashCode(hasAnnotation());
|
||||
for (FilterType filterType : FilterType.values()) {
|
||||
result = prime * result
|
||||
+ ObjectUtils.nullSafeHashCode(getFilters(filterType));
|
||||
}
|
||||
result = prime * result + Boolean.hashCode(isUseDefaultFilters());
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(getDefaultIncludes());
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(getComponentIncludes());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -155,4 +140,19 @@ public abstract class AnnotationCustomizableTypeExcludeFilter extends TypeExclud
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 0;
|
||||
result = prime * result + Boolean.hashCode(hasAnnotation());
|
||||
for (FilterType filterType : FilterType.values()) {
|
||||
result = prime * result
|
||||
+ ObjectUtils.nullSafeHashCode(getFilters(filterType));
|
||||
}
|
||||
result = prime * result + Boolean.hashCode(isUseDefaultFilters());
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(getDefaultIncludes());
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(getComponentIncludes());
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -73,17 +73,17 @@ class TypeExcludeFiltersContextCustomizer implements ContextCustomizer {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.filters.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
return (obj != null && getClass() == obj.getClass() && this.filters
|
||||
.equals(((TypeExcludeFiltersContextCustomizer) obj).filters));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.filters.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void customizeContext(ConfigurableApplicationContext context,
|
||||
MergedContextConfiguration mergedContextConfiguration) {
|
||||
|
||||
@@ -201,11 +201,6 @@ public class AnnotationsPropertySource extends EnumerablePropertySource<Class<?>
|
||||
return this.properties.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.properties.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
@@ -217,4 +212,9 @@ public class AnnotationsPropertySource extends EnumerablePropertySource<Class<?>
|
||||
return this.properties.equals(((AnnotationsPropertySource) obj).properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.properties.hashCode();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -55,17 +55,17 @@ class PropertyMappingContextCustomizer implements ContextCustomizer {
|
||||
new PropertyMappingCheckBeanPostProcessor());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.propertySource.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
return (obj != null && getClass() == obj.getClass() && this.propertySource
|
||||
.equals(((PropertyMappingContextCustomizer) obj).propertySource));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.propertySource.hashCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link BeanPostProcessor} to check that {@link PropertyMapping} is only used on
|
||||
* test classes.
|
||||
|
||||
@@ -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.
|
||||
@@ -49,11 +49,6 @@ class WebDriverContextCustomizerFactory implements ContextCustomizerFactory {
|
||||
WebDriverScope.registerWith(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getClass().hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
@@ -65,6 +60,11 @@ class WebDriverContextCustomizerFactory implements ContextCustomizerFactory {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getClass().hashCode();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -119,13 +119,13 @@ public class TypeExcludeFiltersContextCustomizerFactoryTests {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return SimpleExclude.class.hashCode();
|
||||
public boolean equals(Object obj) {
|
||||
return obj.getClass() == getClass();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
return obj.getClass() == getClass();
|
||||
public int hashCode() {
|
||||
return SimpleExclude.class.hashCode();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -33,11 +33,6 @@ public class ExampleBasicObject {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.value.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj != null && obj.getClass() == getClass()) {
|
||||
@@ -46,4 +41,9 @@ public class ExampleBasicObject {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.value.hashCode();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -29,11 +29,6 @@ public class ExampleCustomObject {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.value.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj != null && obj.getClass() == getClass()) {
|
||||
@@ -42,6 +37,11 @@ public class ExampleCustomObject {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.value.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.value;
|
||||
|
||||
@@ -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.
|
||||
@@ -48,11 +48,6 @@ public class ExampleJsonObjectWithView {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null || obj.getClass() != getClass()) {
|
||||
@@ -63,6 +58,11 @@ public class ExampleJsonObjectWithView {
|
||||
&& ObjectUtils.nullSafeEquals(this.id, other.id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.value + " " + this.id;
|
||||
|
||||
@@ -115,11 +115,6 @@ class ImportsContextCustomizer implements ContextCustomizer {
|
||||
return registry.getBeanDefinition(beanName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.key.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
@@ -133,6 +128,11 @@ class ImportsContextCustomizer implements ContextCustomizer {
|
||||
return this.key.equals(other.key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.key.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringCreator(this).append("key", this.key).toString();
|
||||
@@ -338,17 +338,17 @@ class ImportsContextCustomizer implements ContextCustomizer {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.key.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
return (obj != null && getClass() == obj.getClass()
|
||||
&& this.key.equals(((ContextCustomizerKey) obj).key));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.key.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.key.toString();
|
||||
|
||||
@@ -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.
|
||||
@@ -36,11 +36,6 @@ class ExcludeFilterContextCustomizer implements ContextCustomizer {
|
||||
new TestTypeExcludeFilter());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getClass().hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
@@ -52,4 +47,9 @@ class ExcludeFilterContextCustomizer implements ContextCustomizer {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getClass().hashCode();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -86,11 +86,6 @@ class DuplicateJsonObjectContextCustomizerFactory implements ContextCustomizerFa
|
||||
this.logger.warn(message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getClass().hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null || obj.getClass() != getClass()) {
|
||||
@@ -99,6 +94,11 @@ class DuplicateJsonObjectContextCustomizerFactory implements ContextCustomizerFa
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getClass().hashCode();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -76,17 +76,6 @@ abstract class Definition {
|
||||
return this.qualifier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 1;
|
||||
result = MULTIPLIER * result + ObjectUtils.nullSafeHashCode(this.name);
|
||||
result = MULTIPLIER * result + ObjectUtils.nullSafeHashCode(this.reset);
|
||||
result = MULTIPLIER * result
|
||||
+ ObjectUtils.nullSafeHashCode(this.proxyTargetAware);
|
||||
result = MULTIPLIER * result + ObjectUtils.nullSafeHashCode(this.qualifier);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
@@ -105,4 +94,15 @@ abstract class Definition {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 1;
|
||||
result = MULTIPLIER * result + ObjectUtils.nullSafeHashCode(this.name);
|
||||
result = MULTIPLIER * result + ObjectUtils.nullSafeHashCode(this.reset);
|
||||
result = MULTIPLIER * result
|
||||
+ ObjectUtils.nullSafeHashCode(this.proxyTargetAware);
|
||||
result = MULTIPLIER * result + ObjectUtils.nullSafeHashCode(this.qualifier);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -100,16 +100,6 @@ class MockDefinition extends Definition {
|
||||
return this.serializable;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = super.hashCode();
|
||||
result = MULTIPLIER * result + ObjectUtils.nullSafeHashCode(this.typeToMock);
|
||||
result = MULTIPLIER * result + ObjectUtils.nullSafeHashCode(this.extraInterfaces);
|
||||
result = MULTIPLIER * result + ObjectUtils.nullSafeHashCode(this.answer);
|
||||
result = MULTIPLIER * result + Boolean.hashCode(this.serializable);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
@@ -128,6 +118,16 @@ class MockDefinition extends Definition {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = super.hashCode();
|
||||
result = MULTIPLIER * result + ObjectUtils.nullSafeHashCode(this.typeToMock);
|
||||
result = MULTIPLIER * result + ObjectUtils.nullSafeHashCode(this.extraInterfaces);
|
||||
result = MULTIPLIER * result + ObjectUtils.nullSafeHashCode(this.answer);
|
||||
result = MULTIPLIER * result + Boolean.hashCode(this.serializable);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringCreator(this).append("name", getName())
|
||||
|
||||
@@ -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.
|
||||
@@ -46,11 +46,6 @@ class MockitoContextCustomizer implements ContextCustomizer {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.definitions.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
@@ -63,4 +58,9 @@ class MockitoContextCustomizer implements ContextCustomizer {
|
||||
return this.definitions.equals(other.definitions);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.definitions.hashCode();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
@@ -60,11 +60,6 @@ class QualifierDefinition {
|
||||
definition.setQualifiedElement(this.field);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.annotations.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
@@ -77,6 +72,11 @@ class QualifierDefinition {
|
||||
return this.annotations.equals(other.annotations);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.annotations.hashCode();
|
||||
}
|
||||
|
||||
public static QualifierDefinition forElement(AnnotatedElement element) {
|
||||
if (element != null && element instanceof Field) {
|
||||
Field field = (Field) element;
|
||||
|
||||
@@ -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.
|
||||
@@ -51,13 +51,6 @@ class SpyDefinition extends Definition {
|
||||
return this.typeToSpy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = super.hashCode();
|
||||
result = MULTIPLIER * result + ObjectUtils.nullSafeHashCode(this.typeToSpy);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
@@ -72,6 +65,13 @@ class SpyDefinition extends Definition {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = super.hashCode();
|
||||
result = MULTIPLIER * result + ObjectUtils.nullSafeHashCode(this.typeToSpy);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringCreator(this).append("name", getName())
|
||||
|
||||
@@ -74,11 +74,6 @@ class TestRestTemplateContextCustomizer implements ContextCustomizer {
|
||||
definition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getClass().hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null || obj.getClass() != getClass()) {
|
||||
@@ -87,6 +82,11 @@ class TestRestTemplateContextCustomizer implements ContextCustomizer {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getClass().hashCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link BeanDefinitionRegistryPostProcessor} that runs after the
|
||||
* {@link ConfigurationClassPostProcessor} and add a {@link TestRestTemplateFactory}
|
||||
|
||||
@@ -78,13 +78,13 @@ class WebTestClientContextCustomizer implements ContextCustomizer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getClass().hashCode();
|
||||
public boolean equals(Object obj) {
|
||||
return (obj != null && obj.getClass() == getClass());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
return (obj != null && obj.getClass() == getClass());
|
||||
public int hashCode() {
|
||||
return getClass().hashCode();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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.
|
||||
@@ -43,11 +43,6 @@ public class ExampleObject {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null || obj.getClass() != getClass()) {
|
||||
@@ -58,6 +53,11 @@ public class ExampleObject {
|
||||
&& ObjectUtils.nullSafeEquals(this.age, other.age);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.name + " " + this.age;
|
||||
|
||||
@@ -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.
|
||||
@@ -48,11 +48,6 @@ public class ExampleObjectWithView {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null || obj.getClass() != getClass()) {
|
||||
@@ -63,6 +58,11 @@ public class ExampleObjectWithView {
|
||||
&& ObjectUtils.nullSafeEquals(this.age, other.age);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.name + " " + this.age;
|
||||
|
||||
@@ -68,13 +68,6 @@ public class ItemDeprecation {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ItemDeprecation{" + "reason='" + this.reason + '\'' + ", "
|
||||
+ "replacement='" + this.replacement + '\'' + ", " + "level='"
|
||||
+ this.level + '\'' + '}';
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
@@ -97,6 +90,13 @@ public class ItemDeprecation {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ItemDeprecation{" + "reason='" + this.reason + '\'' + ", "
|
||||
+ "replacement='" + this.replacement + '\'' + ", " + "level='"
|
||||
+ this.level + '\'' + '}';
|
||||
}
|
||||
|
||||
private boolean nullSafeEquals(Object o1, Object o2) {
|
||||
if (o1 == o2) {
|
||||
return true;
|
||||
|
||||
@@ -133,24 +133,6 @@ public final class ItemMetadata implements Comparable<ItemMetadata> {
|
||||
this.deprecation = deprecation;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder string = new StringBuilder(this.name);
|
||||
buildToStringProperty(string, "type", this.type);
|
||||
buildToStringProperty(string, "sourceType", this.sourceType);
|
||||
buildToStringProperty(string, "description", this.description);
|
||||
buildToStringProperty(string, "defaultValue", this.defaultValue);
|
||||
buildToStringProperty(string, "deprecation", this.deprecation);
|
||||
return string.toString();
|
||||
}
|
||||
|
||||
protected void buildToStringProperty(StringBuilder string, String property,
|
||||
Object value) {
|
||||
if (value != null) {
|
||||
string.append(" ").append(property).append(":").append(value);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
@@ -199,6 +181,24 @@ public final class ItemMetadata implements Comparable<ItemMetadata> {
|
||||
return (o != null) ? o.hashCode() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder string = new StringBuilder(this.name);
|
||||
buildToStringProperty(string, "type", this.type);
|
||||
buildToStringProperty(string, "sourceType", this.sourceType);
|
||||
buildToStringProperty(string, "description", this.description);
|
||||
buildToStringProperty(string, "defaultValue", this.defaultValue);
|
||||
buildToStringProperty(string, "deprecation", this.deprecation);
|
||||
return string.toString();
|
||||
}
|
||||
|
||||
protected void buildToStringProperty(StringBuilder string, String property,
|
||||
Object value) {
|
||||
if (value != null) {
|
||||
string.append(" ").append(property).append(":").append(value);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(ItemMetadata o) {
|
||||
return getName().compareTo(o.getName());
|
||||
|
||||
@@ -162,21 +162,6 @@ public class BuildInfoProperties implements Serializable {
|
||||
this.additionalProperties = additionalProperties;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((this.additionalProperties == null) ? 0
|
||||
: this.additionalProperties.hashCode());
|
||||
result = prime * result
|
||||
+ ((this.artifact == null) ? 0 : this.artifact.hashCode());
|
||||
result = prime * result + ((this.group == null) ? 0 : this.group.hashCode());
|
||||
result = prime * result + ((this.name == null) ? 0 : this.name.hashCode());
|
||||
result = prime * result + ((this.version == null) ? 0 : this.version.hashCode());
|
||||
result = prime * result + ((this.time == null) ? 0 : this.time.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -207,4 +192,19 @@ public class BuildInfoProperties implements Serializable {
|
||||
return (o1.equals(o2));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((this.additionalProperties == null) ? 0
|
||||
: this.additionalProperties.hashCode());
|
||||
result = prime * result
|
||||
+ ((this.artifact == null) ? 0 : this.artifact.hashCode());
|
||||
result = prime * result + ((this.group == null) ? 0 : this.group.hashCode());
|
||||
result = prime * result + ((this.name == null) ? 0 : this.name.hashCode());
|
||||
result = prime * result + ((this.version == null) ? 0 : this.version.hashCode());
|
||||
result = prime * result + ((this.time == null) ? 0 : this.time.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -73,16 +73,6 @@ public class LaunchScriptConfiguration implements Serializable {
|
||||
this.script = script;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result
|
||||
+ ((this.properties == null) ? 0 : this.properties.hashCode());
|
||||
result = prime * result + ((this.script == null) ? 0 : this.script.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -118,4 +108,14 @@ public class LaunchScriptConfiguration implements Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result
|
||||
+ ((this.properties == null) ? 0 : this.properties.hashCode());
|
||||
result = prime * result + ((this.script == null) ? 0 : this.script.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -384,16 +384,6 @@ public abstract class MainClassFinder {
|
||||
return this.annotationNames;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.name.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -412,6 +402,16 @@ public abstract class MainClassFinder {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.name.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -124,20 +124,6 @@ final class AsciiBytes {
|
||||
return new AsciiBytes(this.bytes, this.offset + beginIndex, length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (this.string == null) {
|
||||
if (this.length == 0) {
|
||||
this.string = EMPTY_STRING;
|
||||
}
|
||||
else {
|
||||
this.string = new String(this.bytes, this.offset, this.length,
|
||||
StandardCharsets.UTF_8);
|
||||
}
|
||||
}
|
||||
return this.string;
|
||||
}
|
||||
|
||||
public boolean matches(CharSequence name, char suffix) {
|
||||
int charIndex = 0;
|
||||
int nameLen = name.length();
|
||||
@@ -178,30 +164,6 @@ final class AsciiBytes {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = this.hash;
|
||||
if (hash == 0 && this.bytes.length > 0) {
|
||||
for (int i = this.offset; i < this.offset + this.length; i++) {
|
||||
int b = this.bytes[i];
|
||||
int remainingUtfBytes = getNumberOfUtfBytes(b) - 1;
|
||||
b &= INITIAL_BYTE_BITMASK[remainingUtfBytes];
|
||||
for (int j = 0; j < remainingUtfBytes; j++) {
|
||||
b = (b << 6) + (this.bytes[++i] & SUBSEQUENT_BYTE_BITMASK);
|
||||
}
|
||||
if (b <= 0xFFFF) {
|
||||
hash = 31 * hash + b;
|
||||
}
|
||||
else {
|
||||
hash = 31 * hash + ((b >> 0xA) + 0xD7C0);
|
||||
hash = 31 * hash + ((b & 0x3FF) + 0xDC00);
|
||||
}
|
||||
}
|
||||
this.hash = hash;
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
private int getNumberOfUtfBytes(int b) {
|
||||
if ((b & 0x80) == 0) {
|
||||
return 1;
|
||||
@@ -236,6 +198,44 @@ final class AsciiBytes {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = this.hash;
|
||||
if (hash == 0 && this.bytes.length > 0) {
|
||||
for (int i = this.offset; i < this.offset + this.length; i++) {
|
||||
int b = this.bytes[i];
|
||||
int remainingUtfBytes = getNumberOfUtfBytes(b) - 1;
|
||||
b &= INITIAL_BYTE_BITMASK[remainingUtfBytes];
|
||||
for (int j = 0; j < remainingUtfBytes; j++) {
|
||||
b = (b << 6) + (this.bytes[++i] & SUBSEQUENT_BYTE_BITMASK);
|
||||
}
|
||||
if (b <= 0xFFFF) {
|
||||
hash = 31 * hash + b;
|
||||
}
|
||||
else {
|
||||
hash = 31 * hash + ((b >> 0xA) + 0xD7C0);
|
||||
hash = 31 * hash + ((b & 0x3FF) + 0xDC00);
|
||||
}
|
||||
}
|
||||
this.hash = hash;
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (this.string == null) {
|
||||
if (this.length == 0) {
|
||||
this.string = EMPTY_STRING;
|
||||
}
|
||||
else {
|
||||
this.string = new String(this.bytes, this.offset, this.length,
|
||||
StandardCharsets.UTF_8);
|
||||
}
|
||||
}
|
||||
return this.string;
|
||||
}
|
||||
|
||||
static String toString(byte[] bytes) {
|
||||
return new String(bytes, StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
@@ -106,23 +106,6 @@ final class StringSequence implements CharSequence {
|
||||
return subSequence(offset, offset + prefix.length()).equals(prefix);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.source.substring(this.start, this.end);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = this.hash;
|
||||
if (hash == 0 && length() > 0) {
|
||||
for (int i = this.start; i < this.end; i++) {
|
||||
hash = 31 * hash + this.source.charAt(i);
|
||||
}
|
||||
this.hash = hash;
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -146,4 +129,21 @@ final class StringSequence implements CharSequence {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = this.hash;
|
||||
if (hash == 0 && length() > 0) {
|
||||
for (int i = this.start; i < this.end; i++) {
|
||||
hash = 31 * hash + this.source.charAt(i);
|
||||
}
|
||||
this.hash = hash;
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.source.substring(this.start, this.end);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -101,11 +101,6 @@ public class ParentContextCloserApplicationListener
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ObjectUtils.nullSafeHashCode(this.childContext.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -122,6 +117,11 @@ public class ParentContextCloserApplicationListener
|
||||
return super.equals(obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ObjectUtils.nullSafeHashCode(this.childContext.get());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -733,16 +733,6 @@ public class ConfigFileApplicationListener
|
||||
return this.defaultProfile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.name.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
@@ -754,6 +744,16 @@ public class ConfigFileApplicationListener
|
||||
return ((Profile) obj).name.equals(this.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.name.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -770,11 +770,6 @@ public class ConfigFileApplicationListener
|
||||
this.resource = resource;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.loader.hashCode() * 31 + this.resource.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -788,6 +783,11 @@ public class ConfigFileApplicationListener
|
||||
&& this.resource.equals(other.resource);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.loader.hashCode() * 31 + this.resource.hashCode();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -140,11 +140,6 @@ public final class BindResult<T> {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ObjectUtils.nullSafeHashCode(this.value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -156,6 +151,11 @@ public final class BindResult<T> {
|
||||
return ObjectUtils.nullSafeEquals(this.value, ((BindResult<?>) obj).value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ObjectUtils.nullSafeHashCode(this.value);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
static <T> BindResult<T> of(T value) {
|
||||
if (value == null) {
|
||||
|
||||
@@ -106,24 +106,6 @@ public final class Bindable<T> {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
ToStringCreator creator = new ToStringCreator(this);
|
||||
creator.append("type", this.type);
|
||||
creator.append("value", (this.value != null) ? "provided" : "none");
|
||||
creator.append("annotations", this.annotations);
|
||||
return creator.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(this.type);
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(this.annotations);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -139,6 +121,24 @@ public final class Bindable<T> {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(this.type);
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(this.annotations);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
ToStringCreator creator = new ToStringCreator(this);
|
||||
creator.append("type", this.type);
|
||||
creator.append("value", (this.value != null) ? "provided" : "none");
|
||||
creator.append("annotations", this.annotations);
|
||||
return creator.toString();
|
||||
}
|
||||
|
||||
private boolean nullSafeEquals(Object o1, Object o2) {
|
||||
return ObjectUtils.nullSafeEquals(o1, o2);
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
@@ -63,13 +63,6 @@ public final class ConfigurationProperty
|
||||
return this.origin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = ObjectUtils.nullSafeHashCode(this.name);
|
||||
result = 31 * result + ObjectUtils.nullSafeHashCode(this.value);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -85,6 +78,13 @@ public final class ConfigurationProperty
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = ObjectUtils.nullSafeHashCode(this.name);
|
||||
result = 31 * result + ObjectUtils.nullSafeHashCode(this.value);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringCreator(this).append("name", this.name)
|
||||
|
||||
@@ -295,62 +295,6 @@ public final class ConfigurationPropertyName
|
||||
return e1.compareTo(e2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (this.string == null) {
|
||||
this.string = toString(this.elements);
|
||||
}
|
||||
return this.string;
|
||||
}
|
||||
|
||||
private String toString(CharSequence[] elements) {
|
||||
StringBuilder result = new StringBuilder();
|
||||
for (CharSequence element : elements) {
|
||||
boolean indexed = isIndexed(element);
|
||||
if (result.length() > 0 && !indexed) {
|
||||
result.append(".");
|
||||
}
|
||||
if (indexed) {
|
||||
result.append(element);
|
||||
}
|
||||
else {
|
||||
for (int i = 0; i < element.length(); i++) {
|
||||
char ch = Character.toLowerCase(element.charAt(i));
|
||||
result.append((ch != '_') ? ch : "");
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
if (this.elementHashCodes == null) {
|
||||
this.elementHashCodes = getElementHashCodes();
|
||||
}
|
||||
return ObjectUtils.nullSafeHashCode(this.elementHashCodes);
|
||||
}
|
||||
|
||||
private int[] getElementHashCodes() {
|
||||
int[] hashCodes = new int[this.elements.length];
|
||||
for (int i = 0; i < this.elements.length; i++) {
|
||||
hashCodes[i] = getElementHashCode(this.elements[i]);
|
||||
}
|
||||
return hashCodes;
|
||||
}
|
||||
|
||||
private int getElementHashCode(CharSequence element) {
|
||||
int hash = 0;
|
||||
boolean indexed = isIndexed(element);
|
||||
int offset = (indexed ? 1 : 0);
|
||||
for (int i = 0 + offset; i < element.length() - offset; i++) {
|
||||
char ch = (indexed ? element.charAt(i)
|
||||
: Character.toLowerCase(element.charAt(i)));
|
||||
hash = (ch == '-' || ch == '_') ? hash : 31 * hash + Character.hashCode(ch);
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
@@ -409,6 +353,62 @@ public final class ConfigurationPropertyName
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
if (this.elementHashCodes == null) {
|
||||
this.elementHashCodes = getElementHashCodes();
|
||||
}
|
||||
return ObjectUtils.nullSafeHashCode(this.elementHashCodes);
|
||||
}
|
||||
|
||||
private int[] getElementHashCodes() {
|
||||
int[] hashCodes = new int[this.elements.length];
|
||||
for (int i = 0; i < this.elements.length; i++) {
|
||||
hashCodes[i] = getElementHashCode(this.elements[i]);
|
||||
}
|
||||
return hashCodes;
|
||||
}
|
||||
|
||||
private int getElementHashCode(CharSequence element) {
|
||||
int hash = 0;
|
||||
boolean indexed = isIndexed(element);
|
||||
int offset = (indexed ? 1 : 0);
|
||||
for (int i = 0 + offset; i < element.length() - offset; i++) {
|
||||
char ch = (indexed ? element.charAt(i)
|
||||
: Character.toLowerCase(element.charAt(i)));
|
||||
hash = (ch == '-' || ch == '_') ? hash : 31 * hash + Character.hashCode(ch);
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (this.string == null) {
|
||||
this.string = toString(this.elements);
|
||||
}
|
||||
return this.string;
|
||||
}
|
||||
|
||||
private String toString(CharSequence[] elements) {
|
||||
StringBuilder result = new StringBuilder();
|
||||
for (CharSequence element : elements) {
|
||||
boolean indexed = isIndexed(element);
|
||||
if (result.length() > 0 && !indexed) {
|
||||
result.append(".");
|
||||
}
|
||||
if (indexed) {
|
||||
result.append(element);
|
||||
}
|
||||
else {
|
||||
for (int i = 0; i < element.length(); i++) {
|
||||
char ch = Character.toLowerCase(element.charAt(i));
|
||||
result.append((ch != '_') ? ch : "");
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
private static boolean isIndexed(CharSequence element) {
|
||||
return element.charAt(0) == '[' && element.charAt(element.length() - 1) == ']';
|
||||
}
|
||||
|
||||
@@ -191,11 +191,6 @@ class SpringIterableConfigurationPropertySource extends SpringConfigurationPrope
|
||||
return ((String[]) key).clone();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.key.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -207,6 +202,11 @@ class SpringIterableConfigurationPropertySource extends SpringConfigurationPrope
|
||||
return ObjectUtils.nullSafeEquals(this.key, ((CacheKey) obj).key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.key.hashCode();
|
||||
}
|
||||
|
||||
public static CacheKey get(EnumerablePropertySource<?> source) {
|
||||
if (source instanceof MapPropertySource) {
|
||||
return new CacheKey(((MapPropertySource) source).getSource().keySet());
|
||||
|
||||
@@ -139,11 +139,6 @@ class BeanCurrentlyInCreationFailureAnalyzer
|
||||
return ((UnsatisfiedDependencyException) ex).getInjectionPoint();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.name.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -155,6 +150,11 @@ class BeanCurrentlyInCreationFailureAnalyzer
|
||||
return this.name.equals(((BeanInCycle) obj).name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.name.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.name + this.description;
|
||||
|
||||
@@ -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.
|
||||
@@ -72,22 +72,6 @@ public final class LoggerConfiguration {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LoggerConfiguration [name=" + this.name + ", configuredLevel="
|
||||
+ this.configuredLevel + ", effectiveLevel=" + this.effectiveLevel + "]";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(this.name);
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(this.configuredLevel);
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(this.effectiveLevel);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -109,4 +93,20 @@ public final class LoggerConfiguration {
|
||||
return super.equals(obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(this.name);
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(this.configuredLevel);
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(this.effectiveLevel);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LoggerConfiguration [name=" + this.name + ", configuredLevel="
|
||||
+ this.configuredLevel + ", effectiveLevel=" + this.effectiveLevel + "]";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -52,8 +52,11 @@ public class OriginTrackedValue implements OriginProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return (this.value != null) ? this.value.toString() : null;
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null || obj.getClass() != getClass()) {
|
||||
return false;
|
||||
}
|
||||
return ObjectUtils.nullSafeEquals(this.value, ((OriginTrackedValue) obj).value);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -62,11 +65,8 @@ public class OriginTrackedValue implements OriginProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null || obj.getClass() != getClass()) {
|
||||
return false;
|
||||
}
|
||||
return ObjectUtils.nullSafeEquals(this.value, ((OriginTrackedValue) obj).value);
|
||||
public String toString() {
|
||||
return (this.value != null) ? this.value.toString() : null;
|
||||
}
|
||||
|
||||
public static OriginTrackedValue of(Object value) {
|
||||
|
||||
@@ -40,16 +40,6 @@ public class SystemEnvironmentOrigin implements Origin {
|
||||
return this.property;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "System Environment Property \"" + this.property + "\"";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ObjectUtils.nullSafeHashCode(this.property);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -62,4 +52,14 @@ public class SystemEnvironmentOrigin implements Origin {
|
||||
return ObjectUtils.nullSafeEquals(this.property, other.property);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ObjectUtils.nullSafeHashCode(this.property);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "System Environment Property \"" + this.property + "\"";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -54,14 +54,6 @@ public class TextResourceOrigin implements Origin {
|
||||
return this.location;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 1;
|
||||
result = 31 * result + ObjectUtils.nullSafeHashCode(this.resource);
|
||||
result = 31 * result + ObjectUtils.nullSafeHashCode(this.location);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -80,6 +72,14 @@ public class TextResourceOrigin implements Origin {
|
||||
return super.equals(obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 1;
|
||||
result = 31 * result + ObjectUtils.nullSafeHashCode(this.resource);
|
||||
result = 31 * result + ObjectUtils.nullSafeHashCode(this.location);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder result = new StringBuilder();
|
||||
@@ -126,11 +126,6 @@ public class TextResourceOrigin implements Origin {
|
||||
return this.column;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return (31 * this.line) + this.column;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -146,6 +141,11 @@ public class TextResourceOrigin implements Origin {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return (31 * this.line) + this.column;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return (this.line + 1) + ":" + (this.column + 1);
|
||||
|
||||
@@ -60,16 +60,6 @@ public class ApplicationPid {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return (this.pid != null) ? this.pid : "???";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ObjectUtils.nullSafeHashCode(this.pid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
@@ -81,6 +71,16 @@ public class ApplicationPid {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ObjectUtils.nullSafeHashCode(this.pid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return (this.pid != null) ? this.pid : "???";
|
||||
}
|
||||
|
||||
/**
|
||||
* Write the PID to the specified file.
|
||||
* @param file the PID file
|
||||
|
||||
@@ -340,16 +340,6 @@ public class UndertowServletWebServer implements WebServer {
|
||||
return this.number;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.number + " (" + this.protocol + ")";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.number;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -368,6 +358,16 @@ public class UndertowServletWebServer implements WebServer {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.number;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.number + " (" + this.protocol + ")";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -268,16 +268,6 @@ public class UndertowWebServer implements WebServer {
|
||||
return this.number;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.number + " (" + this.protocol + ")";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.number;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -296,6 +286,16 @@ public class UndertowWebServer implements WebServer {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.number;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.number + " (" + this.protocol + ")";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -104,16 +104,6 @@ public class ErrorPage {
|
||||
return (this.status == null && this.exception == null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(getExceptionName());
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(this.path);
|
||||
result = prime * result + this.getStatusCode();
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -134,4 +124,14 @@ public class ErrorPage {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(getExceptionName());
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(this.path);
|
||||
result = prime * result + this.getStatusCode();
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -302,11 +302,6 @@ public final class MimeMappings implements Iterable<MimeMappings.Mapping> {
|
||||
return (previous != null) ? previous.getMimeType() : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.map.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null) {
|
||||
@@ -322,6 +317,11 @@ public final class MimeMappings implements Iterable<MimeMappings.Mapping> {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.map.hashCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new unmodifiable view of the specified mapping. Methods that attempt to
|
||||
* modify the returned map will throw {@link UnsupportedOperationException}s.
|
||||
@@ -356,11 +356,6 @@ public final class MimeMappings implements Iterable<MimeMappings.Mapping> {
|
||||
return this.mimeType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.extension.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null) {
|
||||
@@ -377,6 +372,11 @@ public final class MimeMappings implements Iterable<MimeMappings.Mapping> {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.extension.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Mapping [extension=" + this.extension + ", mimeType=" + this.mimeType
|
||||
|
||||
@@ -32,11 +32,6 @@ public final class MockOrigin implements Origin {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.value.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -48,6 +43,11 @@ public final class MockOrigin implements Origin {
|
||||
return this.value.equals(((MockOrigin) obj).value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.value.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.value;
|
||||
|
||||
Reference in New Issue
Block a user