Die Migration der Bereiche "Docker Registry" und "Artifiacts" ist fast abgeschlossen. Die letzten Daten werden im Laufe des heutigen Abend (05.08.2021) noch vollständig hochgeladen. Das Anlegen neuer Images und Artifacts funktioniert bereits wieder.

Commit d0fe7aa4 authored by Jean-Marc Ronck's avatar Jean-Marc Ronck
Browse files

Fixes new routine for Linux (3).

parent bce96f1e
Pipeline #73324 failed with stage
in 29 seconds
package de.monticore.lang.monticar.visualization.emam.resources;
import java.io.IOException;
import java.io.InputStream;
public interface ResourcesService {
void addResource(String id, String resource);
String getResource(String id);
InputStream getResourceAsStream(String id);
InputStream getResourceAsStream(String id) throws IOException;
......@@ -5,7 +5,9 @@ import de.monticore.lang.monticar.visualization.emam.application.ApplicationCont
import javax.inject.Inject;
import javax.inject.Singleton;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
......@@ -45,9 +47,10 @@ public class ResourcesServiceImpl implements ResourcesService, ApplicationContri
public InputStream getResourceAsStream(String id) {
public InputStream getResourceAsStream(String id) throws IOException {
String resource = this.resources.get(id);
URL url = ClassLoader.getSystemResource(resource);
return ClassLoader.getSystemResourceAsStream(resource);
return url.openStream();
Markdown is supported
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