Skip to content

Commit 5789caf

Browse files
patched with DBRef proxy to initiate proper DB when using multiple databases
1 parent af8066d commit 5789caf

20 files changed

Lines changed: 210 additions & 11 deletions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,6 @@ src/test/ed/webtests/webtest-local.bash
5050

5151
*.ipr
5252
*.iws
53+
*.iml
54+
.idea
5355
atlassian-ide-plugin.xml

.idea/libraries/Maven__com_beust_jcommander_1_12.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/Maven__junit_junit_3_8_1.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/Maven__org_beanshell_bsh_2_0b4.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/Maven__org_testng_testng_6_3_1.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/Maven__org_yaml_snakeyaml_1_6.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mongo-java-driver.iml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3+
<component name="FacetManager">
4+
<facet type="Osmorc" name="OSGi">
5+
<configuration manifestGenerationMode="OsmorcControlled" manifestLocation="" jarfileLocation="mongo-java-driver-2.10.0-SNAPSHOT.jar" outputPathType="CompilerOutputPath" bndFileLocation="" bundlorFileLocation="" bundleActivator="" bundleSymbolicName="org.mongodb.mongo-java-driver" bundleVersion="2.10.0.SNAPSHOT" ignoreFilePattern="" useProjectDefaultManifestFileLocation="true" alwaysRebuildBundleJAR="false" doNotSynchronizeWithMaven="false">
6+
<additionalProperties>
7+
<property key="Bundle-Description" value="The MongoDB Java driver" />
8+
<property key="Export-Package" value="org.bson.*" />
9+
<property key="Bundle-Name" value="MongoDB Java Driver" />
10+
</additionalProperties>
11+
<additionalJARContents />
12+
</configuration>
13+
</facet>
14+
</component>
15+
<component name="NewModuleRootManager" inherit-compiler-output="false">
16+
<output url="file://$MODULE_DIR$/target/classes" />
17+
<output-test url="file://$MODULE_DIR$/target/test-classes" />
18+
<exclude-output />
19+
<content url="file://$MODULE_DIR$">
20+
<sourceFolder url="file://$MODULE_DIR$/src/main" isTestSource="false" />
21+
<sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
22+
<excludeFolder url="file://$MODULE_DIR$/target" />
23+
</content>
24+
<orderEntry type="inheritedJdk" />
25+
<orderEntry type="sourceFolder" forTests="false" />
26+
<orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:6.3.1" level="project" />
27+
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:3.8.1" level="project" />
28+
<orderEntry type="library" scope="TEST" name="Maven: org.beanshell:bsh:2.0b4" level="project" />
29+
<orderEntry type="library" scope="TEST" name="Maven: com.beust:jcommander:1.12" level="project" />
30+
<orderEntry type="library" scope="TEST" name="Maven: org.yaml:snakeyaml:1.6" level="project" />
31+
</component>
32+
</module>
33+

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ driver developers who would rather use Maven than Ant as their build tool.
88
<artifactId>mongo-java-driver</artifactId>
99
<packaging>bundle</packaging>
1010
<name>MongoDB Java Driver</name>
11-
<version>2.10.0-SNAPSHOT</version>
11+
<version>2.10.0-PATCH</version>
1212
<description>The MongoDB Java driver</description>
1313
<url>http://www.mongodb.org</url>
1414

src/main/com/mongodb/DB.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public abstract class DB {
6060
public DB( Mongo mongo , String name ){
6161
_mongo = mongo;
6262
_name = name;
63-
_options = new Bytes.OptionHolder( _mongo._netOptions );
63+
_options = (_mongo == null) ? null : new Bytes.OptionHolder( _mongo._netOptions );
6464
}
6565

6666
/**

src/main/com/mongodb/DBApiLayer.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,11 @@ void killCursors( ServerAddress addr , List<Long> all ){
182182
_connector.say( this , om ,com.mongodb.WriteConcern.NONE , addr );
183183
}
184184

185+
@Override
186+
public String toString() {
187+
return getName();
188+
}
189+
185190
class MyCollection extends DBCollection {
186191
MyCollection( String name ){
187192
super( DBApiLayer.this , name );

0 commit comments

Comments
 (0)