kinow commented on code in PR #2298:
URL: https://github.com/apache/jena/pull/2298#discussion_r1506250456
##########
jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/main/FusekiServer.java:
##########
@@ -1699,19 +1765,38 @@ private Server jettyServer(ServletContextHandler
handler, String jettyServerConf
return server;
}
- /** Jetty server with https */
- private static Server jettyServerHttps(ServletContextHandler handler,
int httpPort, int httpsPort, int minThreads, int maxThreads, String keystore,
String certPassword) {
- return JettyHttps.jettyServerHttps(handler, keystore,
certPassword, httpPort, httpsPort, minThreads, maxThreads);
+ /**
+ * Jetty server with https
+ */
+ private static Server jettyServerHttps(ServletContextHandler handler,
int httpPort, int httpsPort,
+ int minThreads, int maxThreads,
String keystore, String certPassword) {
+ return JettyHttps.jettyServerHttps(handler, keystore,
certPassword, httpPort, httpsPort, minThreads,
+ maxThreads);
}
- /** Restrict connectors to localhost */
+ /**
+ * Restrict connectors to localhost
+ */
private static void applyLocalhost(Server server) {
Connector[] connectors = server.getConnectors();
- for ( int i = 0; i < connectors.length; i++ ) {
- if ( connectors[i] instanceof ServerConnector serverConnector)
{
+ for (int i = 0; i < connectors.length; i++) {
+ if (connectors[i] instanceof ServerConnector serverConnector) {
serverConnector.setHost("localhost");
}
}
}
+
+ private static Map<String, String> parseCORSConfigFile(String
filename) {
+ try {
+ Properties properties = loadFromFile(filename);
+ Map<String, String> map = new HashMap<>(properties.size());
+ for (Map.Entry<Object, Object> entry : properties.entrySet()) {
+ map.put((String) entry.getKey(), (String)
entry.getValue());
+ }
+ return map;
+ } catch (Exception ex) {
+ throw new FusekiConfigException("Failed to read the CORS
config file: "+ex.getMessage());
Review Comment:
Maybe include the original exception in the stack trace?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]