Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
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
apollo
Commits
701f2c4b
Commit
701f2c4b
authored
Jul 04, 2016
by
Jason Song
Committed by
GitHub
Jul 04, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #307 from nobodyiam/client-misc-fix
use java string builder for toString methods
parents
8a0c7f3a
f3ea13b3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
27 deletions
+23
-27
ConfigChange.java
...n/java/com/ctrip/framework/apollo/model/ConfigChange.java
+9
-9
ApolloConfig.java
...ava/com/ctrip/framework/apollo/core/dto/ApolloConfig.java
+8
-10
ServiceDTO.java
.../java/com/ctrip/framework/apollo/core/dto/ServiceDTO.java
+6
-8
No files found.
apollo-client/src/main/java/com/ctrip/framework/apollo/model/ConfigChange.java
View file @
701f2c4b
package
com
.
ctrip
.
framework
.
apollo
.
model
;
package
com
.
ctrip
.
framework
.
apollo
.
model
;
import
com.google.common.base.
More
Objects
;
import
com.google.common.base.Objects
;
import
com.ctrip.framework.apollo.enums.PropertyChangeType
;
import
com.ctrip.framework.apollo.enums.PropertyChangeType
;
...
@@ -67,13 +67,13 @@ public class ConfigChange {
...
@@ -67,13 +67,13 @@ public class ConfigChange {
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
MoreObjects
.
toStringHelper
(
this
)
final
StringBuilder
sb
=
new
StringBuilder
(
"ConfigChange{"
);
.
omitNullValues
()
sb
.
append
(
"namespace='"
).
append
(
namespace
).
append
(
'\''
);
.
add
(
"namespace"
,
namespace
)
sb
.
append
(
", propertyName='"
).
append
(
propertyName
).
append
(
'\''
);
.
add
(
"propertyName"
,
propertyName
)
sb
.
append
(
", oldValue='"
).
append
(
oldValue
).
append
(
'\''
);
.
add
(
"oldValue"
,
oldValue
)
sb
.
append
(
", newValue='"
).
append
(
newValue
).
append
(
'\''
);
.
add
(
"newValue"
,
newValue
)
sb
.
append
(
", changeType="
).
append
(
changeType
);
.
add
(
"changeType"
,
changeType
)
sb
.
append
(
'}'
);
.
toString
();
return
sb
.
toString
();
}
}
}
}
apollo-core/src/main/java/com/ctrip/framework/apollo/core/dto/ApolloConfig.java
View file @
701f2c4b
package
com
.
ctrip
.
framework
.
apollo
.
core
.
dto
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
dto
;
import
com.google.common.base.MoreObjects
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -74,13 +72,13 @@ public class ApolloConfig {
...
@@ -74,13 +72,13 @@ public class ApolloConfig {
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
MoreObjects
.
toStringHelper
(
this
)
final
StringBuilder
sb
=
new
StringBuilder
(
"ApolloConfig{"
);
.
omitNullValues
()
sb
.
append
(
"appId='"
).
append
(
appId
).
append
(
'\''
);
.
add
(
"appId"
,
appId
)
sb
.
append
(
", cluster='"
).
append
(
cluster
).
append
(
'\''
);
.
add
(
"cluster"
,
cluster
)
sb
.
append
(
", namespaceName='"
).
append
(
namespaceName
).
append
(
'\''
);
.
add
(
"namespaceName"
,
namespaceName
)
sb
.
append
(
", configurations="
).
append
(
configurations
);
.
add
(
"releaseKey"
,
releaseKey
)
sb
.
append
(
", releaseKey='"
).
append
(
releaseKey
).
append
(
'\''
);
.
add
(
"configurations"
,
configurations
)
sb
.
append
(
'}'
);
.
toString
();
return
sb
.
toString
();
}
}
}
}
apollo-core/src/main/java/com/ctrip/framework/apollo/core/dto/ServiceDTO.java
View file @
701f2c4b
package
com
.
ctrip
.
framework
.
apollo
.
core
.
dto
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
dto
;
import
com.google.common.base.MoreObjects
;
public
class
ServiceDTO
{
public
class
ServiceDTO
{
private
String
appName
;
private
String
appName
;
...
@@ -36,11 +34,11 @@ public class ServiceDTO {
...
@@ -36,11 +34,11 @@ public class ServiceDTO {
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
MoreObjects
.
toStringHelper
(
this
)
final
StringBuilder
sb
=
new
StringBuilder
(
"ServiceDTO{"
);
.
omitNullValues
()
sb
.
append
(
"appName='"
).
append
(
appName
).
append
(
'\''
);
.
add
(
"appName"
,
appName
)
sb
.
append
(
", instanceId='"
).
append
(
instanceId
).
append
(
'\''
);
.
add
(
"instanceId"
,
instanceId
)
sb
.
append
(
", homepageUrl='"
).
append
(
homepageUrl
).
append
(
'\''
);
.
add
(
"homepageUrl"
,
homepageUrl
)
sb
.
append
(
'}'
);
.
toString
();
return
sb
.
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