Index: contrib/benchmark/CHANGES.txt =================================================================== --- contrib/benchmark/CHANGES.txt (revision 928290) +++ contrib/benchmark/CHANGES.txt (working copy) @@ -2,6 +2,10 @@ The Benchmark contrib package contains code for benchmarking Lucene in a variety of ways. +3/28/2010 + LUCENE-2353: Fixed bug in Config where Windows absolute path property values + were incorrectly handled (Shai Erera via ?) + 3/24/2010 LUCENE-2343: Added support for benchmarking collectors. (Grant Ingersoll, Shai Erera) Index: contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Config.java =================================================================== --- contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Config.java (revision 928290) +++ contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Config.java (working copy) @@ -139,6 +139,10 @@ } if (sval.indexOf(":") < 0) { return sval; + } else if (sval.indexOf(":\\") >= 0) { + // this previously messed up absolute path names on Windows. Assuming + // there is no real value that starts with \\ + return sval; } // first time this prop is extracted by round int k = sval.indexOf(":"); Index: contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/utils/TestConfig.java =================================================================== --- contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/utils/TestConfig.java (revision 0) +++ contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/utils/TestConfig.java (revision 0) @@ -0,0 +1,37 @@ +package org.apache.lucene.benchmark.byTask.utils; + +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import static org.junit.Assert.*; + +import java.util.Properties; + +import org.apache.lucene.util.LuceneTestCaseJ4; +import org.junit.Test; + +public class TestConfig extends LuceneTestCaseJ4 { + + @Test + public void testAbsolutePathNamesWindows() throws Exception { + Properties props = new Properties(); + props.setProperty("work.dir", "c:\\temp"); + Config conf = new Config(props); + assertEquals("c:\\temp", conf.get("work.dir", "")); + } + +} Property changes on: contrib\benchmark\src\test\org\apache\lucene\benchmark\byTask\utils\TestConfig.java ___________________________________________________________________ Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native