[jboss-cvs] JBossAS SVN: r96284 - projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/vfs.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Nov 11 17:35:35 EST 2009
Author: alesj
Date: 2009-11-11 17:35:35 -0500 (Wed, 11 Nov 2009)
New Revision: 96284
Modified:
projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/vfs/BundleHandler.java
Log:
Use string builder.
Modified: projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/vfs/BundleHandler.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/vfs/BundleHandler.java 2009-11-11 22:31:21 UTC (rev 96283)
+++ projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/vfs/BundleHandler.java 2009-11-11 22:35:35 UTC (rev 96284)
@@ -83,13 +83,13 @@
if (relativePath == null)
relativePath = AbstractStructureDeployer.getRelativePath(root, file);
- String path = relativePath;
- if (checkStart && path.startsWith("/") == false)
- path = "/" + path;
- if (checkEnd && path.endsWith("/") == false)
- path += "/";
+ StringBuilder path = new StringBuilder(relativePath);
+ if (checkStart && relativePath.startsWith("/") == false)
+ path.insert(0, '/');
+ if (checkEnd && relativePath.endsWith("/") == false)
+ path.append('/');
- return path;
+ return path.toString();
}
protected VirtualFileHandler createChildHandler(VirtualFile child) throws IOException
More information about the jboss-cvs-commits
mailing list