Permalink
Browse files

Look for words file in classpath.

  • Loading branch information...
1 parent 7321776 commit 05bc3e83db34b4ce7024d8fc4d0f5e45d53c3a46 @ijuma committed Dec 6, 2009
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/main/scala/jsr166/scala/MapMicroBenchmark.scala
View
3 src/main/scala/jsr166/scala/MapMicroBenchmark.scala
@@ -276,7 +276,8 @@ object MapMicroBenchmark {
// Read in String keys from file if possible
def initStringKeys(keys: Array[AnyRef], n: Int) {
try {
- val in = new java.io.BufferedReader(new java.io.FileReader(wordFile))
+ val in = new java.io.BufferedReader(new java.io.InputStreamReader(
+ currentThread.getContextClassLoader.getResourceAsStream(wordFile)))
var line: String = null
var k = 0
while(k < n && {line = in.readLine; line != null}) {

0 comments on commit 05bc3e8

Please sign in to comment.