LCOV - code coverage report
Current view: top level - extensions/common - FileInfo.java (source / functions) Hit Total Coverage
Test: _coverage_report.dat Lines: 8 11 72.7 %
Date: 2022-11-19 15:00:39 Functions: 2 4 50.0 %

          Line data    Source code
       1             : // Copyright (C) 2014 The Android Open Source Project
       2             : //
       3             : // Licensed under the Apache License, Version 2.0 (the "License");
       4             : // you may not use this file except in compliance with the License.
       5             : // You may obtain a copy of the License at
       6             : //
       7             : // http://www.apache.org/licenses/LICENSE-2.0
       8             : //
       9             : // Unless required by applicable law or agreed to in writing, software
      10             : // distributed under the License is distributed on an "AS IS" BASIS,
      11             : // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      12             : // See the License for the specific language governing permissions and
      13             : // limitations under the License.
      14             : 
      15             : package com.google.gerrit.extensions.common;
      16             : 
      17             : import java.util.Objects;
      18             : 
      19         103 : public class FileInfo {
      20             :   public Character status;
      21             :   public Integer oldMode;
      22             :   public Integer newMode;
      23             :   public Boolean binary;
      24             :   public String oldPath;
      25             :   public Integer linesInserted;
      26             :   public Integer linesDeleted;
      27             :   public long sizeDelta;
      28             :   public long size;
      29             : 
      30             :   @Override
      31             :   public boolean equals(Object o) {
      32           1 :     if (o instanceof FileInfo) {
      33           1 :       FileInfo fileInfo = (FileInfo) o;
      34           1 :       return Objects.equals(status, fileInfo.status)
      35           1 :           && Objects.equals(binary, fileInfo.binary)
      36           1 :           && Objects.equals(oldPath, fileInfo.oldPath)
      37           1 :           && Objects.equals(linesInserted, fileInfo.linesInserted)
      38           1 :           && Objects.equals(linesDeleted, fileInfo.linesDeleted)
      39             :           && sizeDelta == fileInfo.sizeDelta
      40             :           && size == fileInfo.size;
      41             :     }
      42           0 :     return false;
      43             :   }
      44             : 
      45             :   @Override
      46             :   public int hashCode() {
      47           0 :     return Objects.hash(status, binary, oldPath, linesInserted, linesDeleted, sizeDelta, size);
      48             :   }
      49             : 
      50             :   @Override
      51             :   public String toString() {
      52           0 :     return "FileInfo{"
      53             :         + "status="
      54             :         + status
      55             :         + ", binary="
      56             :         + binary
      57             :         + ", oldPath="
      58             :         + oldPath
      59             :         + ", linesInserted="
      60             :         + linesInserted
      61             :         + ", linesDeleted="
      62             :         + linesDeleted
      63             :         + ", sizeDelta="
      64             :         + sizeDelta
      65             :         + ", size="
      66             :         + size
      67             :         + "}";
      68             :   }
      69             : }

Generated by: LCOV version 1.16+git.20220603.dfeb750