findbugs-exclude.xml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <!--
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  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. <FindBugsFilter>
  16. <!-- This reference equality check is an intentional light weight
  17. check to avoid re-validating the token when re-used. -->
  18. <Match>
  19. <Class name="org.apache.hadoop.fs.azurebfs.utils.CachedSASToken" />
  20. <Method name="update" />
  21. <Bug pattern="ES_COMPARING_PARAMETER_STRING_WITH_EQ" />
  22. </Match>
  23. <!-- This is intentional. The unsynchronized field access is safe
  24. and only synchronized access is used when using the sasToken
  25. for authorization. -->
  26. <Match>
  27. <Class name="org.apache.hadoop.fs.azurebfs.utils.CachedSASToken" />
  28. <Field name="sasToken" />
  29. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  30. </Match>
  31. <!-- It is okay to skip up to end of file. No need to check return value. -->
  32. <Match>
  33. <Class name="org.apache.hadoop.fs.azure.AzureNativeFileSystemStore" />
  34. <Method name="retrieve" />
  35. <Bug pattern="SR_NOT_CHECKED" />
  36. <Priority value="2" />
  37. </Match>
  38. <!-- Returning fully loaded array to iterate through is a convenience
  39. and helps performance. -->
  40. <Match>
  41. <Class name="org.apache.hadoop.fs.azure.NativeAzureFileSystem$FolderRenamePending" />
  42. <Method name="getFiles" />
  43. <Bug pattern="EI_EXPOSE_REP" />
  44. <Priority value="2" />
  45. </Match>
  46. <!-- Need to start keep-alive thread for SelfRenewingLease in constructor. -->
  47. <Match>
  48. <Class name="org.apache.hadoop.fs.azure.SelfRenewingLease" />
  49. <Bug pattern="SC_START_IN_CTOR" />
  50. <Priority value="2" />
  51. </Match>
  52. <!-- Using a key set iterator is fine because this is not a performance-critical
  53. method. -->
  54. <Match>
  55. <Class name="org.apache.hadoop.fs.azure.PageBlobOutputStream" />
  56. <Method name="logAllStackTraces" />
  57. <Bug pattern="WMI_WRONG_MAP_ITERATOR" />
  58. <Priority value="2" />
  59. </Match>
  60. <!-- FileMetadata is used internally for storing metadata but also
  61. subclasses FileStatus to reduce allocations when listing a large number
  62. of files. When it is returned to an external caller as a FileStatus, the
  63. extra metadata is no longer useful and we want the equals and hashCode
  64. methods of FileStatus to be used. -->
  65. <Match>
  66. <Class name="org.apache.hadoop.fs.azure.FileMetadata" />
  67. <Bug pattern="EQ_DOESNT_OVERRIDE_EQUALS" />
  68. </Match>
  69. <!-- continuation is returned from an external http call. Keeping this
  70. outside synchronized block since the same is costly. -->
  71. <Match>
  72. <Class name="org.apache.hadoop.fs.azurebfs.services.AbfsListStatusRemoteIterator" />
  73. <Field name="continuation" />
  74. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  75. </Match>
  76. <!-- This field is instance of BlockBlobInputStream and read(long, byte[], int, int)
  77. calls it's Super class method when 'fs.azure.block.blob.buffered.pread.disable'
  78. is configured false. Super class FSInputStream's implementation is having
  79. proper synchronization.
  80. When 'fs.azure.block.blob.buffered.pread.disable' is true, we want a lock free
  81. implementation of blob read. Here we don't use any of the InputStream's
  82. shared resource (buffer) and also don't change any cursor position etc.
  83. So its safe to go with unsynchronized way of read. -->
  84. <Match>
  85. <Class name="org.apache.hadoop.fs.azure.NativeAzureFileSystem$NativeAzureFsInputStream" />
  86. <Field name="in" />
  87. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  88. </Match>
  89. </FindBugsFilter>