aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Halloway <stu@thinkrelevance.com>2010-05-21 10:19:25 -0400
committerStuart Halloway <stu@thinkrelevance.com>2010-05-21 10:19:25 -0400
commit061f3d5b45657a89faa335ffa2bb80819f2e6918 (patch)
tree07ff86e4e52fb08baa5b6adfefa612b7368f614e
parent1d66c0942d628b97b6d4ff826b36e15e95c18967 (diff)
dodge ns collisions with clojure.java.io
-rw-r--r--src/main/clojure/clojure/contrib/duck_streams.clj17
-rw-r--r--src/main/clojure/clojure/contrib/io.clj23
-rw-r--r--src/test/clojure/clojure/contrib/test_io.clj3
-rw-r--r--src/test/clojure/clojure/contrib/test_properties.clj1
4 files changed, 24 insertions, 20 deletions
diff --git a/src/main/clojure/clojure/contrib/duck_streams.clj b/src/main/clojure/clojure/contrib/duck_streams.clj
index 027aae4d..5af717cb 100644
--- a/src/main/clojure/clojure/contrib/duck_streams.clj
+++ b/src/main/clojure/clojure/contrib/duck_streams.clj
@@ -57,14 +57,15 @@
Note: this is not really \"duck typing\" as implemented in languages
like Ruby. A better name would have been \"do-what-I-mean-streams\"
or \"just-give-me-a-stream\", but ducks are funnier."}
- clojure.contrib.duck-streams
- (:import
- (java.io Reader InputStream InputStreamReader PushbackReader
- BufferedReader File PrintWriter OutputStream
- OutputStreamWriter BufferedWriter Writer
- FileInputStream FileOutputStream ByteArrayOutputStream
- StringReader ByteArrayInputStream)
- (java.net URI URL MalformedURLException Socket)))
+ clojure.contrib.duck-streams
+ (:refer-clojure :exclude (spit))
+ (:import
+ (java.io Reader InputStream InputStreamReader PushbackReader
+ BufferedReader File PrintWriter OutputStream
+ OutputStreamWriter BufferedWriter Writer
+ FileInputStream FileOutputStream ByteArrayOutputStream
+ StringReader ByteArrayInputStream)
+ (java.net URI URL MalformedURLException Socket)))
(def
diff --git a/src/main/clojure/clojure/contrib/io.clj b/src/main/clojure/clojure/contrib/io.clj
index 7ae69036..b849300c 100644
--- a/src/main/clojure/clojure/contrib/io.clj
+++ b/src/main/clojure/clojure/contrib/io.clj
@@ -54,16 +54,17 @@
BufferedInputStream and BufferedOutputStream instances (respectively),
with default implementations extended to a variety of argument
types: URLs or filenames as strings, java.io.File's, Sockets, etc."}
- clojure.contrib.io
- (:import
- (java.io Reader InputStream InputStreamReader PushbackReader
- BufferedReader File OutputStream
- OutputStreamWriter BufferedWriter Writer
- FileInputStream FileOutputStream ByteArrayOutputStream
- StringReader ByteArrayInputStream
- BufferedInputStream BufferedOutputStream
- CharArrayReader)
- (java.net URI URL MalformedURLException Socket)))
+ clojure.contrib.io
+ (:refer-clojure :exclude (spit))
+ (:import
+ (java.io Reader InputStream InputStreamReader PushbackReader
+ BufferedReader File OutputStream
+ OutputStreamWriter BufferedWriter Writer
+ FileInputStream FileOutputStream ByteArrayOutputStream
+ StringReader ByteArrayInputStream
+ BufferedInputStream BufferedOutputStream
+ CharArrayReader)
+ (java.net URI URL MalformedURLException Socket)))
(def
@@ -548,4 +549,4 @@ Raise an exception if any deletion fails unless silently is true."
(defmethod as-url String [#^String x] (URL. x))
-(defmethod as-url File [#^File x] (.toURL x)) \ No newline at end of file
+(defmethod as-url File [#^File x] (.toURL x))
diff --git a/src/test/clojure/clojure/contrib/test_io.clj b/src/test/clojure/clojure/contrib/test_io.clj
index e4e1d1e2..807fc394 100644
--- a/src/test/clojure/clojure/contrib/test_io.clj
+++ b/src/test/clojure/clojure/contrib/test_io.clj
@@ -1,4 +1,5 @@
(ns clojure.contrib.test-io
+ (:refer-clojure :exclude (spit))
(:use clojure.test clojure.contrib.io)
(:import (java.io File FileInputStream BufferedInputStream)
(java.net URL URI)))
@@ -92,4 +93,4 @@
(is (= content (slurp* (.getBytes content "UTF-8"))))
(is (= content (slurp* (.toCharArray content))))
(finally
- (.delete f))))) \ No newline at end of file
+ (.delete f)))))
diff --git a/src/test/clojure/clojure/contrib/test_properties.clj b/src/test/clojure/clojure/contrib/test_properties.clj
index 0b9b8179..65b1371f 100644
--- a/src/test/clojure/clojure/contrib/test_properties.clj
+++ b/src/test/clojure/clojure/contrib/test_properties.clj
@@ -1,4 +1,5 @@
(ns clojure.contrib.test-properties
+ (:refer-clojure :exclude (spit))
(:use clojure.test clojure.contrib.properties
[clojure.contrib.io :only (spit)])
(:import (java.util Properties)