Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make sure find returns entry with original key

  • Loading branch information...
commit 437ff9b7342267e2ffcfbd57db18858c053a731f 1 parent a2c5b5b
@richhickey richhickey authored
View
30 clojure.iml
@@ -11,35 +11,6 @@
<setting name="buildJar" value="true" />
<setting name="mainClass" value="clojure.lang.Compiler" />
</component>
- <component name="FacetManager">
- <facet type="web" name="Web" implicit="true">
- <configuration>
- <descriptors>
- <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/servlet/WEB-INF/web.xml" optional="false" version="2.5" />
- </descriptors>
- <webroots>
- <root url="file://$MODULE_DIR$/servlet" relative="/" />
- </webroots>
- <building>
- <setting name="EXPLODED_URL" value="file://" />
- <setting name="EXPLODED_ENABLED" value="false" />
- <setting name="JAR_URL" value="file://" />
- <setting name="JAR_ENABLED" value="false" />
- <setting name="BUILD_MODULE_ON_FRAME_DEACTIVATION" value="false" />
- <setting name="BUILD_EXTERNAL_DEPENDENCIES" value="false" />
- <setting name="EXCLUDE_EXPLODED_DIRECTORY" value="true" />
- <setting name="RUN_JASPER_VALIDATION" value="true" />
- <setting name="BUILD_ONLY_WEB_RESOURCES" value="false" />
- </building>
- <packaging>
- <containerElement type="module" name="clojure">
- <attribute name="method" value="1" />
- <attribute name="URI" value="/WEB-INF/classes" />
- </containerElement>
- </packaging>
- </configuration>
- </facet>
- </component>
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/classes" />
<exclude-output />
@@ -59,7 +30,6 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
<option name="ACTIVE_VCS_NAME" value="svn" />
View
2  src/jvm/clojure/lang/PersistentArrayMap.java
@@ -83,7 +83,7 @@ public boolean containsKey(Object key){
public IMapEntry entryAt(Object key){
int i = indexOf(key);
if(i >= 0)
- return new MapEntry(key,array[i+1]);
+ return new MapEntry(array[i],array[i+1]);
return null;
}
View
2  src/jvm/clojure/lang/PersistentStructMap.java
@@ -123,7 +123,7 @@ public IMapEntry entryAt(Object key){
Map.Entry e = def.keyslots.entryAt(key);
if(e != null)
{
- return new MapEntry(key, vals[(Integer) e.getValue()]);
+ return new MapEntry(e.getKey(), vals[(Integer) e.getValue()]);
}
return ext.entryAt(key);
}
View
5 src/jvm/clojure/lang/RT.java
@@ -663,14 +663,15 @@ else if(key instanceof Number && (coll instanceof String || coll.getClass().isAr
static public Object find(Object coll, Object key){
if(coll == null)
return null;
- else if(coll instanceof Map)
+ else if(coll instanceof Associative)
+ return ((Associative) coll).entryAt(key);
+ else
{
Map m = (Map) coll;
if(m.containsKey(key))
return new MapEntry(key, m.get(key));
return null;
}
- return ((Associative) coll).entryAt(key);
}
//takes a seq of key,val,key,val
Please sign in to comment.
Something went wrong with that request. Please try again.