Skip to content

Commit bbb45db

Browse files
committed
Merge branch 'hotfix-1.6.2'
2 parents f3eff9b + 57903bf commit bbb45db

File tree

171 files changed

+3211
-1164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+3211
-1164
lines changed

_base/base-build.xml

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
<property name="project.debug-level" value="lines,vars,source"/>
1414
<property name="project.target-comp" value="1.6"/>
1515
<property name="project.source-comp" value="1.6"/>
16+
<property name="ant.build.javac.source" value="1.6"/>
17+
<property name="ant.build.javac.target" value="1.6"/>
18+
1619
<property name="build.sysclasspath" value="ignore"/>
1720

1821
<path id="project.classpath">

build.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<property environment="env"/>
66
<property name="vendor" value="NuvolaBase Ltd"/>
77
<property name="product" value="OrientDB"/>
8-
<property name="version" value="1.6.1"/>
8+
<property name="version" value="1.6.2"/>
99
<condition property="community.release" value="${releaseHome}/orientdb-community-${version}"
1010
else="../releases/orientdb-community-${version}">
1111
<isset property="releaseHome"/>

client/pom.xml

+1-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>com.orientechnologies</groupId>
2626
<artifactId>orientdb-parent</artifactId>
27-
<version>1.6.1</version>
27+
<version>1.6.2</version>
2828
<relativePath>../</relativePath>
2929
</parent>
3030

@@ -35,7 +35,6 @@
3535
<properties>
3636
<osgi.import>*</osgi.import>
3737
<osgi.export>com.orientechnologies.orient.client.*</osgi.export>
38-
<osgi.fragment.host>com.orientechnologies.orientdb-core</osgi.fragment.host>
3938
</properties>
4039

4140
<dependencies>
@@ -46,5 +45,4 @@
4645
</dependency>
4746
</dependencies>
4847

49-
5048
</project>

client/src/main/java/com/orientechnologies/orient/client/remote/OStorageRemote.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1809,13 +1809,15 @@ private void removeDeadConnections() {
18091809
// FREE DEAD CONNECTIONS
18101810
int removedDeadConnections = 0;
18111811
for (OChannelBinaryAsynchClient n : new ArrayList<OChannelBinaryAsynchClient>(networkPool)) {
1812-
if (n != null && !n.isConnected())
1812+
if (n != null && !n.isConnected()) //Fixed issue with removing of network connections though connection is active.
1813+
{
18131814
try {
18141815
n.close();
18151816
} catch (Exception e) {
18161817
}
18171818
networkPool.remove(n);
18181819
removedDeadConnections++;
1820+
}
18191821
}
18201822

18211823
OLogManager.instance().debug(this, "Found and removed %d dead connections from the network pool", removedDeadConnections);

commons/pom.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>com.orientechnologies</groupId>
2626
<artifactId>orientdb-parent</artifactId>
27-
<version>1.6.1</version>
27+
<version>1.6.2</version>
2828
<relativePath>../</relativePath>
2929
</parent>
3030

@@ -35,7 +35,6 @@
3535
<properties>
3636
<osgi.export>com.orientechnologies.common.*</osgi.export>
3737
<osgi.import>javax.imageio.spi.*,sun.misc.*;resolution:=optional</osgi.import>
38-
<osgi.fragment.host>com.orientechnologies.orientdb-core</osgi.fragment.host>
3938
</properties>
4039

4140
<dependencies>

commons/src/main/java/com/orientechnologies/common/comparator/OCaseInsentiveComparator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
*/
88
public class OCaseInsentiveComparator implements Comparator<String> {
99
public int compare(final String stringOne, final String stringTwo) {
10-
return stringOne.toLowerCase().compareTo(stringTwo.toLowerCase());
10+
return stringOne.compareToIgnoreCase(stringTwo);
1111
}
1212
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.orientechnologies.common.console;
2+
3+
import com.orientechnologies.common.concur.resource.OCloseable;
4+
5+
/**
6+
* @author <a href='mailto:[email protected]'> Artem Orobets </a>
7+
*/
8+
public interface OCommandStream extends OCloseable {
9+
boolean hasNext();
10+
String nextCommand();
11+
}

commons/src/main/java/com/orientechnologies/common/console/OConsoleApplication.java

100644100755
+16-16
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,14 @@
2222
import java.lang.annotation.Annotation;
2323
import java.lang.reflect.Method;
2424
import java.lang.reflect.Modifier;
25-
import java.util.*;
25+
import java.util.ArrayList;
26+
import java.util.Collection;
27+
import java.util.Comparator;
28+
import java.util.HashMap;
29+
import java.util.Iterator;
30+
import java.util.Map;
2631
import java.util.Map.Entry;
32+
import java.util.TreeMap;
2733
import java.util.logging.Level;
2834
import java.util.logging.Logger;
2935

@@ -85,7 +91,7 @@ public int run() {
8591
if (consoleInput == null || consoleInput.length() == 0)
8692
continue;
8793

88-
if (!executeCommands(new Scanner(consoleInput), false))
94+
if (!executeCommands(new ODFACommandStream(consoleInput), false))
8995
break;
9096
}
9197
} else {
@@ -105,28 +111,22 @@ protected boolean isInteractiveMode(String[] args) {
105111
protected boolean executeBatch(final String commandLine) {
106112
final File commandFile = new File(commandLine);
107113

108-
Scanner scanner = null;
109-
114+
OCommandStream scanner;
110115
try {
111-
scanner = new Scanner(commandFile);
116+
scanner = new ODFACommandStream(commandFile);
112117
} catch (FileNotFoundException e) {
113-
scanner = new Scanner(commandLine);
118+
scanner = new ODFACommandStream(commandLine);
114119
}
115120

116121
return executeCommands(scanner, true);
117122
}
118123

119-
protected boolean executeCommands(final Scanner iScanner, final boolean iExitOnException) {
124+
protected boolean executeCommands(final OCommandStream commandStream, final boolean iExitOnException) {
120125
final StringBuilder commandBuffer = new StringBuilder();
121126

122127
try {
123-
String commandLine = null;
124-
125-
iScanner.useDelimiter(";(?=([^\"]*\"[^\"]*\")*[^\"]*$)(?=([^']*'[^']*')*[^']*$)|\n");
126-
127-
while (iScanner.hasNext()) {
128-
129-
commandLine = iScanner.next().trim();
128+
while (commandStream.hasNext()) {
129+
String commandLine = commandStream.nextCommand();
130130

131131
if (commandLine.isEmpty())
132132
// EMPTY LINE
@@ -167,7 +167,7 @@ protected boolean executeCommands(final Scanner iScanner, final boolean iExitOnE
167167
return false;
168168
}
169169
} finally {
170-
iScanner.close();
170+
commandStream.close();
171171
}
172172
return true;
173173
}
@@ -349,7 +349,7 @@ protected void syntaxError(String iCommand, Method m) {
349349
/**
350350
* Returns a map of all console method and the object they can be called on.
351351
*
352-
* @return Map<Method,Object>
352+
* @return Map&lt;Method,Object&gt;
353353
*/
354354
protected Map<Method, Object> getConsoleMethods() {
355355

0 commit comments

Comments
 (0)