diff --git a/atomos/src/main/java/org/apache/felix/atomos/impl/base/AtomosBase.java b/atomos/src/main/java/org/apache/felix/atomos/impl/base/AtomosBase.java index 231786b..b19b8fd 100644 --- a/atomos/src/main/java/org/apache/felix/atomos/impl/base/AtomosBase.java +++ b/atomos/src/main/java/org/apache/felix/atomos/impl/base/AtomosBase.java @@ -1663,9 +1663,8 @@ void addPackages(Bundle b) try { content.getEntries().forEach((s) -> { - if (s.length() > 1 && s.endsWith("/") && s.indexOf('-') < 0) - { - String pkg = s.substring(0, s.length() - 1).replace('/', '.'); + if (s.endsWith(".class")) { + String pkg = s.substring(0, s.lastIndexOf('/')).replace('/', '.'); packageToAtomosContent.put(pkg, (AtomosContentIndexed) atomosContent); }