This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit af66407c authored by Michael Breu's avatar Michael Breu :speech_balloon:
Browse files

Fixing Sonar

parent 928cd7e1
Branches
2 merge requests!188Merging Peer Reviewing et. al to Master,!164211 peer reviewing functionality
......@@ -95,7 +95,7 @@ public class PluginManagementService {
.entrySet().iterator();
while (pluginIterator.hasNext()) {
final Entry<String, ConnectorConfigWrapper> nextEntry = pluginIterator.next();
if (nextEntry.getValue().getConfigURL().equals(registeredConnector)) {
if (nextEntry.getValue().getConfigURL().equals(registeredConnector.getUrl())) {
pluginIterator.remove();
break;
}
......
......@@ -64,6 +64,8 @@ public class UserWatchListService {
log.warn("Cannot find watchlist for : {} for exercise {}", watchlistId, description);
throw new IllegalAccessError("Cannot find watchlist");
}
if(!mustExist)
return null;
final boolean isAccessible = watchListO.get().getUserIdLogin().equals(currentPrincipal.get().getUsername());
if(!isAccessible) {
log.warn("watchlist {} does not belong to current user", watchListO.get().getName());
......
......@@ -9,7 +9,6 @@ import java.util.Optional;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.InputStreamResource;
import org.springframework.core.io.Resource;
import org.springframework.http.MediaType;
......@@ -176,7 +175,9 @@ public class SearchResource {
public void close() throws IOException {
super.close();
file.delete();
if(!file.delete()) {
log.info("Cannot delete {}", file.getAbsoluteFile());
}
}
}
......
<div style="margin: 10px">
<table>
<table><caption>file content</caption>
<tbody>
<tr><th>line number</th><th></th><th>code</th></tr>
<tr *ngFor="let line of lineByLine(); index as i">
<td class="right lines" *ngIf="language"> <pre><code class="line-number"><a (click)="url(i)"> {{lineNumber(i)}}</a></code></pre></td>
<td class="right" *ngIf="!language"> <pre><code class="line-number"></code></pre></td>
......
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