3333/** 
3434 * Responsible for verifying if a bag is valid, complete 
3535 */ 
36- public  final   class  BagVerifier  implements  AutoCloseable {
36+ public  class  BagVerifier  implements  AutoCloseable {
3737  private  static  final  Logger  logger  = LoggerFactory .getLogger (BagVerifier .class );
3838  private  static  final  ResourceBundle  messages  = ResourceBundle .getBundle ("MessageBundle" );
3939
@@ -130,7 +130,7 @@ public static void quicklyVerify(final Bag bag) throws IOException, InvalidPaylo
130130   * @throws UnsupportedAlgorithmException if the manifest uses a algorithm that isn't supported 
131131   * @throws InvalidBagitFileFormatException if the manifest is not formatted properly 
132132   */ 
133-   public  void  isValid (final  Bag  bag , final  boolean  ignoreHiddenFiles ) throws  IOException , MissingPayloadManifestException , MissingBagitFileException , MissingPayloadDirectoryException , FileNotInPayloadDirectoryException , InterruptedException , MaliciousPathException , CorruptChecksumException , VerificationException , UnsupportedAlgorithmException , InvalidBagitFileFormatException {
133+   public  final   void  isValid (final  Bag  bag , final  boolean  ignoreHiddenFiles ) throws  IOException , MissingPayloadManifestException , MissingBagitFileException , MissingPayloadDirectoryException , FileNotInPayloadDirectoryException , InterruptedException , MaliciousPathException , CorruptChecksumException , VerificationException , UnsupportedAlgorithmException , InvalidBagitFileFormatException {
134134    logger .info (messages .getString ("checking_bag_is_valid" ), bag .getRootDir ());
135135    isComplete (bag , ignoreHiddenFiles );
136136
@@ -149,7 +149,7 @@ public void isValid(final Bag bag, final boolean ignoreHiddenFiles) throws IOExc
149149   * Check the supplied checksum hashes against the generated checksum hashes 
150150   */ 
151151  @ SuppressWarnings ("PMD.AvoidInstantiatingObjectsInLoops" )
152-   void  checkHashes (final  Manifest  manifest ) throws  CorruptChecksumException , InterruptedException , VerificationException {
152+   protected   void  checkHashes (final  Manifest  manifest ) throws  CorruptChecksumException , InterruptedException , VerificationException {
153153    final  CountDownLatch  latch  = new  CountDownLatch ( manifest .getFileToChecksumMap ().size ());
154154
155155    //TODO maybe return all of these at some point... 
@@ -196,7 +196,7 @@ void checkHashes(final Manifest manifest) throws CorruptChecksumException, Inter
196196   * @throws UnsupportedAlgorithmException if the manifest uses a algorithm that isn't supported 
197197   * @throws InvalidBagitFileFormatException if the manifest is not formatted properly  
198198   */ 
199-   public  void  isComplete (final  Bag  bag , final  boolean  ignoreHiddenFiles ) throws  
199+   public  final   void  isComplete (final  Bag  bag , final  boolean  ignoreHiddenFiles ) throws  
200200    IOException , MissingPayloadManifestException , MissingBagitFileException , MissingPayloadDirectoryException , 
201201    FileNotInPayloadDirectoryException , InterruptedException , MaliciousPathException , UnsupportedAlgorithmException , InvalidBagitFileFormatException {
202202    logger .info (messages .getString ("checking_bag_is_complete" ), bag .getRootDir ());
@@ -212,11 +212,11 @@ public void isComplete(final Bag bag, final boolean ignoreHiddenFiles) throws
212212    manifestVerifier .verifyPayload (bag , ignoreHiddenFiles );
213213  }
214214
215-   public  ExecutorService  getExecutor () {
215+   public  final   ExecutorService  getExecutor () {
216216    return  executor ;
217217  }
218218
219-   public  PayloadVerifier  getManifestVerifier () {
219+   public  final   PayloadVerifier  getManifestVerifier () {
220220    return  manifestVerifier ;
221221  }
222222}
0 commit comments