320073 - fix previous refactoring: ensure ORDERED_LIBS only set if an ordering is present

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2193 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Jan Bartel 2010-07-29 01:59:19 +00:00
parent cbc47fca80
commit 00cbe30682
1 changed files with 11 additions and 8 deletions

View File

@ -263,16 +263,19 @@ public class MetaData
_origins.clear();
// Set the ordered lib attribute
List<String> orderedLibs = new ArrayList<String>();
for (Resource webInfJar:_orderedWebInfJars)
if (_ordering != null)
{
//get just the name of the jar file
String fullname = webInfJar.getName();
int i = fullname.indexOf(".jar");
int j = fullname.lastIndexOf("/", i);
orderedLibs.add(fullname.substring(j+1,i+4));
List<String> orderedLibs = new ArrayList<String>();
for (Resource webInfJar:_orderedWebInfJars)
{
//get just the name of the jar file
String fullname = webInfJar.getName();
int i = fullname.indexOf(".jar");
int j = fullname.lastIndexOf("/", i);
orderedLibs.add(fullname.substring(j+1,i+4));
}
context.setAttribute(ORDERED_LIBS, orderedLibs);
}
context.setAttribute(ORDERED_LIBS, orderedLibs);
for (DescriptorProcessor p:_descriptorProcessors)
{