Merge remote-tracking branch 'origin/patch'

This commit is contained in:
ghidra1 2019-11-26 12:37:20 -05:00
commit ee25a7d0cc
34 changed files with 396 additions and 422 deletions

View file

@ -61,8 +61,8 @@ public interface ContentHandler extends ExtensionPoint {
* @throws CancelledException if the user cancels
*/
long createFile(FileSystem fs, FileSystem userfs, String path, String name,
DomainObject domainObject, TaskMonitor monitor) throws IOException,
InvalidNameException, CancelledException;
DomainObject domainObject, TaskMonitor monitor)
throws IOException, InvalidNameException, CancelledException;
/**
* Open a folder item for immutable use. If any changes are attempted on the
@ -83,8 +83,8 @@ public interface ContentHandler extends ExtensionPoint {
* difference which could not be handled.
*/
DomainObjectAdapter getImmutableObject(FolderItem item, Object consumer, int version,
int minChangeVersion, TaskMonitor monitor) throws IOException, CancelledException,
VersionException;
int minChangeVersion, TaskMonitor monitor)
throws IOException, CancelledException, VersionException;
/**
* Open a folder item for read-only use. While changes are permitted on the
@ -104,8 +104,8 @@ public interface ContentHandler extends ExtensionPoint {
* difference which could not be handled.
*/
DomainObjectAdapter getReadOnlyObject(FolderItem item, int version, boolean okToUpgrade,
Object consumer, TaskMonitor monitor) throws IOException, VersionException,
CancelledException;
Object consumer, TaskMonitor monitor)
throws IOException, VersionException, CancelledException;
/**
* Open a folder item for update. Changes made to the returned object may be
@ -138,7 +138,8 @@ public interface ContentHandler extends ExtensionPoint {
* @param newerVersion the newer version number
* @return the set of changes that were made
* @throws VersionException if a database version change prevents reading of data.
* @throws IOException if a folder item access error occurs
* @throws IOException if a folder item access error occurs or change set was
* produced by newer version of software and can not be read
*/
ChangeSet getChangeSet(FolderItem versionedFolderItem, int olderVersion, int newerVersion)
throws VersionException, IOException;

View file

@ -23,6 +23,7 @@ import java.util.Map;
import javax.swing.Icon;
import db.DBHandle;
import db.Field;
import db.buffers.*;
import ghidra.framework.client.ClientUtil;
import ghidra.framework.client.NotConnectedException;
@ -1748,6 +1749,9 @@ public class GhidraFileData {
catch (FileNotFoundException e) {
// file has been deleted, just return an empty map.
}
catch (Field.UnsupportedFieldException e) {
// file created with newer version of Ghidra
}
catch (IOException e) {
Msg.error(this, "Read meta-data error", e);
}

View file

@ -107,7 +107,8 @@ public interface DomainFile extends Comparable<DomainFile> {
* Returns changes made to versioned file by others since checkout was performed.
* @return change set or null
* @throws VersionException latest version was created with a newer version of software
* @throws IOException
* @throws IOException if a folder item access error occurs or change set was
* produced by newer version of software and can not be read
*/
public ChangeSet getChangesByOthersSinceCheckout() throws VersionException, IOException;
@ -352,8 +353,8 @@ public interface DomainFile extends Comparable<DomainFile> {
* @throws IOException thrown if an IO or access error occurs.
* @throws CancelledException if task monitor cancelled operation.
*/
public boolean checkout(boolean exclusive, TaskMonitor monitor) throws IOException,
CancelledException;
public boolean checkout(boolean exclusive, TaskMonitor monitor)
throws IOException, CancelledException;
/**
* Performs check in to associated repository. File must be checked-out
@ -379,8 +380,8 @@ public interface DomainFile extends Comparable<DomainFile> {
* If okToUpgrade was false, check exception to see if it can be upgraded
* @throws CancelledException if task monitor cancelled operation
*/
public void merge(boolean okToUpgrade, TaskMonitor monitor) throws IOException,
VersionException, CancelledException;
public void merge(boolean okToUpgrade, TaskMonitor monitor)
throws IOException, VersionException, CancelledException;
/**
* Undo "checked-out" file. The original repository file is restored.
@ -456,8 +457,8 @@ public interface DomainFile extends Comparable<DomainFile> {
* @throws IOException thrown if an IO or access error occurs.
* @throws CancelledException if task monitor cancelled operation.
*/
DomainFile copyTo(DomainFolder newParent, TaskMonitor monitor) throws IOException,
CancelledException;
DomainFile copyTo(DomainFolder newParent, TaskMonitor monitor)
throws IOException, CancelledException;
/**
* Copy a specific version of this file to the specified destFolder.