You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2021/05/23 13:48:43 UTC

[sling-org-apache-sling-feature-extension-apiregions] branch master updated: SLING-10414 : NPE in CheckDeprecatedApi.java

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

cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-extension-apiregions.git


The following commit(s) were added to refs/heads/master by this push:
     new f744d06  SLING-10414 : NPE in CheckDeprecatedApi.java
f744d06 is described below

commit f744d0624d0717d0e79516076ea9b95aa9da2012
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sun May 23 15:48:29 2021 +0200

    SLING-10414 : NPE in CheckDeprecatedApi.java
---
 .../sling/feature/extension/apiregions/analyser/CheckDeprecatedApi.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/feature/extension/apiregions/analyser/CheckDeprecatedApi.java b/src/main/java/org/apache/sling/feature/extension/apiregions/analyser/CheckDeprecatedApi.java
index 7bc35d2..83847a6 100644
--- a/src/main/java/org/apache/sling/feature/extension/apiregions/analyser/CheckDeprecatedApi.java
+++ b/src/main/java/org/apache/sling/feature/extension/apiregions/analyser/CheckDeprecatedApi.java
@@ -97,7 +97,7 @@ public class CheckDeprecatedApi implements AnalyserTask{
                     for(final ApiExport exp : exports) {
                         if ( pi.getName().equals(exp.getName()) ) {
                             String version = exp.getProperties().get(PROP_VERSION);
-                            if ( version == null || pi.getPackageVersionRange().includes(new Version(version)) ) {
+                            if ( version == null || pi.getPackageVersion() == null || pi.getPackageVersionRange().includes(new Version(version)) ) {
                                 imports = exp.getDeprecation().getPackageInfo().getMessage();
                                 break;
                             }