@@ -0,0 +1,1974 @@
+package org.fedoraproject.javadeptools.impl;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0Aimport java.util.jar.JarEntry;%0Aimport java.util.jar.JarInputStream;%0A%0Aimport org.apache.commons.compress.archivers.ArchiveEntry;%0Aimport org.apache.commons.compress.archivers.ArchiveInputStream;%0Aimport org.fedoraproject.javadeptools.rpm.RpmArchiveInputStream;%0A%0Apublic class PackageProcessor %7B%0A    PersistentPackage processPackage(File rpm) %7B%0A        String name = rpm.getName().replaceFirst(%22%5C%5C.rpm$%22, %22%22)%0A                .replaceAll(%22-%5B%5E-%5D*-%5B%5E-%5D*$%22, %22%22);%0A        PersistentPackage pkg = new PersistentPackage(name);%0A        try (ArchiveInputStream is = new RpmArchiveInputStream(rpm.toPath())) %7B%0A            ArchiveEntry entry;%0A            while ((entry = is.getNextEntry()) != null) %7B%0A                if (!entry.isDirectory() && entry.getName().endsWith(%22.jar%22)) %7B%0A                    JarInputStream jarIs = new JarInputStream(is);%0A                    PersistentFileArtifact jar = processJar(jarIs, entry%0A                            .getName().replaceFirst(%22%5E%5C%5C./%22, %22%22));%0A                    pkg.addFileArtifact(jar);%0A                %7D%0A            %7D%0A        %7D catch (Exception e) %7B%0A            // TODO%0A        %7D%0A        return pkg;%0A    %7D%0A%0A    private PersistentFileArtifact processJar(JarInputStream is, String jarName)%0A            throws IOException %7B%0A        JarEntry entry;%0A        PersistentFileArtifact fileArtifact = new PersistentFileArtifact(%0A                jarName);%0A        while ((entry = is.getNextJarEntry()) != null) %7B%0A            if (!entry.isDirectory() && entry.getName().endsWith(%22.class%22)%0A                    && !entry.getName().contains(%22$%22)) %7B%0A                PersistentClassEntry classEntry = new PersistentClassEntry(%0A                        entry.getName().replaceFirst(%22%5C%5C.class$%22, %22%22)%0A                                .replaceAll(%22/%22, %22.%22));%0A                fileArtifact.addClass(classEntry);%0A            %7D%0A        %7D%0A        return fileArtifact;%0A    %7D%0A%7D

Move RPM processing to separate class