X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.repo%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Frepo%2FJarFileIndexer.java;h=328d4c560ec67f26a89bb2a9b8ded00ec9a65bb0;hb=e70fb767d8ff5972d88ab436762e71ea622a0f72;hp=80c750407a70c23343390db139aad1066fcc4941;hpb=4578db21c506c3f8eee57a896c9e71154e2065be;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/JarFileIndexer.java b/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/JarFileIndexer.java index 80c750407..328d4c560 100644 --- a/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/JarFileIndexer.java +++ b/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/JarFileIndexer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2012 Mathieu Baudier + * Copyright (C) 2007-2012 Argeo GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -211,7 +211,7 @@ public class JarFileIndexer implements NodeIndexer, SlcNames { cleanSubNodes(fileNode, SlcNames.SLC_ + Constants.IMPORT_PACKAGE); if (attrs.containsKey(new Name(Constants.IMPORT_PACKAGE))) { String importPackages = attrs.getValue(Constants.IMPORT_PACKAGE); - List packages = parsePackages(importPackages); + List packages = parseCommaSeparated(importPackages); for (String pkg : packages) { String[] tokens = pkg.split(";"); Node node = fileNode.addNode(SlcNames.SLC_ @@ -238,7 +238,7 @@ public class JarFileIndexer implements NodeIndexer, SlcNames { if (attrs.containsKey(new Name(Constants.DYNAMICIMPORT_PACKAGE))) { String importPackages = attrs .getValue(Constants.DYNAMICIMPORT_PACKAGE); - List packages = parsePackages(importPackages); + List packages = parseCommaSeparated(importPackages); for (String pkg : packages) { String[] tokens = pkg.split(";"); Node node = fileNode.addNode(SlcNames.SLC_ @@ -258,7 +258,7 @@ public class JarFileIndexer implements NodeIndexer, SlcNames { cleanSubNodes(fileNode, SlcNames.SLC_ + Constants.EXPORT_PACKAGE); if (attrs.containsKey(new Name(Constants.EXPORT_PACKAGE))) { String exportPackages = attrs.getValue(Constants.EXPORT_PACKAGE); - List packages = parsePackages(exportPackages); + List packages = parseCommaSeparated(exportPackages); for (String pkg : packages) { String[] tokens = pkg.split(";"); Node node = fileNode.addNode(SlcNames.SLC_ @@ -294,7 +294,7 @@ public class JarFileIndexer implements NodeIndexer, SlcNames { cleanSubNodes(fileNode, SlcNames.SLC_ + Constants.REQUIRE_BUNDLE); if (attrs.containsKey(new Name(Constants.REQUIRE_BUNDLE))) { String requireBundle = attrs.getValue(Constants.REQUIRE_BUNDLE); - String[] bundles = requireBundle.split(","); + List bundles = parseCommaSeparated(requireBundle); for (String bundle : bundles) { String[] tokens = bundle.split(";"); Node node = fileNode.addNode(SlcNames.SLC_ @@ -362,7 +362,7 @@ public class JarFileIndexer implements NodeIndexer, SlcNames { } /** Parse package list with nested directive with ',' */ - private List parsePackages(String str) { + private List parseCommaSeparated(String str) { List res = new ArrayList(); StringBuffer curr = new StringBuffer(""); boolean in = false;