Fixed package error and a few deprecated scala warnings.

This commit is contained in:
kshakir 2012-10-15 15:29:40 -04:00
parent 213cc00abe
commit c4ee31075c
3 changed files with 6 additions and 5 deletions

View File

@ -27,7 +27,7 @@ package org.broadinstitute.sting.queue
import engine.JobRunInfo import engine.JobRunInfo
import org.broadinstitute.sting.queue.function.QFunction import org.broadinstitute.sting.queue.function.QFunction
import annotation.target.field import annotation.target.field
import util.{ReflectionUtils, StringFileConversions, PrimitiveOptionConversions, Logging} import util._
import org.broadinstitute.sting.utils.classloader.JVMUtils import org.broadinstitute.sting.utils.classloader.JVMUtils
import java.lang.reflect.Field import java.lang.reflect.Field

View File

@ -11,6 +11,7 @@ import org.apache.log4j.Level
import scala.tools.nsc.util.{FakePos, NoPosition, Position} import scala.tools.nsc.util.{FakePos, NoPosition, Position}
import org.broadinstitute.sting.queue.util.TextFormatUtils._ import org.broadinstitute.sting.queue.util.TextFormatUtils._
import org.broadinstitute.sting.utils.classloader.JVMUtils import org.broadinstitute.sting.utils.classloader.JVMUtils
import tools.util.StringOps
/** /**
* Plugin manager for QScripts which loads QScripts into the current class loader. * Plugin manager for QScripts which loads QScripts into the current class loader.
@ -63,7 +64,7 @@ object QScriptManager extends Logging {
* Heavily based on scala/src/compiler/scala/tools/nsc/reporters/ConsoleReporter.scala * Heavily based on scala/src/compiler/scala/tools/nsc/reporters/ConsoleReporter.scala
*/ */
private class Log4JReporter(val settings: Settings) extends AbstractReporter { private class Log4JReporter(val settings: Settings) extends AbstractReporter {
def displayPrompt { throw new UnsupportedOperationException("Unable to prompt the user. Prompting should be off.") } def displayPrompt() { throw new UnsupportedOperationException("Unable to prompt the user. Prompting should be off.") }
/** /**
* Displays the message at position with severity. * Displays the message at position with severity.
@ -98,9 +99,9 @@ object QScriptManager extends Logging {
*/ */
def printSummary() { def printSummary() {
if (WARNING.count > 0) if (WARNING.count > 0)
printMessage(Level.WARN, countElementsAsString(WARNING.count, "warning") + " found") printMessage(Level.WARN, StringOps.countElementsAsString(WARNING.count, "warning") + " found")
if (ERROR.count > 0) if (ERROR.count > 0)
printMessage(Level.ERROR, countElementsAsString(ERROR.count, "error") + " found") printMessage(Level.ERROR, StringOps.countElementsAsString(ERROR.count, "error") + " found")
} }
/** /**

View File

@ -185,7 +185,7 @@ class FunctionEdge(val function: QFunction, val inputs: QNode, val outputs: QNod
val tailLines = IOUtils.tail(errorFile, maxLines) val tailLines = IOUtils.tail(errorFile, maxLines)
val nl = "%n".format() val nl = "%n".format()
val summary = if (tailLines.size > maxLines) "Last %d lines".format(maxLines) else "Contents" val summary = if (tailLines.size > maxLines) "Last %d lines".format(maxLines) else "Contents"
this.function.jobErrorLines = collection.JavaConversions.asScalaIterable(tailLines).toSeq this.function.jobErrorLines = collection.JavaConversions.collectionAsScalaIterable(tailLines).toSeq
logger.error("%s of %s:%n%s".format(summary, errorFile, StringUtils.join(tailLines, nl))) logger.error("%s of %s:%n%s".format(summary, errorFile, StringUtils.join(tailLines, nl)))
} else { } else {
logger.error("Unable to access log file: %s".format(errorFile)) logger.error("Unable to access log file: %s".format(errorFile))