aboutsummaryrefslogtreecommitdiff
path: root/src/Ivy.java
diff options
context:
space:
mode:
authorjestin2009-07-28 07:22:08 +0000
committerjestin2009-07-28 07:22:08 +0000
commitd93623316e15f774688bd7523c9c7431bffa689e (patch)
treef81c3486f29f42154ec44f08f00e4daf9be94512 /src/Ivy.java
parent51960a8031bfaee1d49cf95b6c9a906641c6afff (diff)
downloadivy-java-d93623316e15f774688bd7523c9c7431bffa689e.zip
ivy-java-d93623316e15f774688bd7523c9c7431bffa689e.tar.gz
ivy-java-d93623316e15f774688bd7523c9c7431bffa689e.tar.bz2
ivy-java-d93623316e15f774688bd7523c9c7431bffa689e.tar.xz
TCP NO DELAY
Diffstat (limited to 'src/Ivy.java')
-rwxr-xr-xsrc/Ivy.java24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/Ivy.java b/src/Ivy.java
index 2647434..5e3362f 100755
--- a/src/Ivy.java
+++ b/src/Ivy.java
@@ -13,6 +13,8 @@
*</pre>
*
* CHANGELOG:
+ * 1.2.13:
+ * - adds support for RESyntaxException
* 1.2.12:
* - directMessage goes protected
* 1.2.9:
@@ -114,7 +116,7 @@ public class Ivy implements Runnable {
* the library version, useful for development purposes only, when java is
* invoked with -DIVY_DEBUG
*/
- public static final String libVersion ="1.2.12";
+ public static final String libVersion ="1.2.13";
private boolean debug;
private ServerSocket app;
@@ -235,7 +237,12 @@ public class Ivy implements Runnable {
Properties sysProp = System.getProperties();
sysProp.put("IVYBUS",domainbus);
String range=(String)sysProp.get("IVYRANGE");
- RE rangeRE = new RE("(\\d+)-(\\d+)"); // tcp range min and max
+ RE rangeRE; // tcp range min and max
+ try {
+ rangeRE = new RE("(\\d+)-(\\d+)"); // tcp range min and max
+ } catch ( RESyntaxException res ) {
+ throw new IvyException("Regular Expression bug in Ivy source code ... bailing out");
+ }
if ((range!=null)&&rangeRE.match(range)) {
int rangeMin=Integer.parseInt(rangeRE.getParen(1));
int rangeMax=Integer.parseInt(rangeRE.getParen(2));
@@ -575,7 +582,18 @@ public class Ivy implements Runnable {
* @param exp a string regular expression
* must be synchronized ( RE is not threadsafe )
*/
- private static final RE bounded = new RE("^\\^([a-zA-Z0-9_-]+).*");
+ private static RE bounded ;
+
+ static {
+ try {
+ bounded = new RE("^\\^([a-zA-Z0-9_-]+).*");
+ } catch ( RESyntaxException res ) {
+ res.printStackTrace();
+ System.out.println("Regular Expression bug in Ivy source code ... bailing out");
+ System.exit(0);
+ }
+ }
+
public synchronized boolean CheckRegexp( String exp ) {
if (filter==null) return true; // there's no message filter
if (!bounded.match(exp)) return true; // the regexp is not bounded