Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-cloud-netflix
Project
Overview
Details
Activity
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
openSource
spring-cloud-netflix
Commits
72c31ca5
Commit
72c31ca5
authored
Jul 14, 2017
by
Gregor Zurowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish code
- Remove formatter markers - Use StringBuilder in toString method Signed-off-by:
Gregor Zurowski
<
gregor@zurowski.org
>
parent
4d699415
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
15 deletions
+9
-15
EurekaInstanceCanceledEvent.java
...flix/eureka/server/event/EurekaInstanceCanceledEvent.java
+1
-4
EurekaInstanceRegisteredEvent.java
...ix/eureka/server/event/EurekaInstanceRegisteredEvent.java
+1
-4
EurekaInstanceRenewedEvent.java
...tflix/eureka/server/event/EurekaInstanceRenewedEvent.java
+7
-7
No files found.
spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/event/EurekaInstanceCanceledEvent.java
View file @
72c31ca5
...
...
@@ -22,6 +22,7 @@ import java.util.Objects;
/**
* @author Spencer Gibb
* @author Gregor Zurowski
*/
@SuppressWarnings
(
"serial"
)
public
class
EurekaInstanceCanceledEvent
extends
ApplicationEvent
{
...
...
@@ -66,14 +67,12 @@ public class EurekaInstanceCanceledEvent extends ApplicationEvent {
@Override
public
boolean
equals
(
Object
o
)
{
// @formatter:off
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
EurekaInstanceCanceledEvent
that
=
(
EurekaInstanceCanceledEvent
)
o
;
return
Objects
.
equals
(
appName
,
that
.
appName
)
&&
Objects
.
equals
(
serverId
,
that
.
serverId
)
&&
replication
==
replication
;
// @formatter:on
}
@Override
...
...
@@ -83,13 +82,11 @@ public class EurekaInstanceCanceledEvent extends ApplicationEvent {
@Override
public
String
toString
()
{
// @formatter:off
return
new
StringBuilder
(
"EurekaInstanceCanceledEvent{"
)
.
append
(
"appName='"
).
append
(
appName
).
append
(
"', "
)
.
append
(
"serverId='"
).
append
(
serverId
).
append
(
"', "
)
.
append
(
"replication="
).
append
(
replication
).
append
(
"}"
)
.
toString
();
// @formatter:on
}
}
spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/event/EurekaInstanceRegisteredEvent.java
View file @
72c31ca5
...
...
@@ -24,6 +24,7 @@ import java.util.Objects;
/**
* @author Spencer Gibb
* @author Gregor Zurowski
*/
@SuppressWarnings
(
"serial"
)
public
class
EurekaInstanceRegisteredEvent
extends
ApplicationEvent
{
...
...
@@ -68,14 +69,12 @@ public class EurekaInstanceRegisteredEvent extends ApplicationEvent {
@Override
public
boolean
equals
(
Object
o
)
{
// @formatter:off
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
EurekaInstanceRegisteredEvent
that
=
(
EurekaInstanceRegisteredEvent
)
o
;
return
Objects
.
equals
(
instanceInfo
,
that
.
instanceInfo
)
&&
leaseDuration
==
leaseDuration
&&
replication
==
replication
;
// @formatter:on
}
@Override
...
...
@@ -85,12 +84,10 @@ public class EurekaInstanceRegisteredEvent extends ApplicationEvent {
@Override
public
String
toString
()
{
// @formatter:off
return
new
StringBuilder
(
"EurekaInstanceRegisteredEvent{"
)
.
append
(
"instanceInfo="
).
append
(
instanceInfo
).
append
(
", "
)
.
append
(
"leaseDuration="
).
append
(
leaseDuration
).
append
(
", "
)
.
append
(
"replication="
).
append
(
replication
).
append
(
"}"
)
.
toString
();
// @formatter:on
}
}
spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/event/EurekaInstanceRenewedEvent.java
View file @
72c31ca5
...
...
@@ -24,6 +24,7 @@ import java.util.Objects;
/**
* @author Spencer Gibb
* @author Gregor Zurowski
*/
@SuppressWarnings
(
"serial"
)
public
class
EurekaInstanceRenewedEvent
extends
ApplicationEvent
{
...
...
@@ -79,7 +80,6 @@ public class EurekaInstanceRenewedEvent extends ApplicationEvent {
@Override
public
boolean
equals
(
Object
o
)
{
// @formatter:off
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
EurekaInstanceRenewedEvent
that
=
(
EurekaInstanceRenewedEvent
)
o
;
...
...
@@ -87,7 +87,6 @@ public class EurekaInstanceRenewedEvent extends ApplicationEvent {
Objects
.
equals
(
serverId
,
that
.
serverId
)
&&
Objects
.
equals
(
instanceInfo
,
that
.
instanceInfo
)
&&
replication
==
that
.
replication
;
// @formatter:on
}
@Override
...
...
@@ -97,11 +96,12 @@ public class EurekaInstanceRenewedEvent extends ApplicationEvent {
@Override
public
String
toString
()
{
// @formatter:off
return
"EurekaInstanceRenewedEvent{"
+
"appName='"
+
appName
+
'\''
+
", serverId='"
+
serverId
+
'\''
+
", instanceInfo="
+
instanceInfo
+
", replication="
+
replication
+
'}'
;
// @formatter:on
return
new
StringBuilder
(
"EurekaInstanceRenewedEvent{"
)
.
append
(
"appName='"
).
append
(
appName
).
append
(
"', "
)
.
append
(
"serverId='"
).
append
(
serverId
).
append
(
"', "
)
.
append
(
"instanceInfo="
).
append
(
instanceInfo
).
append
(
", "
)
.
append
(
"replication="
).
append
(
replication
).
append
(
"}"
)
.
toString
();
}
}
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