Skip to content

Commit 5f4a1bb

Browse files
geetikabatrarawagner
authored andcommitted
Fixing license file issue
1 parent c0bef4f commit 5f4a1bb

1 file changed

Lines changed: 3 additions & 14 deletions

File tree

plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/RecommenderAPIProvider.java

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import org.apache.http.util.EntityUtils;
3434
import org.eclipse.core.resources.IFile;
3535
import org.eclipse.core.runtime.CoreException;
36+
import org.eclipse.core.runtime.IPath;
3637
import org.json.JSONException;
3738
import org.json.JSONObject;
3839

@@ -90,21 +91,9 @@ public String requestAnalyses(Map<String, String> files, Set<IFile> license) thr
9091
fileObject.getKey());
9192
}
9293
if(!license.isEmpty()) {
93-
File temp = license.iterator().next().getFullPath().toFile();
94-
BufferedReader br;
95-
try {
96-
br = new BufferedReader(new FileReader(temp));
97-
String line = null;
98-
while ((line = br.readLine()) != null) {
99-
System.out.println(line);
100-
}
101-
} catch (IOException e) {
102-
// TODO Auto-generated catch block
103-
e.printStackTrace();
104-
}
105-
94+
IPath licenseFile = license.iterator().next().getLocation();
10695

107-
FileBody licenseBody = new FileBody(temp);
96+
FileBody licenseBody = new FileBody(new File(licenseFile.toString()));
10897
builder.addPart("license[]", licenseBody);
10998
}
11099
HttpEntity multipart = builder.build();

0 commit comments

Comments
 (0)