Skip to content

Commit

Permalink
ResourceApiTypeRoot: use IFile.readAllBytes()
Browse files Browse the repository at this point in the history
  • Loading branch information
EcljpseB0T authored and fedejeanne committed Jul 31, 2024
1 parent 7de5db9 commit acd4399
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion apitools/org.eclipse.pde.api.tools/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
org.eclipse.pde.core;bundle-version="[3.17.200,4.0.0)",
org.eclipse.jdt.core;bundle-version="[3.36.0,4.0.0)",
org.eclipse.jdt.launching;bundle-version="[3.21.0,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.20.0,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.21.0,4.0.0)",
org.eclipse.text;bundle-version="[3.13.100,4.0.0)",
org.eclipse.core.filebuffers;bundle-version="[3.8.200,4.0.0)",
org.eclipse.equinox.frameworkadmin;bundle-version="[2.3.0,3.0.0)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
*******************************************************************************/
package org.eclipse.pde.api.tools.internal.model;

import java.io.IOException;
import java.io.InputStream;

import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
Expand Down Expand Up @@ -57,13 +54,7 @@ public byte[] getContents() throws CoreException {
return fContents;
}
modifiedTimeStamp = fFile.getModificationStamp();
try (InputStream stream = fFile.getContents(true)) {
fContents = stream.readAllBytes();
return fContents;
} catch (IOException ioe) {
abort("Unable to read class file: " + getTypeName(), ioe); //$NON-NLS-1$
return null;
}
return fFile.readAllBytes();
}

@Override
Expand Down

0 comments on commit acd4399

Please sign in to comment.