Closed Elitward closed 10 years ago
Metadata needs to have a comparable interface defined, otherwise we use the Object's comparable method.
Since Metadata does not have Comparable defined, LocalMetadata.contains(aMetadata) always returns false (since it is comparing two essentially different objects, even if the content is the same)
MetadataManager.java: public boolean updateLocalMetadata(Metadata aMetadata){ if (LocalMetadata.contains(aMetadata)) { <----- THIS MAY BE A PROBLEM LocalMetadata.remove(aMetadata); //remove the old version } LocalMetadata.add(aMetadata); // add the new version return saveLocalMetadata(); //maybe save at once }
new metadata could only share the same file name with the old one to over write with.