You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by GitBox <gi...@apache.org> on 2022/11/07 19:52:37 UTC

[GitHub] [ambari-metrics] kevinw66 commented on a diff in pull request #55: AMBARI-25516. Missing @OverRide on methods

kevinw66 commented on code in PR #55:
URL: https://github.com/apache/ambari-metrics/pull/55#discussion_r1015837957


##########
ambari-metrics-timelineservice/src/main/java/org/apache/ambari/metrics/core/timeline/upgrade/core/MetricsDataMigrationLauncher.java:
##########
@@ -306,15 +306,13 @@ public static void main(String[] args) {
     try {
       //Setup shutdown hook for metadata save.
       MetricsDataMigrationLauncher finalDataMigrationLauncher = dataMigrationLauncher;
-      Runtime.getRuntime().addShutdownHook(new Thread() {
-        public void run() {
-          try {
-            finalDataMigrationLauncher.saveMetadata();
-          } catch (SQLException e) {
-            LOG.error("Exception during metadata saving, exiting...", e);
-          }
+      Runtime.getRuntime().addShutdownHook(new Thread(() -> {
+        try {
+          finalDataMigrationLauncher.saveMetadata();
+        } catch (SQLException e) {
+          LOG.error("Exception during metadata saving, exiting...", e);
         }
-      });
+       }));

Review Comment:
   Oops, Looks the indent is incorrect



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org