diff options
| author | Vikas Chandra | 2019-03-27 05:46:52 +0000 |
|---|---|---|
| committer | Vikas Chandra | 2019-03-27 05:47:40 +0000 |
| commit | 16c2cb9aaa718e0d66aa427ca0908a0d5f895f7e (patch) | |
| tree | 7bc792d15eb2f541e4a16798e76ad5124df15923 | |
| parent | 5d8de12c6bcecaa8d052491917d2c65b788b84b4 (diff) | |
| download | eclipse.pde.ui-16c2cb9aaa718e0d66aa427ca0908a0d5f895f7e.tar.gz eclipse.pde.ui-16c2cb9aaa718e0d66aa427ca0908a0d5f895f7e.tar.xz eclipse.pde.ui-16c2cb9aaa718e0d66aa427ca0908a0d5f895f7e.zip | |
Bug 545776 - Export all packages quick fix can corrupt MANIFEST.MF I20190329-0120I20190328-1800I20190327-1800
Change-Id: I14c11fbe420a9edff89e40f4c6b37fbaf58726e5
Signed-off-by: Vikas Chandra <Vikas.Chandra@in.ibm.com>
| -rw-r--r-- | ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BundleErrorReporter.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BundleErrorReporter.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BundleErrorReporter.java index 2ea3cd2ebb..c08a79251d 100644 --- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BundleErrorReporter.java +++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BundleErrorReporter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2017 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -239,11 +239,7 @@ public class BundleErrorReporter extends JarManifestErrorReporter { if (fragment.containsJavaResources() || fragment.getNonJavaResources().length > 0) { if (!containsPackage(header, name)) { packages.append(name); - if (j < javaElements.length - 1) - { - packages.append(","); //$NON-NLS-1$ - } - + packages.append(","); //$NON-NLS-1$ } } } @@ -252,6 +248,11 @@ public class BundleErrorReporter extends JarManifestErrorReporter { } catch (JavaModelException e) { } } + if (packages.toString().length() > 0) { + if (packages.substring(packages.length() - 1).equals(",")) { //$NON-NLS-1$ + packages.setLength(packages.length() - 1); + } + } // if we actually have packages to add if (packages.toString().length() > 0) { |
