felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1783403 - in /felix/trunk/webconsole-plugins/memoryusage: changelog.txt pom.xml src/main/java/org/apache/felix/webconsole/plugins/memoryusage/internal/MemoryUsageSupport.java
Date Fri, 17 Feb 2017 13:33:40 GMT
Author: cziegeler
Date: Fri Feb 17 13:33:40 2017
New Revision: 1783403

URL: http://svn.apache.org/viewvc?rev=1783403&view=rev
Log:
FELIX-5552 - Handle MemoryPoolMXBean.getUsed returning -1

Modified:
    felix/trunk/webconsole-plugins/memoryusage/changelog.txt
    felix/trunk/webconsole-plugins/memoryusage/pom.xml
    felix/trunk/webconsole-plugins/memoryusage/src/main/java/org/apache/felix/webconsole/plugins/memoryusage/internal/MemoryUsageSupport.java

Modified: felix/trunk/webconsole-plugins/memoryusage/changelog.txt
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/memoryusage/changelog.txt?rev=1783403&r1=1783402&r2=1783403&view=diff
==============================================================================
--- felix/trunk/webconsole-plugins/memoryusage/changelog.txt (original)
+++ felix/trunk/webconsole-plugins/memoryusage/changelog.txt Fri Feb 17 13:33:40 2017
@@ -1,6 +1,11 @@
-Changes from 1.0.4 to 1.0.6
+Changes from 1.0.6 to 1.0.8
 ---------------------------
+** Bug
+    * [FELIX-5552] - Handle MemoryPoolMXBean.getUsed returning -1
+
 
+Changes from 1.0.4 to 1.0.6
+---------------------------
 ** Bug
     * [FELIX-4862] - Correct version range for web console package import
 

Modified: felix/trunk/webconsole-plugins/memoryusage/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/memoryusage/pom.xml?rev=1783403&r1=1783402&r2=1783403&view=diff
==============================================================================
--- felix/trunk/webconsole-plugins/memoryusage/pom.xml (original)
+++ felix/trunk/webconsole-plugins/memoryusage/pom.xml Fri Feb 17 13:33:40 2017
@@ -15,7 +15,7 @@
     <parent>
         <groupId>org.apache.felix</groupId>
         <artifactId>felix-parent</artifactId>
-        <version>2.1</version>
+        <version>4</version>
         <relativePath>../../../pom/pom.xml</relativePath>
     </parent>
 
@@ -42,30 +42,7 @@
     </scm>
 
     <build>
-
-        <!-- add UTF-8-to-ISO translated resources -->
-        <resources>
-            <resource>
-                <directory>${basedir}/src/main/resources</directory>
-            </resource>
-            <resource>
-                <directory>target/classes</directory>
-                <includes>
-                    <include>OSGI-INF/**</include>
-                </includes>
-                <filtering>false</filtering>
-            </resource>
-        </resources>
-
         <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.5</source>
-                    <target>1.5</target>
-                </configuration>
-            </plugin>
 
             <!-- translate UTF-8 encoded properties files to ISO-8859-1 -->
             <plugin>
@@ -88,7 +65,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
-                <version>2.3.4</version>
+                <version>3.2.0</version>
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>

Modified: felix/trunk/webconsole-plugins/memoryusage/src/main/java/org/apache/felix/webconsole/plugins/memoryusage/internal/MemoryUsageSupport.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/memoryusage/src/main/java/org/apache/felix/webconsole/plugins/memoryusage/internal/MemoryUsageSupport.java?rev=1783403&r1=1783402&r2=1783403&view=diff
==============================================================================
--- felix/trunk/webconsole-plugins/memoryusage/src/main/java/org/apache/felix/webconsole/plugins/memoryusage/internal/MemoryUsageSupport.java
(original)
+++ felix/trunk/webconsole-plugins/memoryusage/src/main/java/org/apache/felix/webconsole/plugins/memoryusage/internal/MemoryUsageSupport.java
Fri Feb 17 13:33:40 2017
@@ -371,7 +371,15 @@ final class MemoryUsageSupport implement
             committedTotal += formatNumber(buf, "committed", usage.getCommitted());
             maxTotal += formatNumber(buf, "max", usage.getMax());
 
-            final long score = 100L * usage.getUsed() / usage.getMax();
+            final long score;
+            if ( usage.getMax() == -1 )
+            {
+                score = 100;
+            }
+            else
+            {
+                score = 100L * usage.getUsed() / usage.getMax();
+            }
             buf.append(",'score':'").append(score).append("%'");
 
             buf.append("},");



Mime
View raw message