jixuan1989 commented on a change in pull request #32: fix sonar issues
URL: https://github.com/apache/incubator-iotdb/pull/32#discussion_r253126315
 
 

 ##########
 File path: 
iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeProcessor.java
 ##########
 @@ -1893,23 +1762,96 @@ private void writeStoreToDisk(FileNodeProcessorStore 
fileNodeProcessorStore)
 
   private FileNodeProcessorStore readStoreFromDisk() throws 
FileNodeProcessorException {
 
-    synchronized (fileNodeRestoreFilePath) {
+    synchronized (fileNodeRestoreLock) {
       FileNodeProcessorStore processorStore;
       SerializeUtil<FileNodeProcessorStore> serializeUtil = new 
SerializeUtil<>();
       try {
         processorStore = serializeUtil.deserialize(fileNodeRestoreFilePath)
             .orElse(new FileNodeProcessorStore(false, new HashMap<>(),
                 new IntervalFileNode(OverflowChangeType.NO_CHANGE, null),
-                new ArrayList<IntervalFileNode>(), 
FileNodeProcessorStatus.NONE, 0));
+                new ArrayList<>(), FileNodeProcessorStatus.NONE, 0));
       } catch (IOException e) {
-        e.printStackTrace();
         throw new FileNodeProcessorException(e);
       }
       return processorStore;
     }
   }
 
-  public String getFileNodeRestoreFilePath() {
+  String getFileNodeRestoreFilePath() {
     return fileNodeRestoreFilePath;
   }
+
+  @Override
+  public boolean equals(Object o) {
 
 Review comment:
   > This is required by Sonar that any sub-classes with new fields should 
override equals().
   
   That is to say.... we have to override the equals() and hashCode() for ALL 
JAVA Files??

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to