GH Hosted: correct aws s3 commands. Green e429 build

This commit is contained in:
aboyko
2023-07-14 12:18:29 -04:00
parent 06915a1c4d
commit 445efec2f0
5 changed files with 52 additions and 12 deletions

View File

@@ -21,9 +21,11 @@
*******************************************************************************/
package org.springframework.ide.eclipse.boot.wizard.starters.eclipse;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
@@ -466,7 +468,29 @@ public class ResourceCompareInput extends CompareEditorInput {
}
byte[] initialContent() throws CoreException {
return Utilities.readBytes(createStream());
InputStream in = createStream();
ByteArrayOutputStream bos= new ByteArrayOutputStream();
try {
while (true) {
int c= in.read();
if (c == -1)
break;
bos.write(c);
}
} catch (IOException ex) {
return null;
} finally {
Utilities.close(in);
try {
bos.close();
} catch (IOException x) {
// silently ignored
}
}
return bos.toByteArray();
}
@Override