Skip to content

Commit 227e514

Browse files
IntelliJ suggested style changes.
1 parent 4023679 commit 227e514

File tree

7 files changed

+28
-28
lines changed

7 files changed

+28
-28
lines changed

language-adaptors/rxjava-scala/src/examples/scala/rx/lang/scala/examples/RxScalaDemo.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,21 +166,21 @@ class RxScalaDemo extends JUnitSuite {
166166
@Test def testTwoSubscriptionsToOneInterval() {
167167
val o = Observable.interval(100 millis).take(8)
168168
o.subscribe(
169-
i => println(s"${i}a (on thread #${Thread.currentThread().getId()})")
169+
i => println(s"${i}a (on thread #${Thread.currentThread().getId})")
170170
)
171171
o.subscribe(
172-
i => println(s"${i}b (on thread #${Thread.currentThread().getId()})")
172+
i => println(s"${i}b (on thread #${Thread.currentThread().getId})")
173173
)
174174
waitFor(o)
175175
}
176176

177177
@Test def schedulersExample() {
178178
val o = Observable.interval(100 millis).take(8)
179179
o.observeOn(NewThreadScheduler()).subscribe(
180-
i => println(s"${i}a (on thread #${Thread.currentThread().getId()})")
180+
i => println(s"${i}a (on thread #${Thread.currentThread().getId})")
181181
)
182182
o.observeOn(NewThreadScheduler()).subscribe(
183-
i => println(s"${i}b (on thread #${Thread.currentThread().getId()})")
183+
i => println(s"${i}b (on thread #${Thread.currentThread().getId})")
184184
)
185185
waitFor(o)
186186
}
@@ -356,13 +356,13 @@ class RxScalaDemo extends JUnitSuite {
356356
}
357357

358358
def square(x: Int): Int = {
359-
println(s"$x*$x is being calculated on thread ${Thread.currentThread().getId()}")
359+
println(s"$x*$x is being calculated on thread ${Thread.currentThread().getId}")
360360
Thread.sleep(100) // calculating a square is heavy work :)
361361
x*x
362362
}
363363

364364
def work(o1: Observable[Int]): Observable[String] = {
365-
println(s"map() is being called on thread ${Thread.currentThread().getId()}")
365+
println(s"map() is being called on thread ${Thread.currentThread().getId}")
366366
o1.map(i => s"The square of $i is ${square(i)}")
367367
}
368368

language-adaptors/rxjava-scala/src/examples/scala/rx/lang/scala/examples/TestSchedulerExample.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class TestSchedulerExample extends JUnitSuite {
2828

2929
scheduler.advanceTimeTo(2 seconds)
3030

31-
val inOrdr = inOrder(observer);
31+
val inOrdr = inOrder(observer)
3232
inOrdr.verify(observer, times(1)).onNext(0L)
3333
inOrdr.verify(observer, times(1)).onNext(1L)
3434
inOrdr.verify(observer, never).onNext(2L)
@@ -37,7 +37,7 @@ class TestSchedulerExample extends JUnitSuite {
3737

3838
verify(observer, never).onNext(2L)
3939

40-
sub.unsubscribe();
40+
sub.unsubscribe()
4141

4242
scheduler.advanceTimeTo(4 seconds)
4343

language-adaptors/rxjava-scala/src/main/scala/rx/lang/scala/Scheduler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ trait Scheduler {
215215

216216
object Scheduler {
217217
private [scala] def apply(scheduler: rx.Scheduler): Scheduler = {
218-
return new Scheduler() {
218+
new Scheduler() {
219219
val asJavaScheduler = scheduler
220220
}
221221
}

language-adaptors/rxjava-scala/src/main/scala/rx/lang/scala/subscriptions/BooleanSubscription.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ object BooleanSubscription {
3232
def apply(u: => Unit): BooleanSubscription = {
3333
new BooleanSubscription(new rx.subscriptions.BooleanSubscription {
3434
override def unsubscribe(): Unit = {
35-
if(!super.isUnsubscribed()) {
35+
if(!super.isUnsubscribed) {
3636
u
3737
super.unsubscribe()
3838
}

language-adaptors/rxjava-scala/src/test/scala/rx/lang/scala/CompletenessTest.scala

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -189,25 +189,25 @@ class CompletenessTest extends JUnitSuite {
189189
}
190190

191191
@Ignore // because spams output
192-
@Test def printJavaInstanceMethods: Unit = {
192+
@Test def printJavaInstanceMethods(): Unit = {
193193
printMethodSet("Instance methods of rx.Observable",
194194
typeOf[rx.Observable[_]])
195195
}
196196

197197
@Ignore // because spams output
198-
@Test def printScalaInstanceMethods: Unit = {
198+
@Test def printScalaInstanceMethods(): Unit = {
199199
printMethodSet("Instance methods of rx.lang.scala.Observable",
200200
typeOf[rx.lang.scala.Observable[_]])
201201
}
202202

203203
@Ignore // because spams output
204-
@Test def printJavaStaticMethods: Unit = {
204+
@Test def printJavaStaticMethods(): Unit = {
205205
printMethodSet("Static methods of rx.Observable",
206206
typeOf[rx.Observable[_]].typeSymbol.companionSymbol.typeSignature)
207207
}
208208

209209
@Ignore // because spams output
210-
@Test def printScalaCompanionMethods: Unit = {
210+
@Test def printScalaCompanionMethods(): Unit = {
211211
printMethodSet("Companion methods of rx.lang.scala.Observable",
212212
typeOf[rx.lang.scala.Observable.type])
213213
}
@@ -227,7 +227,7 @@ class CompletenessTest extends JUnitSuite {
227227
}
228228

229229
@Ignore // because spams output
230-
@Test def printDefaultMethodCorrespondence: Unit = {
230+
@Test def printDefaultMethodCorrespondence(): Unit = {
231231
println("\nDefault Method Correspondence")
232232
println( "-----------------------------\n")
233233
val c = SortedMap(defaultMethodCorrespondence.toSeq : _*)
@@ -238,7 +238,7 @@ class CompletenessTest extends JUnitSuite {
238238
}
239239

240240
@Ignore // because spams output
241-
@Test def printCorrectedMethodCorrespondence: Unit = {
241+
@Test def printCorrectedMethodCorrespondence(): Unit = {
242242
println("\nCorrected Method Correspondence")
243243
println( "-------------------------------\n")
244244
val c = SortedMap(correspondence.toSeq : _*)
@@ -262,7 +262,7 @@ class CompletenessTest extends JUnitSuite {
262262
println(s"$status: $bad out of ${bad+good} methods were not found in $tp")
263263
}
264264

265-
@Test def checkScalaMethodPresenceVerbose: Unit = {
265+
@Test def checkScalaMethodPresenceVerbose(): Unit = {
266266
println("\nTesting that all mentioned Scala methods exist")
267267
println( "----------------------------------------------\n")
268268

@@ -289,14 +289,14 @@ class CompletenessTest extends JUnitSuite {
289289
(javaM, if (actualMethods.contains(scalaM) || scalaM.charAt(0) == '[') scalaM else "[**TODO: missing**]")
290290
}
291291

292-
@Test def checkJavaMethodPresence: Unit = {
292+
@Test def checkJavaMethodPresence(): Unit = {
293293
println("\nTesting that all mentioned Java methods exist")
294294
println( "---------------------------------------------\n")
295295
checkMethodPresence(correspondence.keys, typeOf[rx.Observable[_]])
296296
}
297297

298298
@Ignore // because we prefer the verbose version
299-
@Test def checkScalaMethodPresence: Unit = {
299+
@Test def checkScalaMethodPresence(): Unit = {
300300
checkMethodPresence(correspondence.values, typeOf[rx.lang.scala.Observable[_]])
301301
}
302302

@@ -347,8 +347,8 @@ Note:
347347
(for (((javaName, scalaCol), pairs) <- ps.groupBy(groupingKey(_)).toList.sortBy(_._1._1)) yield {
348348
"| " + formatJavaCol(javaName, pairs.map(_._1)) + " | " + formatScalaCol(scalaCol) + " |"
349349
}).foreach(println(_))
350-
println(s"\nThis table was generated on ${Calendar.getInstance().getTime()}.")
351-
println(s"**Do not edit**. Instead, edit `${getClass().getCanonicalName()}`.")
350+
println(s"\nThis table was generated on ${Calendar.getInstance().getTime}.")
351+
println(s"**Do not edit**. Instead, edit `${getClass.getCanonicalName}`.")
352352
}
353353

354354
}

language-adaptors/rxjava-scala/src/test/scala/rx/lang/scala/ObservableTest.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ class ObservableTests extends JUnitSuite {
3737
// If this changes (i.e. it suppresses errors and returns default) then Scala's firstOrElse
3838
// should be changed accordingly.
3939
@Test def testJavaFirstOrDefault() {
40-
assertEquals(1, rx.Observable.from(1, 2).firstOrDefault(10).toBlockingObservable().single)
41-
assertEquals(10, rx.Observable.empty().firstOrDefault(10).toBlockingObservable().single)
40+
assertEquals(1, rx.Observable.from(1, 2).firstOrDefault(10).toBlockingObservable.single)
41+
assertEquals(10, rx.Observable.empty().firstOrDefault(10).toBlockingObservable.single)
4242
val msg = "msg6251"
4343
var receivedMsg = "none"
4444
try {
45-
rx.Observable.error(new Exception(msg)).firstOrDefault(10).toBlockingObservable().single
45+
rx.Observable.error(new Exception(msg)).firstOrDefault(10).toBlockingObservable.single
4646
} catch {
47-
case e: Exception => receivedMsg = e.getCause().getMessage()
47+
case e: Exception => receivedMsg = e.getCause.getMessage
4848
}
4949
assertEquals(receivedMsg, msg)
5050
}
@@ -62,7 +62,7 @@ class ObservableTests extends JUnitSuite {
6262
try {
6363
Observable[Int](new Exception(msg)).firstOrElse(10).toBlockingObservable.single
6464
} catch {
65-
case e: Exception => receivedMsg = e.getCause().getMessage()
65+
case e: Exception => receivedMsg = e.getCause.getMessage
6666
}
6767
assertEquals(receivedMsg, msg)
6868
}

language-adaptors/rxjava-scala/src/test/scala/rx/lang/scala/subjects/SubjectTests.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import org.junit.Test
33
import rx.lang.scala.subjects._
44
import org.mockito.InOrder
55
import rx.lang.scala._
6-
import org.mockito.Matchers._;
7-
import org.mockito.Mockito._;
6+
import org.mockito.Matchers._
7+
import org.mockito.Mockito._
88

99
import org.junit.Assert._
1010
import org.junit.Test

0 commit comments

Comments
 (0)