[libinline-java-perl] 377/398: ok 0_50-93

Jonas Smedegaard dr at jones.dk
Thu Feb 26 11:43:27 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag 0.55
in repository libinline-java-perl.

commit ffb4effc1f32916bf0acfba1fc6a83a9ac6a893f
Author: patrick_leb <>
Date:   Wed Mar 29 23:55:16 2006 +0000

    ok 0_50-93
---
 Java/PerlInterpreter/t/02_perl_interpreter.t                 |  2 +-
 Java/PerlNatives/PerlNatives.pm                              |  2 +-
 Java/sources/org/perl/inline/java/InlineJavaHandle.java      |  2 +-
 Java/sources/org/perl/inline/java/InlineJavaPerlCaller.java  |  2 +-
 .../org/perl/inline/java/InlineJavaPerlInterpreter.java      |  4 ++--
 Java/sources/org/perl/inline/java/InlineJavaPerlNatives.java |  4 ++--
 Java/sources/org/perl/inline/java/InlineJavaProtocol.java    |  6 +++---
 Java/sources/org/perl/inline/java/InlineJavaServer.java      |  6 +++---
 Java/sources/org/perl/inline/java/InlineJavaUtils.java       | 12 +++++++++++-
 9 files changed, 25 insertions(+), 15 deletions(-)

diff --git a/Java/PerlInterpreter/t/02_perl_interpreter.t b/Java/PerlInterpreter/t/02_perl_interpreter.t
index 44ebe27..568bc13 100644
--- a/Java/PerlInterpreter/t/02_perl_interpreter.t
+++ b/Java/PerlInterpreter/t/02_perl_interpreter.t
@@ -105,7 +105,7 @@ class InlineJavaPerlInterpreterTests implements Runnable {
 			int debug = 0 ;
 			if (args.length > 0){
 				debug = Integer.parseInt(args[0]) ;
-				InlineJavaUtils.debug = debug ;
+				InlineJavaUtils.set_debug(debug) ;
 			}
 
 			InlineJavaPerlInterpreter.init("test") ;
diff --git a/Java/PerlNatives/PerlNatives.pm b/Java/PerlNatives/PerlNatives.pm
index 8669597..1ff54b0 100644
--- a/Java/PerlNatives/PerlNatives.pm
+++ b/Java/PerlNatives/PerlNatives.pm
@@ -2,6 +2,6 @@ package Inline::Java::PerlNatives ;
 
 use strict ;
 
-$Inline::Java::PerlNatives::VERSION = '0.50_92' ;
+$Inline::Java::PerlNatives::VERSION = '0.50_93' ;
 
 1 ;
diff --git a/Java/sources/org/perl/inline/java/InlineJavaHandle.java b/Java/sources/org/perl/inline/java/InlineJavaHandle.java
index 63ec973..681cf18 100644
--- a/Java/sources/org/perl/inline/java/InlineJavaHandle.java
+++ b/Java/sources/org/perl/inline/java/InlineJavaHandle.java
@@ -6,7 +6,7 @@ import java.io.* ;
 
 
 public class InlineJavaHandle {
-	private static String charset = "ISO-8859-1" ;
+	private static final String charset = "ISO-8859-1" ;
 
 
 	static String read(Object o, int len) throws InlineJavaException, IOException {
diff --git a/Java/sources/org/perl/inline/java/InlineJavaPerlCaller.java b/Java/sources/org/perl/inline/java/InlineJavaPerlCaller.java
index f59918e..64b5429 100644
--- a/Java/sources/org/perl/inline/java/InlineJavaPerlCaller.java
+++ b/Java/sources/org/perl/inline/java/InlineJavaPerlCaller.java
@@ -10,7 +10,7 @@ import java.io.* ;
 public class InlineJavaPerlCaller {
 	private InlineJavaServer ijs = InlineJavaServer.GetInstance() ;
 	private Thread creator = null ;
-	static private HashMap thread_callback_queues = new HashMap() ;
+	static private Map thread_callback_queues = Collections.synchronizedMap(new HashMap()) ;
 	static private ResourceBundle resources = null ;
 	static private boolean inited = false ;
 
diff --git a/Java/sources/org/perl/inline/java/InlineJavaPerlInterpreter.java b/Java/sources/org/perl/inline/java/InlineJavaPerlInterpreter.java
index 681baa6..6a24ce2 100644
--- a/Java/sources/org/perl/inline/java/InlineJavaPerlInterpreter.java
+++ b/Java/sources/org/perl/inline/java/InlineJavaPerlInterpreter.java
@@ -45,7 +45,7 @@ public class InlineJavaPerlInterpreter extends InlineJavaPerlCaller {
 			// Here we create a temporary InlineJavaServer instance in order to be able to instanciate
 			// ourselves. When we create InlineJavaPerlInterpreter, the instance will be overriden.
 			InlineJavaUtils.debug(2, "creating temporary JNI InlineJavaServer") ;
-			InlineJavaServer.jni_main(InlineJavaUtils.debug, false) ;
+			InlineJavaServer.jni_main(InlineJavaUtils.get_debug(), false) ;
 			InlineJavaUtils.debug(2, "temporary JNI InlineJavaServer created") ;
 			InlineJavaUtils.debug(2, "creating InlineJavaPerlInterpreter") ;
 			instance = new InlineJavaPerlInterpreter() ;
@@ -98,7 +98,7 @@ public class InlineJavaPerlInterpreter extends InlineJavaPerlCaller {
 	synchronized static private native void destruct() ;
 
 
-	synchronized public void destroy() {
+	synchronized static public void destroy() {
 		if (instance != null){
 			destruct() ;
 			instance = null ;
diff --git a/Java/sources/org/perl/inline/java/InlineJavaPerlNatives.java b/Java/sources/org/perl/inline/java/InlineJavaPerlNatives.java
index 3dfc0e7..5682e6a 100644
--- a/Java/sources/org/perl/inline/java/InlineJavaPerlNatives.java
+++ b/Java/sources/org/perl/inline/java/InlineJavaPerlNatives.java
@@ -7,8 +7,8 @@ import java.io.* ;
 
 public class InlineJavaPerlNatives extends InlineJavaPerlCaller {
 	static private boolean inited = false ;
-	static private HashMap registered_classes = new HashMap() ;
-	static private HashMap registered_methods = new HashMap() ;
+	static private Map registered_classes = Collections.synchronizedMap(new HashMap()) ;
+	static private Map registered_methods = Collections.synchronizedMap(new HashMap()) ;
 
 
 	protected InlineJavaPerlNatives() throws InlineJavaException {
diff --git a/Java/sources/org/perl/inline/java/InlineJavaProtocol.java b/Java/sources/org/perl/inline/java/InlineJavaProtocol.java
index 3d7937d..d758216 100644
--- a/Java/sources/org/perl/inline/java/InlineJavaProtocol.java
+++ b/Java/sources/org/perl/inline/java/InlineJavaProtocol.java
@@ -16,10 +16,10 @@ class InlineJavaProtocol {
 	private String cmd ;
 	private String response = null ;
 
-	private String encoding = "UTF-8" ;
+	private final String encoding = "UTF-8" ;
 
-	static private HashMap member_cache = new HashMap() ;
-	static private String report_version = "V2" ;
+	static private Map member_cache = Collections.synchronizedMap(new HashMap()) ;
+	static private final String report_version = "V2" ;
 
 	InlineJavaProtocol(InlineJavaServer _ijs, String _cmd) {
 		ijs = _ijs ;
diff --git a/Java/sources/org/perl/inline/java/InlineJavaServer.java b/Java/sources/org/perl/inline/java/InlineJavaServer.java
index d411b31..5584f77 100644
--- a/Java/sources/org/perl/inline/java/InlineJavaServer.java
+++ b/Java/sources/org/perl/inline/java/InlineJavaServer.java
@@ -81,10 +81,10 @@ public class InlineJavaServer {
 	}
 
 
-	private void init(int debug, boolean _native_doubles){
+	private synchronized void init(int debug, boolean _native_doubles){
 		instance = this ;
 		creator = Thread.currentThread() ;
-		InlineJavaUtils.debug = debug ;
+		InlineJavaUtils.set_debug(debug) ;
 		native_doubles = _native_doubles ;
 
 		ijucl = new InlineJavaUserClassLoader() ;
@@ -317,7 +317,7 @@ public class InlineJavaServer {
 	*/
 	public static InlineJavaServer jni_main(int debug, boolean native_doubles){
 		if (instance != null){
-			InlineJavaUtils.debug = debug ;
+			InlineJavaUtils.set_debug(debug) ;
 			InlineJavaUtils.debug(1, "recycling InlineJavaServer created by PerlInterpreter") ;
 			return instance ;
 		}
diff --git a/Java/sources/org/perl/inline/java/InlineJavaUtils.java b/Java/sources/org/perl/inline/java/InlineJavaUtils.java
index 0a56348..65426dd 100644
--- a/Java/sources/org/perl/inline/java/InlineJavaUtils.java
+++ b/Java/sources/org/perl/inline/java/InlineJavaUtils.java
@@ -7,7 +7,17 @@ import java.util.* ;
 	Creates a string representing a method signature
 */
 class InlineJavaUtils { 
-	static int debug = 0 ;
+	private static int debug = 0 ;
+
+
+	public synchronized static void set_debug(int d){
+		debug = d ;
+	}
+
+
+	public static int get_debug(){
+		return debug ;
+	}
 
 
 	static String CreateSignature(Class param[]){

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libinline-java-perl.git



More information about the Pkg-perl-cvs-commits mailing list