Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

dodge ns collisions with clojure.java.io

  • Loading branch information...
commit 061f3d5b45657a89faa335ffa2bb80819f2e6918 1 parent 1d66c09
@stuarthalloway stuarthalloway authored
View
17 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
View
23 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))
+(defmethod as-url File [#^File x] (.toURL x))
View
3  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)))))
+ (.delete f)))))
View
1  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)
Please sign in to comment.
Something went wrong with that request. Please try again.