JaroslavTulach commented on a change in pull request #2317:
URL: https://github.com/apache/netbeans/pull/2317#discussion_r481646072



##########
File path: 
platform/autoupdate.services/src/org/netbeans/modules/autoupdate/services/InstallSupportImpl.java
##########
@@ -1121,7 +1121,22 @@ private int verifyNbm (UpdateElement el, File nbmFile, 
ProgressHandle progress,
 
             if(res == null) {
                 try {
-                    Collection<CodeSigner> nbmCerts = 
Utilities.getNbmCertificates(nbmFile);
+                    List<String> pack200Entries = new ArrayList<>();
+                    Collection<CodeSigner> nbmCerts = 
Utilities.getNbmCertificates(nbmFile, pack200Entries);
+                    if (!pack200Entries.isEmpty()) {
+                        OperationContainer<InstallSupport> operationContainer 
= support.getContainer();
+                        OperationContainerImpl ocImpl = 
Trampoline.API.impl(operationContainer);
+                        File unpack200 = ocImpl.getUnpack200();
+                        if (unpack200 == null || !unpack200.canExecute()) {
+                            StringBuilder sb = new StringBuilder();
+                            for (String entry : pack200Entries) {
+                                sb.append("\n").append(entry);
+                            }
+                            throw new 
OperationException(OperationException.ERROR_TYPE.MISSING_UNPACK200,
+                                NbBundle.getMessage(InstallSupportImpl.class, 
"InstallSupportImpl_Validate_MissingUnpack200", nbmFile, sb.toString()) // 
NOI18N
+                            );
+                        }
+                    }

Review comment:
       OK, I investigate further and see what can I do improve this.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to