1.0.22 - Fixing bug where nothing worked #20
Adding the /rippers/video subdirectory package caused the auto-class-finder to try to initialize a class that did not exist (dir name instead of class name).
This commit is contained in:
parent
09162522f0
commit
d5822b3700
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
||||
<groupId>com.rarchives.ripme</groupId>
|
||||
<artifactId>ripme</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0.21</version>
|
||||
<version>1.0.22</version>
|
||||
<name>ripme</name>
|
||||
<url>http://rip.rarchives.com</url>
|
||||
<properties>
|
||||
|
@ -19,7 +19,7 @@ import org.jsoup.nodes.Document;
|
||||
public class UpdateUtils {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(UpdateUtils.class);
|
||||
private static final String DEFAULT_VERSION = "1.0.21";
|
||||
private static final String DEFAULT_VERSION = "1.0.22";
|
||||
private static final String updateJsonURL = "http://rarchives.com/ripme.json";
|
||||
private static final String updateJarURL = "http://rarchives.com/ripme.jar";
|
||||
private static final String mainFileName = "ripme.jar";
|
||||
|
@ -199,23 +199,25 @@ public class Utils {
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Load from JAR
|
||||
try {
|
||||
logger.debug("fullPath = " + fullPath);
|
||||
String jarPath = fullPath
|
||||
.replaceFirst("[.]jar[!].*", ".jar")
|
||||
.replaceFirst("file:", "")
|
||||
.replaceAll("%20", " ");
|
||||
logger.debug("jarPath = " + jarPath);
|
||||
JarFile jarFile = new JarFile(jarPath);
|
||||
Enumeration<JarEntry> entries = jarFile.entries();
|
||||
while(entries.hasMoreElements()) {
|
||||
String entryName = entries.nextElement().getName();
|
||||
JarEntry nextElement = entries.nextElement();
|
||||
String entryName = nextElement.getName();
|
||||
if(entryName.startsWith(relPath)
|
||||
&& entryName.length() > (relPath.length() + "/".length())) {
|
||||
&& entryName.length() > (relPath.length() + "/".length())
|
||||
&& !nextElement.isDirectory()) {
|
||||
String className = entryName.replace('/', '.').replace('\\', '.').replace(".class", "");
|
||||
try {
|
||||
classes.add(Class.forName(className));
|
||||
} catch (ClassNotFoundException e) {
|
||||
logger.error("ClassNotFoundException loading " + className);
|
||||
throw new RuntimeException("ClassNotFoundException loading " + className);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user