Skip to content

Commit

Permalink
Fix failures
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiddlet2666 committed Mar 5, 2024
1 parent 097670c commit b173a14
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 32 deletions.
8 changes: 0 additions & 8 deletions coherence-visualvm-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,6 @@
<artifactId>coherence-discovery</artifactId>
</dependency>

<!--- mock dependency -->
<dependency>
<groupId>com.oracle.coherence.plugin.visualvm</groupId>
<artifactId>coherence-visualvm-tracer</artifactId>
<version>1.7.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ public void restored()
CoherenceApplicationTypeFactory.initialize();

// register the tracer probes
if (provider == null)
if (m_provider == null)
{
provider = new TracerPackageProviderImpl();
m_provider = new TracerPackageProviderImpl();
}

TracerSupport.getInstance().registerPackageProvider(provider);
TracerSupport.getInstance().registerPackageProvider(m_provider);
}

/**
Expand All @@ -86,15 +86,14 @@ public void uninstalled()
CoherenceApplicationTypeFactory.shutdown();

// un-register the tracer probes
if (provider == null)
if (m_provider == null)
{
provider = new TracerPackageProviderImpl();
m_provider = new TracerPackageProviderImpl();
}

TracerSupport.getInstance().unregisterPackageProvider(provider);
TracerSupport.getInstance().unregisterPackageProvider(m_provider);
}



/**
* Provider of Coherence tracer probes.
*/
Expand All @@ -111,7 +110,7 @@ public TracerPackage<Application>[] getPackages(Application application)
{
return new ClusterMonitorPackage[] {new ClusterMonitorPackage(application)};
}
}
}

private TracerPackageProviderImpl provider;
}
private transient TracerPackageProviderImpl m_provider;
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public AbstractCoherenceMonitorProbe(int valuesCount, ProbeItemDescriptor[] item
this.f_resolver = resolver;
}

public synchronized final long[] getItemValues(long timestamp)
public final synchronized long[] getItemValues(long timestamp)
{
VisualVMModel model = f_resolver.getMonitoredData();
if (model != null)
Expand Down Expand Up @@ -91,7 +91,7 @@ protected long getValueAsLong(Object oValue)
}
if (oValue instanceof Integer)
{
return (long)((Integer)oValue);
return ((Integer)oValue);
}
if (oValue instanceof String)
{
Expand Down Expand Up @@ -126,8 +126,8 @@ protected long[] getSingValue(VisualVMModel model, VisualVMModel.DataType dataTy

private final int f_nValuesCount;

protected final long[] ZERO_VALUES2 = new long[]{0L,0L};
protected final long[] ZERO_VALUES1 = new long[]{0L};
protected static final long[] ZERO_VALUES2 = new long[]{0L,0L};
protected static final long[] ZERO_VALUES1 = new long[]{0L};

// ----- constants ------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,30 +40,29 @@ public class CustomFormatter

public CustomFormatter(int factor, String units)
{
this.factor = factor;
this.units = units;
this.m_nFactor = factor;
this.m_sUnits = units;
}

@Override
public String formatValue(long value, int format)
{
return FORMAT.format(value / (double) this.factor);
return FORMAT.format(value / (double) this.m_nFactor);
}

@Override
public String getUnits(int format)
{
return this.units;
return this.m_sUnits;
}

// ----- constants ------------------------------------------------------

private static final NumberFormat FORMAT = NumberFormat.getInstance();



// ----- data members ---------------------------------------------------

private final int factor;
private final String units;
private final int m_nFactor;
private final String m_sUnits;

}
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@
<artifactId>org-graalvm-visualvm-host</artifactId>
<version>${visualvm.version}</version>
</dependency>
<!-- trace dependency -->

<!-- tracer dependency -->
<dependency>
<groupId>org.graalvm.visualvm.modules</groupId>
<artifactId>org-graalvm-visualvm-modules-tracer</artifactId>
Expand Down

0 comments on commit b173a14

Please sign in to comment.