Project

General

Profile

« Previous | Next » 

Revision 9385

Added by Jing Tao about 9 years ago

Fixed a bug in the condition check for the archive field in the updateSystemMetadata method.

View differences:

src/edu/ucsb/nceas/metacat/dataone/D1NodeService.java
1811 1811
              } catch (NotFound e) {
1812 1812
                  throw new InvalidRequest("4869", "Can't find the pid "+pid.getValue()+" for archive.");
1813 1813
              }
1814
          } else if((currentSysmeta.getArchived() != null && currentSysmeta.getArchived() == true) && (sysmeta.getArchived() == null || sysmeta.getArchived() == false)) {
1815
              throw new InvalidRequest("4869", "The pid "+pid.getValue()+" has been archived and it can't be set archive false again.");
1816 1814
          } else {
1817 1815
              logMetacat.debug("D1Node.update - this is to archive a MN object "+pid.getValue());
1818 1816
              try {
......
1821 1819
                  throw new InvalidRequest("4869", "Can't find the pid "+pid.getValue()+" for archive.");
1822 1820
              }
1823 1821
          }
1822
      
1823
      } else if((currentSysmeta.getArchived() != null && currentSysmeta.getArchived() == true) && (sysmeta.getArchived() == null || sysmeta.getArchived() == false)) {
1824
          throw new InvalidRequest("4869", "The pid "+pid.getValue()+" has been archived and it can't be set archive false again.");
1824 1825
      } else {
1825 1826
          logMetacat.debug("D1Node.update - regularly update the system metadata of the pid "+pid.getValue());
1826 1827
          updateSystemMetadataWithoutLock(sysmeta, needUpdateModificationDate);

Also available in: Unified diff