Commit 73f33f8b authored by Florian Hölzl's avatar Florian Hölzl
Browse files

bugfix

refs 727
parent b5ec195b
......@@ -33,7 +33,7 @@ import org.fortiss.af3.project.AF3ProjectActivator;
* @author becker
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: D1480D3F366C8193AA33113D1C1564CD
* @ConQAT.Rating GREEN Hash: FF5B0A69B0BD64339D9243A13D9D79D8
*/
public class FileUtils {
......@@ -48,20 +48,18 @@ public class FileUtils {
try {
URL url = new URL(uri.toString());
InputStream inputStream = url.openConnection().getInputStream();
BufferedReader in = new BufferedReader(new InputStreamReader(
inputStream));
BufferedReader in = new BufferedReader(new InputStreamReader(inputStream));
StringBuffer buffer = new StringBuffer();
String line = in.readLine();
while (line != null) {
buffer.append(line);
while(line != null) {
buffer.append(line).append('\n');
line = in.readLine();
}
return buffer.toString();
} catch (Exception e) {
error(AF3ProjectActivator.getDefault(),
"Error during loading file: " + uri + ", e=" + e.toString(),
e);
} catch(Exception e) {
error(AF3ProjectActivator.getDefault(), "Error during loading file: " + uri + ", e=" +
e.toString(), e);
}
return "";
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment