Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r3740 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: flowsa/components ma

Subject: perfsonar development work

List archive

perfsonar: r3740 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: flowsa/components ma


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r3740 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: flowsa/components ma
  • Date: Sat, 19 Apr 2008 15:32:12 -0400

Author: michael.bischoff
Date: 2008-04-19 15:32:10 -0400 (Sat, 19 Apr 2008)
New Revision: 3740

Modified:

branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/RouterPanel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MAMetadataList.java
Log:
null pointer fixes

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/RouterPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/RouterPanel.java
2008-04-19 18:56:05 UTC (rev 3739)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/RouterPanel.java
2008-04-19 19:32:10 UTC (rev 3740)
@@ -64,6 +64,10 @@

public void update(Observable o, Object arg) {
MAEndpoint newEndpoint = model.getEndpoint();
+ if(newEndpoint==null) {
+ checkListModel.clear();
+ return;
+ }
if(oldEndPoint == newEndpoint.getEndpoint()) {
return;

}

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MAMetadataList.java
===================================================================
--- branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MAMetadataList.java
2008-04-19 18:56:05 UTC (rev 3739)
+++ branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MAMetadataList.java
2008-04-19 19:32:10 UTC (rev 3740)
@@ -47,7 +47,10 @@
public Number getUtilizationIn(int index) {
Double utilization;
try {
- utilization = new
Double(getUserData(index).getUtilizationIn());
+ UserData data = getUserData(index);
+ if(data==null)
+ return DoubleZERO;
+ utilization = new
Double(data.getUtilizationIn());
if (utilization.doubleValue() > 100)
return Double100;
if (utilization.doubleValue() < eps)
@@ -61,7 +64,10 @@
public Number getUtilizationOut(int index) {
Double utilization;
try {
- utilization = new
Double(getUserData(index).getUtilizationOut());
+ UserData data = getUserData(index);
+ if(data==null)
+ return DoubleZERO;
+ utilization = new
Double(data.getUtilizationOut());
if (utilization.doubleValue() > 100)
return Double100;
if (utilization.doubleValue() < eps)



  • perfsonar: r3740 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: flowsa/components ma, svnlog, 04/19/2008

Archive powered by MHonArc 2.6.16.

Top of Page