From fb8d9850ea1df1268ede1444eddffcd2427479b4 Mon Sep 17 00:00:00 2001 From: lotus Date: Sun, 5 Oct 2008 10:03:02 +0000 Subject: [PATCH] fix for http://forum.yacy-websuche.de/viewtopic.php?f=5&t=1462 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5248 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaParser.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/de/anomic/plasma/plasmaParser.java b/source/de/anomic/plasma/plasmaParser.java index 93feb65de..101aa1267 100644 --- a/source/de/anomic/plasma/plasmaParser.java +++ b/source/de/anomic/plasma/plasmaParser.java @@ -452,11 +452,11 @@ public final class plasmaParser { * find an additional parser class */ final ListDirs parserDir = new ListDirs(packageURI); - final ArrayList parserClasses = parserDir.listFiles(".*/parser/[^/]+/[^/]+Parser\\.class"); + final ArrayList parserClasses = parserDir.listFiles(".*\\"+ File.separator +"parser\\"+ File.separator +"[^\\"+ File.separator +"]+\\"+ File.separator +"[^\\"+ File.separator +"]+Parser\\.class"); if (parserClasses == null) return; - final Pattern patternGetClassName = Pattern.compile(".*/([^/]+)\\.class"); - final Pattern patternGetFullClassName = Pattern.compile(".*(/[^/]+/[^/]+)\\.class"); + final Pattern patternGetClassName = Pattern.compile(".*\\"+ File.separator +"([^\\"+ File.separator +"]+)\\.class"); + final Pattern patternGetFullClassName = Pattern.compile(".*(\\"+ File.separator +"[^\\"+ File.separator +"]+\\"+ File.separator +"[^\\"+ File.separator +"]+)\\.class"); for (final String parserClassFile: parserClasses) { serverLog.logFine("PARSER", "Testing parser class " + parserClassFile); @@ -465,7 +465,7 @@ public final class plasmaParser { final String className = matcherClassName.group(1); final Matcher matcherFullClassName = patternGetFullClassName.matcher(parserClassFile); matcherFullClassName.find(); - final String fullClassName = plasmaParserPkgName + matcherFullClassName.group(1).replace("/", "."); + final String fullClassName = plasmaParserPkgName + matcherFullClassName.group(1).replace(File.separator , "."); try { // trying to load the parser class by its name final Class parserClass = Class.forName(fullClassName);