[Git][java-team/byteman][upstream] New upstream version 4.0.8

Andrius Merkys gitlab at salsa.debian.org
Wed Oct 16 10:53:39 BST 2019



Andrius Merkys pushed to branch upstream at Debian Java Maintainers / byteman


Commits:
1e0027a8 by Andrius Merkys at 2019-10-16T04:44:54Z
New upstream version 4.0.8
- - - - -


21 changed files:

- agent/pom.xml
- agent/src/main/java/org/jboss/byteman/rule/helper/Helper.java
- byteman/pom.xml
- contrib/bmunit/pom.xml
- contrib/bmunit5/pom.xml
- contrib/dtest/pom.xml
- contrib/jboss-modules-system/plugin/pom.xml
- contrib/jboss-modules-system/pom.xml
- contrib/jboss-modules-system/tests/pom.xml
- contrib/rulecheck-maven-plugin/example/pom.xml
- contrib/rulecheck-maven-plugin/pom.xml
- docs/asciidoc/pom.xml
- docs/pom.xml
- download/pom.xml
- install/pom.xml
- jigsaw/pom.xml
- layer/pom.xml
- pom.xml
- sample/pom.xml
- submit/pom.xml
- tests/pom.xml


Changes:

=====================================
agent/pom.xml
=====================================
@@ -34,7 +34,7 @@
     <parent>
         <groupId>org.jboss.byteman</groupId>
         <artifactId>byteman-root</artifactId>
-        <version>4.0.7</version>
+        <version>4.0.8</version>
     </parent>
 
     <properties>


=====================================
agent/src/main/java/org/jboss/byteman/rule/helper/Helper.java
=====================================
@@ -47,6 +47,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.ConcurrentMap;
 
 /**
  * This is the default helper class which is used to define builtin operations for rules.
@@ -315,6 +316,12 @@ public class Helper
     	    return false;
         }
 
+        //check for presence in Map before hitting the synchronization;
+        PrintStream unlockedStream = traceMap.get(identifier);
+        if (unlockedStream != null) {
+            return false;
+        }
+
         synchronized(traceMap) {
             PrintStream stream = traceMap.get(identifier);
             if (stream != null) {
@@ -351,11 +358,7 @@ public class Helper
             FileOutputStream fos;
 
             try {
-                if (file.exists()) {
-                    fos = new FileOutputStream(file, true);
-                } else {
-                    fos = new FileOutputStream(file, true);
-                }
+                fos = new FileOutputStream(file, true);
             } catch (FileNotFoundException e) {
                 // oops, just return false
                 return false;
@@ -387,10 +390,9 @@ public class Helper
         synchronized(traceMap) {
             // need to do the close while synchronized so we ensure an open cannot
             // proceed until we have flushed all changes to disk
-            PrintStream ps = traceMap.get(identifier);
+            PrintStream ps = traceMap.remove(identifier);
             if (ps != null) {
                 ps.close();
-                traceMap.remove(identifier);
                 return true;
             }
         }
@@ -410,9 +412,9 @@ public class Helper
      */
     private static boolean dotrace(Object identifier, String message)
     {
-        synchronized(traceMap) {
-            PrintStream ps = traceMap.get(identifier);
-            if (ps == null) {
+        PrintStream ps = traceMap.get(identifier);
+        if (ps == null) {
+            synchronized(traceMap) {
                 if (doTraceOpen(identifier, null)) {
                     ps = traceMap.get(identifier);
                 } else {
@@ -441,9 +443,9 @@ public class Helper
      */
     private static boolean dotraceln(Object identifier, String message)
     {
-        synchronized(traceMap) {
-            PrintStream ps = traceMap.get(identifier);
-            if (ps == null) {
+        PrintStream ps = traceMap.get(identifier);
+        if (ps == null) {
+            synchronized(traceMap) {
                 if (doTraceOpen(identifier, null)) {
                     ps = traceMap.get(identifier);
                 } else {
@@ -467,10 +469,9 @@ public class Helper
      */
     private static void doTraceException(Object id, Throwable th)
     {
-        PrintStream ps;
-        synchronized (traceMap) {
-            ps = traceMap.get(id);
-            if (ps == null) {
+        PrintStream ps = traceMap.get(id);
+        if (ps == null) {
+            synchronized (traceMap) {
                 if (id.equals("err")) {
                     ps = System.err;
                 } else {
@@ -3896,8 +3897,11 @@ public class Helper
     /**
      * a hash map used to identify trace streams from their
      * identifying objects
+     * Mutating the map requires synchronization on the traceMap;
+     * not required for read operations (or use of the stored PrintStream instances)
+     * as that is inherently racy.
      */
-    private static HashMap<Object, PrintStream> traceMap = new HashMap<Object, PrintStream>();
+    private final static ConcurrentMap<Object, PrintStream> traceMap = new ConcurrentHashMap<Object, PrintStream>();
 
     /**
      * a set used to identify settings for boolean flags associated


=====================================
byteman/pom.xml
=====================================
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.jboss.byteman</groupId>
         <artifactId>byteman-root</artifactId>
-        <version>4.0.7</version>
+        <version>4.0.8</version>
     </parent>
 
     <description>


=====================================
contrib/bmunit/pom.xml
=====================================
@@ -32,7 +32,7 @@
     <parent>
         <groupId>org.jboss.byteman</groupId>
         <artifactId>byteman-root</artifactId>
-        <version>4.0.7</version>
+        <version>4.0.8</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <build>


=====================================
contrib/bmunit5/pom.xml
=====================================
@@ -32,7 +32,7 @@
     <parent>
         <groupId>org.jboss.byteman</groupId>
         <artifactId>byteman-root</artifactId>
-        <version>4.0.7</version>
+        <version>4.0.8</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <build>


=====================================
contrib/dtest/pom.xml
=====================================
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.jboss.byteman</groupId>
         <artifactId>byteman-root</artifactId>
-        <version>4.0.7</version>
+        <version>4.0.8</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <dependencies>


=====================================
contrib/jboss-modules-system/plugin/pom.xml
=====================================
@@ -28,7 +28,7 @@
     <parent>
         <groupId>org.jboss.byteman</groupId>
         <artifactId>byteman-jboss-modules</artifactId>
-        <version>4.0.7</version>
+        <version>4.0.8</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 


=====================================
contrib/jboss-modules-system/pom.xml
=====================================
@@ -28,7 +28,7 @@
     <parent>
         <groupId>org.jboss.byteman</groupId>
         <artifactId>byteman-root</artifactId>
-        <version>4.0.7</version>
+        <version>4.0.8</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 


=====================================
contrib/jboss-modules-system/tests/pom.xml
=====================================
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>org.jboss.byteman</groupId>
 		<artifactId>byteman-jboss-modules</artifactId>
-		<version>4.0.7</version>
+		<version>4.0.8</version>
 		<relativePath>../pom.xml</relativePath>
 	</parent>
 


=====================================
contrib/rulecheck-maven-plugin/example/pom.xml
=====================================
@@ -18,7 +18,7 @@
       <plugin>
         <groupId>org.jboss.byteman</groupId>
         <artifactId>byteman-rulecheck-maven-plugin</artifactId>
-        <version>4.0.7</version>
+        <version>4.0.8</version>
         <executions>
           <execution>
             <id>rulecheck-test</id>


=====================================
contrib/rulecheck-maven-plugin/pom.xml
=====================================
@@ -32,7 +32,7 @@
 	<parent>
 		<groupId>org.jboss.byteman</groupId>
 		<artifactId>byteman-root</artifactId>
-		<version>4.0.7</version>
+		<version>4.0.8</version>
 		<relativePath>../../pom.xml</relativePath>
 	</parent>
 


=====================================
docs/asciidoc/pom.xml
=====================================
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.jboss.byteman</groupId>
     <artifactId>byteman-docs</artifactId>
-    <version>4.0.7</version>
+    <version>4.0.8</version>
   </parent>
     
   <artifactId>byteman-asciidoc</artifactId>


=====================================
docs/pom.xml
=====================================
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.jboss.byteman</groupId>
     <artifactId>byteman-root</artifactId>
-    <version>4.0.7</version>
+    <version>4.0.8</version>
   </parent>
     
   <artifactId>byteman-docs</artifactId>


=====================================
download/pom.xml
=====================================
@@ -28,7 +28,7 @@
     <parent>
         <groupId>org.jboss.byteman</groupId>
         <artifactId>byteman-root</artifactId>
-        <version>4.0.7</version>
+        <version>4.0.8</version>
     </parent>
     <description>
         The Byteman download includes the byteman agent, submit and install jars. the contributed


=====================================
install/pom.xml
=====================================
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.jboss.byteman</groupId>
         <artifactId>byteman-root</artifactId>
-        <version>4.0.7</version>
+        <version>4.0.8</version>
     </parent>
 
     <profiles>


=====================================
jigsaw/pom.xml
=====================================
@@ -41,7 +41,7 @@
     <parent>
         <groupId>org.jboss.byteman</groupId>
         <artifactId>byteman-root</artifactId>
-        <version>4.0.7</version>
+        <version>4.0.8</version>
     </parent>
     <properties>
         <!-- don't install or deploy this jar, instead use it to


=====================================
layer/pom.xml
=====================================
@@ -36,7 +36,7 @@
     <parent>
         <groupId>org.jboss.byteman</groupId>
         <artifactId>byteman-root</artifactId>
-        <version>4.0.7</version>
+        <version>4.0.8</version>
     </parent>
     <build>
         <plugins>


=====================================
pom.xml
=====================================
@@ -33,7 +33,7 @@
         into Java application and JVM runtime methods. Its primary purpose is to support execution tracing and fault
         injection testing.
     </description>
-    <version>4.0.7</version>
+    <version>4.0.8</version>
     <name>byteman-root</name>
     <url>http://www.jboss.org/byteman</url>
 
@@ -106,7 +106,7 @@
         <!-- for testing: command line args to enable debugger and verbose trace -->
         <debug.args>-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 -Dorg.jboss.byteman.verbose</debug.args>
         <!-- asm release version to use -->
-        <asm.version>7.1</asm.version>
+        <asm.version>7.2-beta</asm.version>
     </properties>
 
     <dependencyManagement>


=====================================
sample/pom.xml
=====================================
@@ -28,7 +28,7 @@
     <parent>
         <groupId>org.jboss.byteman</groupId>
         <artifactId>byteman-root</artifactId>
-        <version>4.0.7</version>
+        <version>4.0.8</version>
     </parent>
     <description>
         The Byteman sample jar contains some example helper classes and auxiliary classes used by the]


=====================================
submit/pom.xml
=====================================
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.jboss.byteman</groupId>
         <artifactId>byteman-root</artifactId>
-        <version>4.0.7</version>
+        <version>4.0.8</version>
     </parent>
     <build>
       <plugins>


=====================================
tests/pom.xml
=====================================
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.jboss.byteman</groupId>
         <artifactId>byteman-root</artifactId>
-        <version>4.0.7</version>
+        <version>4.0.8</version>
     </parent>
 
     <description>



View it on GitLab: https://salsa.debian.org/java-team/byteman/commit/1e0027a895c8277780a1a1c63d440c58629e9230

-- 
View it on GitLab: https://salsa.debian.org/java-team/byteman/commit/1e0027a895c8277780a1a1c63d440c58629e9230
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20191016/d5f6b938/attachment.html>


More information about the pkg-java-commits mailing list