aboutsummaryrefslogtreecommitdiff
path: root/src/Puppet.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/Puppet.java')
-rw-r--r--src/Puppet.java26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/Puppet.java b/src/Puppet.java
index e2a90ee..5398798 100644
--- a/src/Puppet.java
+++ b/src/Puppet.java
@@ -1,3 +1,16 @@
+/**
+ * Part of a Ivy-level proxy
+ *
+ * @author Yannick Jestin
+ * @author <a href="http://www.tls.cena.fr/products/ivy/">http://www.tls.cena.fr/products/ivy/</a>
+ *
+ * (c) CENA 1998-2004
+ *
+ * CHANGELOG:
+ * 1.2.13:
+ * - adds support for RESyntaxException
+ */
+
package fr.dgac.ivy ;
import java.lang.Thread;
import java.net.*;
@@ -57,7 +70,18 @@ class Puppet {
}
// ivy forwarded protocol message
- static final RE ivyProto = new RE("(\\d+) (\\d+)\\02(.*)");
+ static RE ivyProto;
+
+ static {
+ try {
+ ivyProto = new RE("(\\d+) (\\d+)\\02(.*)");
+ } catch ( RESyntaxException res ) {
+ res.printStackTrace();
+ System.out.println("Regular Expression bug in Ivy source code ... bailing out");
+ System.exit(0);
+ }
+ }
+
void parse(String s) throws IvyException {
if (!ivyProto.match(s)) { System.out.println("Puppet error, can't parse "+s); return; }
int pcode=Integer.parseInt(ivyProto.getParen(1));