reta commented on a change in pull request #315: [CXF-7512] Support searching
swaggerUi by name and version in all bun…
URL: https://github.com/apache/cxf/pull/315#discussion_r191723521
##########
File path:
rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerUiResolver.java
##########
@@ -87,12 +74,22 @@ protected static String checkUiRoot(String urlStr, String
swaggerUiVersion) {
}
public static String findSwaggerUiRoot(String
swaggerUiMavenGroupAndArtifact,
- String swaggerUiVersion) {
- String root =
HELPER.findSwaggerUiRootInternal(swaggerUiMavenGroupAndArtifact,
- swaggerUiVersion);
- if (root == null && HELPER.getClass() != SwaggerUiResolver.class) {
- root = new
SwaggerUiResolver().findSwaggerUiRootInternal(swaggerUiMavenGroupAndArtifact,
-
swaggerUiVersion);
+ String swaggerUiName, String
swaggerUiVersion) {
+ String root = null;
+ try {
+ root = new OsgiSwaggerUiResolver()
+ .findSwaggerUiRoot(swaggerUiMavenGroupAndArtifact,
swaggerUiVersion);
+ } catch (Throwable e) {
+ // Ignore
+ }
+ try {
Review comment:
Should it be wrapped into `if (root == null) { ... }` block (if previous
lookup succeeded)?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services