Skip to content

Commit bdd947a

Browse files
committed
Fixed warnings and broken tests because of upgrade to scala 2.10
1 parent b87493c commit bdd947a

File tree

22 files changed

+26
-28
lines changed

22 files changed

+26
-28
lines changed

admin-shell/src/main/scala/org/totalgrid/reef/shell/admin/AdminCommands.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class ResetDatabaseCommand extends ReefCommandSupport {
100100
}
101101
}
102102
} catch {
103-
case ex => println("Reset failed: " + ex.toString)
103+
case ex: Throwable => println("Reset failed: " + ex.toString)
104104
}
105105

106106
mstore.disconnect()

benchmarks/src/main/scala/org/totalgrid/reef/benchmarks/AllBenchmarksEntryPoint.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ object AllBenchmarksEntryPoint {
8787
args = args drop 1
8888
}
8989
} catch {
90-
case ex =>
90+
case ex: Throwable =>
9191
printf("Exception: " + ex.toString)
9292
usage
9393
}

benchmarks/src/main/scala/org/totalgrid/reef/benchmarks/system/ModelCreationUtilities.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ object ModelCreationUtilities {
8888
else startNext()
8989
} catch {
9090
case rse: ReefServiceException => prom.setFailure(rse)
91-
case ex => prom.setFailure(new UnknownServiceException(ex.toString))
91+
case ex: Throwable => prom.setFailure(new UnknownServiceException(ex.toString))
9292
}
9393
}
9494
}

calculations/calculations-library/src/test/scala/org/totalgrid/reef/calc/lib/MeasInputManagerTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class MeasInputManagerTest extends FunSuite with ShouldMatchers {
3838

3939
class MockInputBucket(val variable: String, val getSnapshot: Option[List[Measurement]]) extends InputBucket {
4040

41-
def onReceived(m: Measurement) = null
41+
def onReceived(m: Measurement) {}
4242

4343
def getMeasRequest = null
4444
}

fep/src/main/scala/org/totalgrid/reef/frontend/FrontEndConnections.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class FrontEndConnections(protocolManagers: Map[String, ProtocolManager], newCli
104104
val result = services.alterEndpointConnectionState(c.getId, EndpointConnection.State.ERROR).await()
105105
logger.info("Updated endpoint state: " + endpointName + " state: " + result.getState)
106106
} catch {
107-
case ex => logger.error("Couldn't update endpointState: " + ex.getMessage)
107+
case ex: Throwable => logger.error("Couldn't update endpointState: " + ex.getMessage)
108108
}
109109
}
110110
}

fep/src/main/scala/org/totalgrid/reef/frontend/ProtocolTraitToManagerShim.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class ProtocolTraitToManagerShim(protocol: Protocol) extends ProtocolManager wit
7272
services.publishMeasurements(value, new AddressableDestination(routingKey)).await()
7373
logger.info("Published a measurement batch of size: " + value.getMeasCount + " to " + routingKey + " " + " in " + (System.currentTimeMillis() - startTime) + " ms")
7474
} catch {
75-
case ex => logger.error("Couldn't publish measurements: " + ex.getMessage)
75+
case ex: Throwable => logger.error("Couldn't publish measurements: " + ex.getMessage)
7676
}
7777
}
7878
}
@@ -83,7 +83,7 @@ class ProtocolTraitToManagerShim(protocol: Protocol) extends ProtocolManager wit
8383
val result = services.alterEndpointConnectionState(connectionId, state).await()
8484
logger.info("Updated endpoint state: " + endpointName + " state: " + result.getState)
8585
} catch {
86-
case ex => logger.error("Couldn't update endpointState: " + ex.getMessage)
86+
case ex: Throwable => logger.error("Couldn't update endpointState: " + ex.getMessage)
8787
}
8888
}
8989
}
@@ -94,7 +94,7 @@ class ProtocolTraitToManagerShim(protocol: Protocol) extends ProtocolManager wit
9494
val result = services.alterCommunicationChannelState(channelUuid, state).await()
9595
logger.info("Updated channel state: " + result.getName + " state: " + result.getState)
9696
} catch {
97-
case ex => logger.error("Couldn't update channelState: " + ex.getMessage)
97+
case ex: Throwable => logger.error("Couldn't update channelState: " + ex.getMessage)
9898
}
9999
}
100100
}

loader-xml/src/main/scala/org/totalgrid/reef/loader/ExceptionCollector.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class LoadingExceptionCollector extends ExceptionCollector with Logging {
6161
val nameString = try {
6262
name
6363
} catch {
64-
case _ => "<unknown>"
64+
case _: Throwable => "<unknown>"
6565
}
6666
logger.info("exception encountered during loading: " + nameString + ": " + ex.getMessage)
6767
// logger.debug("DEBUG: exception encountered during loading: " + nameString + ": " + ex.getMessage + ": ", ex)

loader-xml/src/main/scala/org/totalgrid/reef/loader/LoadManager.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ object LoadManager extends Logging {
6868

6969
(loader, valid)
7070
} catch {
71-
case ex =>
71+
case ex: Throwable =>
7272
println("Error loading configuration file '" + filename + "' " + ex.getMessage)
7373
throw ex
7474
}

loader-xml/src/main/scala/org/totalgrid/reef/loader/StandaloneLoader.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ object StandaloneLoader {
9090
}
9191

9292
} catch {
93-
case ex =>
93+
case ex: Throwable =>
9494
printf("Exception: " + ex.toString)
9595
usage
9696
}

loader-xml/src/main/scala/org/totalgrid/reef/loader/helpers/ModelContainer.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ class ModelContainer extends Logging {
8888

8989
def add(eventConfig: EventConfig) {
9090
addModel(eventConfig)
91-
eventConfig
9291
}
9392

9493
def add(endpointConfig: Endpoint): Endpoint =

0 commit comments

Comments
 (0)