Fix files with spaces in the name

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113673 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
dion committed 2003-07-21 05:05:51 +00:00
1 parent b0cd6a828d
commit e3b651af19
1 file changed
+9 -3
@@ -70,7 +70,7 @@ import java.util.StringTokenizer;
* Maven documentation, with links pointing to the JXR sources.
*
* @author Aslak Hellesoy
* @version $Revision: 1.1 $
* @version $Revision: 1.2 $
*/
public class SimianLog {
private File logFile;
@@ -185,8 +185,14 @@ public class SimianLog {
int endLine = Integer.parseInt(dupeEntryTokenizer.nextToken());
// Skip "in".
dupeEntryTokenizer.nextToken();
String filePath = dupeEntryTokenizer.nextToken();
// filePath could have spaces, we really want all tokens
StringBuffer filePathBuffer = new StringBuffer();
while (dupeEntryTokenizer.hasMoreTokens())
{
filePathBuffer.append(dupeEntryTokenizer.nextToken());
filePathBuffer.append(' ');
}
String filePath = filePathBuffer.toString();
String pathToClass = null;
if( filePath.startsWith(sourceDirectory) ) {
pathToClass = "xref/" + getPathToClass(sourceDirectory, filePath);