File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
extensions/devui/runtime/src/main/java/io/quarkus/devui/runtime/mcp Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change 1414import jakarta .enterprise .context .ApplicationScoped ;
1515import jakarta .enterprise .inject .Produces ;
1616
17+ import org .jboss .logging .Logger ;
18+
1719import io .quarkus .devui .runtime .spi .McpEvent ;
1820import io .quarkus .devui .runtime .spi .McpServerConfiguration ;
1921import io .smallrye .mutiny .Multi ;
2426 */
2527@ ApplicationScoped
2628public class McpDevUIJsonRpcService {
29+ private static final Logger LOG = Logger .getLogger (McpDevUIJsonRpcService .class .getName ());
30+
2731 private final BroadcastProcessor <McpClientInfo > connectedClientStream = BroadcastProcessor .create ();
2832 private final BroadcastProcessor <McpEvent > mcpEventStream = BroadcastProcessor .create ();
2933
@@ -112,11 +116,17 @@ private Properties loadConfiguration() {
112116 }
113117
114118 private boolean storeConfiguration (Properties p ) {
115- try (OutputStream out = Files .newOutputStream (configFile )) {
116- p .store (out , "Dev MCP Configuration" );
117- return true ;
119+ try {
120+ Files .createDirectories (configDir );
121+ try (OutputStream out = Files .newOutputStream (configFile )) {
122+ p .store (out , "Dev MCP Configuration" );
123+ return true ;
124+ } catch (IOException ex ) {
125+ LOG .error ("Could not create config file for Dev MCP [" + configFile + "]" , ex );
126+ return false ;
127+ }
118128 } catch (IOException ex ) {
119- ex . printStackTrace ( );
129+ LOG . error ( "Could not create config directory for Dev MCP [" + configDir + "]" , ex );
120130 return false ;
121131 }
122132 }
You can’t perform that action at this time.
0 commit comments