This is an automated email from the ASF dual-hosted git repository.
nixon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push:
new c5b06aa ATLAS-3134 Change Date.getTime() to
System.currentTimeMillis() for better performance
c5b06aa is described below
commit c5b06aaa4207dd4337a7d9fb56352602b71c611d
Author: Xia Li <[email protected]>
AuthorDate: Mon Jun 24 01:29:11 2019 -0500
ATLAS-3134 Change Date.getTime() to System.currentTimeMillis() for better
performance
---
.../atlas/repository/store/graph/v2/AtlasTypeDefGraphStoreV2.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasTypeDefGraphStoreV2.java
b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasTypeDefGraphStoreV2.java
index f360eef..a5ccfb5 100644
---
a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasTypeDefGraphStoreV2.java
+++
b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasTypeDefGraphStoreV2.java
@@ -525,12 +525,11 @@ public class AtlasTypeDefGraphStoreV2 extends
AtlasTypeDefGraphStore {
* increment the version value for this vertex
*/
private void markVertexUpdated(AtlasVertex vertex) {
- Date now = new Date();
Number currVersion =
vertex.getProperty(Constants.VERSION_PROPERTY_KEY, Number.class);
long newVersion = currVersion == null ? 1 :
(currVersion.longValue() + 1);
vertex.setProperty(Constants.MODIFIED_BY_KEY, getCurrentUser());
- vertex.setProperty(Constants.MODIFICATION_TIMESTAMP_PROPERTY_KEY,
now.getTime());
+ vertex.setProperty(Constants.MODIFICATION_TIMESTAMP_PROPERTY_KEY,
System.currentTimeMillis());
vertex.setProperty(Constants.VERSION_PROPERTY_KEY, newVersion);
}