Skip to content

Commit

Permalink
Merge pull request #1636 from lift/diego_issue_1635
Browse files Browse the repository at this point in the history
Renaming the Position.scala file to ScalaPosition.scala to avoid class name collisions.
  • Loading branch information
farmdawgnation committed Nov 16, 2014
2 parents d92a14d + fa1383f commit 9e89299
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ class PCDataXmlParser(val input: Source) extends ConstructingHandler with PCData
import scala.io._


val line = Position.line(pos)
val col = Position.column(pos)
val line = ScalaPosition.line(pos)
val col = ScalaPosition.column(pos)
val report = curInput.descr + ":" + line + ":" + col + ": " + msg
System.err.println(report)
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ package io

/**
* This was made private in scala 2.11.0 but there is no alternative for us to use, so here, copy/paste for now.
* We renamed it because having a private vs public class with the same name causes errors with the assembly plugin
* and may/(will?) cause errors at runtime.
*/

@deprecated("This class will be removed.", "2.10.0")
abstract class Position {
abstract class ScalaPosition {
/** Definable behavior for overflow conditions.
*/
def checkInput(line: Int, column: Int): Unit
Expand Down Expand Up @@ -73,7 +74,7 @@ abstract class Position {
def toString(pos: Int): String = line(pos) + ":" + column(pos)
}

object Position extends Position {
object ScalaPosition extends ScalaPosition {
def checkInput(line: Int, column: Int) {
if (line < 0)
throw new IllegalArgumentException(line + " < 0")
Expand Down
10 changes: 2 additions & 8 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,8 @@ object BuildDef extends Build {
.settings(description := "Utilities Library",
parallelExecution in Test := false,
libraryDependencies <++= scalaVersion {sv => Seq(scala_compiler(sv), joda_time,
joda_convert, commons_codec, javamail, log4j, htmlparser)},
excludeFilter <<= scalaVersion { scalaVersion =>
if (scalaVersion.startsWith("2.11")) {
HiddenFileFilter
} else {
HiddenFileFilter || "Position.scala"
}
})
joda_convert, commons_codec, javamail, log4j, htmlparser)}
)

// Web Projects
// ------------
Expand Down

0 comments on commit 9e89299

Please sign in to comment.