Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
f3bbbc45
Commit
f3bbbc45
authored
Mar 28, 2017
by
dreis
Committed by
Stephane Nicoll
Apr 12, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use JDK hashCode() variants for primitives
See gh-8768
parent
aa405172
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
ConditionOutcome.java
...mework/boot/autoconfigure/condition/ConditionOutcome.java
+1
-1
FileSnapshot.java
...springframework/boot/devtools/filewatch/FileSnapshot.java
+3
-3
AnnotationCustomizableTypeExcludeFilter.java
...igure/filter/AnnotationCustomizableTypeExcludeFilter.java
+2
-2
MockDefinition.java
...pringframework/boot/test/mock/mockito/MockDefinition.java
+1
-1
No files found.
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionOutcome.java
View file @
f3bbbc45
...
@@ -124,7 +124,7 @@ public class ConditionOutcome {
...
@@ -124,7 +124,7 @@ public class ConditionOutcome {
@Override
@Override
public
int
hashCode
()
{
public
int
hashCode
()
{
return
ObjectUtils
.
hashCode
(
this
.
match
)
*
31
return
Boolean
.
hashCode
(
this
.
match
)
*
31
+
ObjectUtils
.
nullSafeHashCode
(
this
.
message
);
+
ObjectUtils
.
nullSafeHashCode
(
this
.
message
);
}
}
...
...
spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/FileSnapshot.java
View file @
f3bbbc45
...
@@ -70,9 +70,9 @@ class FileSnapshot {
...
@@ -70,9 +70,9 @@ class FileSnapshot {
@Override
@Override
public
int
hashCode
()
{
public
int
hashCode
()
{
int
hashCode
=
this
.
file
.
hashCode
();
int
hashCode
=
this
.
file
.
hashCode
();
hashCode
=
31
*
hashCode
+
(
this
.
exists
?
1231
:
1237
);
hashCode
=
31
*
hashCode
+
Boolean
.
hashCode
(
this
.
exists
);
hashCode
=
31
*
hashCode
+
(
int
)
(
this
.
length
^
(
this
.
length
>>>
32
)
);
hashCode
=
31
*
hashCode
+
Long
.
hashCode
(
this
.
length
);
hashCode
=
31
*
hashCode
+
(
int
)
(
this
.
lastModified
^
(
this
.
lastModified
>>>
32
)
);
hashCode
=
31
*
hashCode
+
Long
.
hashCode
(
this
.
lastModified
);
return
hashCode
;
return
hashCode
;
}
}
...
...
spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/filter/AnnotationCustomizableTypeExcludeFilter.java
View file @
f3bbbc45
...
@@ -121,12 +121,12 @@ public abstract class AnnotationCustomizableTypeExcludeFilter extends TypeExclud
...
@@ -121,12 +121,12 @@ public abstract class AnnotationCustomizableTypeExcludeFilter extends TypeExclud
public
int
hashCode
()
{
public
int
hashCode
()
{
final
int
prime
=
31
;
final
int
prime
=
31
;
int
result
=
0
;
int
result
=
0
;
result
=
prime
*
result
+
ObjectUtils
.
hashCode
(
hasAnnotation
());
result
=
prime
*
result
+
Boolean
.
hashCode
(
hasAnnotation
());
for
(
FilterType
filterType
:
FilterType
.
values
())
{
for
(
FilterType
filterType
:
FilterType
.
values
())
{
result
=
prime
*
result
result
=
prime
*
result
+
ObjectUtils
.
nullSafeHashCode
(
getFilters
(
filterType
));
+
ObjectUtils
.
nullSafeHashCode
(
getFilters
(
filterType
));
}
}
result
=
prime
*
result
+
ObjectUtils
.
hashCode
(
isUseDefaultFilters
());
result
=
prime
*
result
+
Boolean
.
hashCode
(
isUseDefaultFilters
());
result
=
prime
*
result
+
ObjectUtils
.
nullSafeHashCode
(
getDefaultIncludes
());
result
=
prime
*
result
+
ObjectUtils
.
nullSafeHashCode
(
getDefaultIncludes
());
result
=
prime
*
result
+
ObjectUtils
.
nullSafeHashCode
(
getComponentIncludes
());
result
=
prime
*
result
+
ObjectUtils
.
nullSafeHashCode
(
getComponentIncludes
());
return
result
;
return
result
;
...
...
spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/MockDefinition.java
View file @
f3bbbc45
...
@@ -105,7 +105,7 @@ class MockDefinition extends Definition {
...
@@ -105,7 +105,7 @@ class MockDefinition extends Definition {
result
=
MULTIPLIER
*
result
+
ObjectUtils
.
nullSafeHashCode
(
this
.
typeToMock
);
result
=
MULTIPLIER
*
result
+
ObjectUtils
.
nullSafeHashCode
(
this
.
typeToMock
);
result
=
MULTIPLIER
*
result
+
ObjectUtils
.
nullSafeHashCode
(
this
.
extraInterfaces
);
result
=
MULTIPLIER
*
result
+
ObjectUtils
.
nullSafeHashCode
(
this
.
extraInterfaces
);
result
=
MULTIPLIER
*
result
+
ObjectUtils
.
nullSafeHashCode
(
this
.
answer
);
result
=
MULTIPLIER
*
result
+
ObjectUtils
.
nullSafeHashCode
(
this
.
answer
);
result
=
MULTIPLIER
*
result
+
(
this
.
serializable
?
1231
:
1237
);
result
=
MULTIPLIER
*
result
+
Boolean
.
hashCode
(
this
.
serializable
);
return
result
;
return
result
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment