Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions rxjava-core/src/main/java/rx/observables/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ public NeverObservable() {

@Override
public Subscription call(Observer<T> t1) {
return new NullObservableSubscription();
return new NoOpObservableSubscription();
}

});
Expand All @@ -353,7 +353,7 @@ public Subscription call(Observer<T> t1) {
/**
* A disposable object that does nothing when its unsubscribe method is called.
*/
private static class NullObservableSubscription implements Subscription {
private static class NoOpObservableSubscription implements Subscription {
public void unsubscribe() {
}
}
Expand All @@ -379,7 +379,7 @@ public ThrowObservable(final Exception exception) {
@Override
public Subscription call(Observer<T> observer) {
observer.onError(exception);
return new NullObservableSubscription();
return new NoOpObservableSubscription();
}

});
Expand Down Expand Up @@ -862,7 +862,7 @@ public static <T> Observable<T> never() {
* @return
*/
public static Subscription noOpSubscription() {
return new NullObservableSubscription();
return new NoOpObservableSubscription();
}

/**
Expand Down
43 changes: 43 additions & 0 deletions rxjava-examples/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'clojure'
apply plugin: 'eclipse'
apply plugin: 'idea'

aotCompile = true
warnOnReflection = true

repositories {
mavenCentral()
clojarsRepo()
}

dependencies {
compile project(':language-adaptors:rxjava-clojure')
compile project(':language-adaptors:rxjava-groovy')
provided 'junit:junit:4.10'
provided 'org.mockito:mockito-core:1.9.5'
}

/*
* Add Counterclockwise and include 'provided' dependencies
*/
eclipse {
project {
natures "ccw.nature"
}
classpath {
plusConfigurations += configurations.provided
downloadSources = true
downloadJavadoc = true
}
}

/*
* Adds clojuresque to the (build) classpath
*/
buildscript {
repositories { maven { url "http://clojars.org/repo" } }
dependencies { classpath "clojuresque:clojuresque:1.5.4" }
}

8 changes: 8 additions & 0 deletions rxjava-examples/src/main/clojure/rx_examples.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(ns rx-examples
(:use clojure.test)
(import rx.observables.Observable))

(defn hello
[&rest]
(-> (Observable/toObservable &rest)
(.subscribe #(println (str "Hello " % "!")))))
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package rx.examples.groovy;
import rx.observables.Observable

def hello(String[] names) {
Observable.toObservable(names)
.subscribe({ println "Hello " + it + "!"})
}

hello("Ben", "George")
3 changes: 2 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
rootProject.name='rxjava'
include 'rxjava-core', \
'rxjava-examples', \
'language-adaptors:rxjava-groovy', \
'language-adaptors:rxjava-jruby', \
'language-adaptors:rxjava-clojure', \
'language-adaptors:rxjava-scala' \
'language-adaptors:rxjava-scala'