You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2018/08/14 11:32:26 UTC

[cxf] branch 3.2.x-fixes updated (4bddab1 -> 0cb9f41)

This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a change to branch 3.2.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git.


    from 4bddab1  Adding WS-Security test using JaxWsServerFactoryBean.
     new 320222a  UI not resolved correctly if version not specificed
     new bd0cb45  NPE when annotations bundle found but not active
     new cf92181  Update OsgiSwaggerUiResolver.java
     new 0cb9f41  ProviderFactory.createProviderFromConstructor should include exception cause

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java | 2 +-
 .../java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java     | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)


[cxf] 03/04: Update OsgiSwaggerUiResolver.java

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 3.2.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit cf9218153331c53c22b39d1749a93c475925746a
Author: Rabea Gransberger <rg...@users.noreply.github.com>
AuthorDate: Fri Aug 10 09:35:31 2018 +0200

    Update OsgiSwaggerUiResolver.java
    
    Fixed indent
    
    (cherry picked from commit 1a8fb5902ea2c8421494a809b551e1f4f4f2b66b)
---
 .../main/java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rt/rs/description-swagger-ui/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java b/rt/rs/description-swagger-ui/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java
index 0b94ad3..f3f53d0 100644
--- a/rt/rs/description-swagger-ui/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java
+++ b/rt/rs/description-swagger-ui/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java
@@ -48,8 +48,8 @@ public class OsgiSwaggerUiResolver extends SwaggerUiResolver {
                 return null;
             }
             if (bundle.getState() != Bundle.ACTIVE) {
-				bundle.start();
-			}
+                bundle.start();
+            }
             String[] locations = swaggerUiMavenGroupAndArtifact == null ? DEFAULT_LOCATIONS
                 : new String[]{"mvn:" + swaggerUiMavenGroupAndArtifact + "/",
                                "wrap:mvn:" + swaggerUiMavenGroupAndArtifact + "/"};


[cxf] 02/04: NPE when annotations bundle found but not active

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 3.2.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit bd0cb45b4a40bbcc9b66c43411ad5d5cadccf16c
Author: Rabea Gransberger <rg...@users.noreply.github.com>
AuthorDate: Thu Aug 9 16:25:56 2018 +0200

    NPE when annotations bundle found but not active
    
    bundle.getBundleContext() will give an NPE (in Equinox) if the bundle can be found but is not active.
    Would also be good to at least log the exception in debug mode to point to a possible problem.
    
    (cherry picked from commit 5ae9b0a5b928b49fc2a4b3fb8dd9b68dca640eb7)
---
 .../main/java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java  | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/rt/rs/description-swagger-ui/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java b/rt/rs/description-swagger-ui/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java
index 8374f8c..0b94ad3 100644
--- a/rt/rs/description-swagger-ui/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java
+++ b/rt/rs/description-swagger-ui/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java
@@ -47,6 +47,9 @@ public class OsgiSwaggerUiResolver extends SwaggerUiResolver {
             if (bundle == null) {
                 return null;
             }
+            if (bundle.getState() != Bundle.ACTIVE) {
+				bundle.start();
+			}
             String[] locations = swaggerUiMavenGroupAndArtifact == null ? DEFAULT_LOCATIONS
                 : new String[]{"mvn:" + swaggerUiMavenGroupAndArtifact + "/",
                                "wrap:mvn:" + swaggerUiMavenGroupAndArtifact + "/"};


[cxf] 04/04: ProviderFactory.createProviderFromConstructor should include exception cause

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 3.2.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 0cb9f4189d87b3afc3643612d7480ef5d1dbff74
Author: Rabea Gransberger <rg...@users.noreply.github.com>
AuthorDate: Fri Aug 10 12:13:43 2018 +0200

    ProviderFactory.createProviderFromConstructor should include exception cause
    
    If newInstance fails because the called constructor of a custom Application implementation throws an exception, the root cause is not included which would reduce the search time for the actual cause.
    
    (cherry picked from commit ab452c0eee1fd560bdc91324c4dfe838f1088877)
---
 .../src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
index 03b6a5e..1455d78 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
@@ -1183,7 +1183,7 @@ public abstract class ProviderFactory {
             instance = c.newInstance(cArgs);
         } catch (Throwable ex) {
             throw new RuntimeException("Resource or provider class " + c.getDeclaringClass().getName()
-                                       + " can not be instantiated");
+                                       + " can not be instantiated", ex);
         }
         Map<Class<?>, ThreadLocalProxy<?>> proxies =
             new LinkedHashMap<Class<?>, ThreadLocalProxy<?>>();


[cxf] 01/04: UI not resolved correctly if version not specificed

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 3.2.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 320222abf0ce53216e126fcb396e94ff388e962a
Author: Rabea Gransberger <rg...@users.noreply.github.com>
AuthorDate: Thu Aug 9 16:17:18 2018 +0200

    UI not resolved correctly if version not specificed
    
    When findSwaggerUiRootInternal(null, null) is called, the root is returned without the version number which is needed to locate the index.html and other resources within the bundle.
    /META-INF/resources/webjars/swagger-ui//index.html
    instead of
    /META-INF/resources/webjars/swagger-ui/3.17.6/index.html
    
    (cherry picked from commit e1a8df8e095b7c6c1c2a237b2f8469ef522fd22e)
---
 .../main/java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rt/rs/description-swagger-ui/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java b/rt/rs/description-swagger-ui/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java
index 7d71634..8374f8c 100644
--- a/rt/rs/description-swagger-ui/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java
+++ b/rt/rs/description-swagger-ui/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java
@@ -81,7 +81,7 @@ public class OsgiSwaggerUiResolver extends SwaggerUiResolver {
 
     private String getSwaggerUiRoot(Bundle b, String swaggerUiVersion) {
         if (swaggerUiVersion == null) { 
-            swaggerUiVersion = "";
+            swaggerUiVersion = b.getVersion().toString();
         }
         URL entry = b.getEntry(SwaggerUiResolver.UI_RESOURCES_ROOT_START + swaggerUiVersion);
         if (entry != null) {