diff options
Diffstat (limited to 'core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/parser/ElfBinaryObject.java')
-rw-r--r-- | core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/parser/ElfBinaryObject.java | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/parser/ElfBinaryObject.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/parser/ElfBinaryObject.java index 9f180c39e58..1edf66298ce 100644 --- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/parser/ElfBinaryObject.java +++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/parser/ElfBinaryObject.java @@ -61,9 +61,6 @@ public class ElfBinaryObject extends BinaryObjectAdapter { fElfAttributes = elfAttributes; } - /* (non-Javadoc) - * @see org.eclipse.cdt.utils.BinaryObjectAdapter#getName() - */ @Override public String getName() { if (header != null) { @@ -72,9 +69,6 @@ public class ElfBinaryObject extends BinaryObjectAdapter { return super.getName(); } - /* (non-Javadoc) - * @see org.eclipse.cdt.core.IBinaryParser.IBinaryFile#getContents() - */ @Override public InputStream getContents() throws IOException { if (getPath() != null && header != null) { @@ -83,9 +77,6 @@ public class ElfBinaryObject extends BinaryObjectAdapter { return super.getContents(); } - /* (non-Javadoc) - * @see org.eclipse.cdt.core.IBinaryParser.IBinaryObject#getSymbols() - */ @Override public ISymbol[] getSymbols() { // Call the hasChanged first, to initialize the timestamp @@ -99,9 +90,6 @@ public class ElfBinaryObject extends BinaryObjectAdapter { return symbols; } - /* (non-Javadoc) - * @see org.eclipse.cdt.utils.BinaryObjectAdapter#getBinaryObjectInfo() - */ @Override protected BinaryObjectInfo getBinaryObjectInfo() { // Call the hasChanged first, to initialize the timestamp @@ -123,27 +111,15 @@ public class ElfBinaryObject extends BinaryObjectAdapter { } protected void loadAll() throws IOException { - ElfHelper helper = null; - try { - helper = getElfHelper(); + try (ElfHelper helper = getElfHelper()) { loadInfo(helper); loadSymbols(helper); - } finally { - if (helper != null) { - helper.dispose(); - } } } protected void loadInfo() throws IOException { - ElfHelper helper = null; - try { - helper = getElfHelper(); + try (ElfHelper helper = getElfHelper()) { loadInfo(helper); - } finally { - if (helper != null) { - helper.dispose(); - } } } @@ -219,9 +195,6 @@ public class ElfBinaryObject extends BinaryObjectAdapter { return super.getAdapter(adapter); } - /* (non-Javadoc) - * @see org.eclipse.cdt.utils.BinaryObjectAdapter#getAddressFactory() - */ @Override public IAddressFactory getAddressFactory() { if (addressFactory == null) { @@ -239,9 +212,6 @@ public class ElfBinaryObject extends BinaryObjectAdapter { return addressFactory; } - /* - * @see org.eclipse.cdt.utils.BinaryObjectAdapter#isLittleEndian() - */ @Override public boolean isLittleEndian() { if (fElfAttributes != null) { @@ -250,9 +220,6 @@ public class ElfBinaryObject extends BinaryObjectAdapter { return super.isLittleEndian(); } - /* - * @see org.eclipse.cdt.utils.BinaryObjectAdapter#getCPU() - */ @Override public String getCPU() { if (fElfAttributes != null) { |