Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-03-29 06:26:48 -0400
committerAlexander Kurtakov2018-03-29 06:26:48 -0400
commit5251d1be37d5970412dcbe291f47948ada582556 (patch)
treeb5ff3a44bb0f342b6b78aa5276aad09dbecb0463 /org.eclipse.debug.examples.memory
parent6ac5654db62a138703356d3d9f6074228ac01ae6 (diff)
downloadeclipse.platform.debug-5251d1be37d5970412dcbe291f47948ada582556.tar.gz
eclipse.platform.debug-5251d1be37d5970412dcbe291f47948ada582556.tar.xz
eclipse.platform.debug-5251d1be37d5970412dcbe291f47948ada582556.zip
Change-Id: I6f62094af1b4ad2c679e78cc635641918f958fb4 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'org.eclipse.debug.examples.memory')
-rw-r--r--org.eclipse.debug.examples.memory/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleDebugTarget.java105
-rw-r--r--org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleMemoryBlock.java135
-rw-r--r--org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/engine/SampleEngine.java10
4 files changed, 20 insertions, 242 deletions
diff --git a/org.eclipse.debug.examples.memory/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.debug.examples.memory/.settings/org.eclipse.jdt.core.prefs
index 854ba028d..d7f607161 100644
--- a/org.eclipse.debug.examples.memory/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.debug.examples.memory/.settings/org.eclipse.jdt.core.prefs
@@ -11,8 +11,11 @@ org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
@@ -24,6 +27,7 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
+org.eclipse.jdt.core.compiler.problem.APILeak=warning
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
@@ -74,19 +78,21 @@ org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
org.eclipse.jdt.core.compiler.problem.nullReference=error
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
+org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
@@ -96,12 +102,16 @@ org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=enabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
+org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
diff --git a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleDebugTarget.java b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleDebugTarget.java
index 8b3ff934a..3f796277d 100644
--- a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleDebugTarget.java
+++ b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleDebugTarget.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013, 2015 IBM Corporation and others.
+ * Copyright (c) 2013, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -41,7 +41,7 @@ public class SampleDebugTarget extends DebugElement implements IDebugTarget, IMe
protected ILaunch fLaunch;
protected SampleEngine fEngine = new SampleEngine();
- protected ArrayList<IMemoryBlockExtension> fMemoryBlocks = new ArrayList<IMemoryBlockExtension>();
+ protected ArrayList<IMemoryBlockExtension> fMemoryBlocks = new ArrayList<>();
protected IThread fThread;
protected boolean fBusy;
@@ -56,113 +56,63 @@ public class SampleDebugTarget extends DebugElement implements IDebugTarget, IMe
fireEvent(new DebugEvent(this, DebugEvent.CREATE));
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDebugTarget#getProcess()
- */
@Override
public IProcess getProcess() {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDebugTarget#hasThreads()
- */
@Override
public boolean hasThreads() throws DebugException {
return true;
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.debug.core.model.IDebugTarget#supportsBreakpoint(org.eclipse
- * .debug.core.model.IBreakpoint)
- */
@Override
public boolean supportsBreakpoint(IBreakpoint breakpoint) {
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDebugElement#getDebugTarget()
- */
@Override
public IDebugTarget getDebugTarget() {
return this;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDebugElement#getLaunch()
- */
@Override
public ILaunch getLaunch() {
return fLaunch;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.ITerminate#canTerminate()
- */
@Override
public boolean canTerminate() {
return !fTerminate;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.ITerminate#isTerminated()
- */
@Override
public boolean isTerminated() {
return fTerminate;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.ITerminate#terminate()
- */
@Override
public void terminate() throws DebugException {
fTerminate = true;
fireEvent(new DebugEvent(this, DebugEvent.TERMINATE));
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#canResume()
- */
@Override
public boolean canResume() {
return fSuspend && !fTerminate;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#canSuspend()
- */
@Override
public boolean canSuspend() {
return !fSuspend && !fTerminate;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#isSuspended()
- */
@Override
public boolean isSuspended() {
return fSuspend;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#resume()
- */
@Override
public void resume() throws DebugException {
fSuspend = false;
@@ -170,81 +120,41 @@ public class SampleDebugTarget extends DebugElement implements IDebugTarget, IMe
fireEvent(new DebugEvent(this, DebugEvent.RESUME));
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#suspend()
- */
@Override
public void suspend() throws DebugException {
fSuspend = true;
fireEvent(new DebugEvent(getEngine().getThreads(this)[0], DebugEvent.SUSPEND));
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.debug.core.IBreakpointListener#breakpointAdded(org.eclipse
- * .debug.core.model.IBreakpoint)
- */
@Override
public void breakpointAdded(IBreakpoint breakpoint) {
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.debug.core.IBreakpointListener#breakpointRemoved(org.eclipse
- * .debug.core.model.IBreakpoint, org.eclipse.core.resources.IMarkerDelta)
- */
@Override
public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) {
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.debug.core.IBreakpointListener#breakpointChanged(org.eclipse
- * .debug.core.model.IBreakpoint, org.eclipse.core.resources.IMarkerDelta)
- */
@Override
public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDisconnect#canDisconnect()
- */
@Override
public boolean canDisconnect() {
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDisconnect#disconnect()
- */
@Override
public void disconnect() throws DebugException {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDisconnect#isDisconnected()
- */
@Override
public boolean isDisconnected() {
return false;
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.debug.core.model.IMemoryBlockRetrieval#supportsStorageRetrieval
- * ()
- */
@Override
public boolean supportsStorageRetrieval() {
return true;
@@ -266,12 +176,6 @@ public class SampleDebugTarget extends DebugElement implements IDebugTarget, IMe
fMemoryBlocks.remove(memBlk);
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.debug.core.model.IMemoryBlockRetrieval#getMemoryBlock(long,
- * long)
- */
@Override
public IMemoryBlock getMemoryBlock(long startAddress, long length) throws DebugException {
@@ -308,11 +212,6 @@ public class SampleDebugTarget extends DebugElement implements IDebugTarget, IMe
return MemoryViewSamplePlugin.PLUGIN_ID;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockRetrievalExtension#
- * getExtendedMemoryBlock(java.lang.String, java.lang.Object)
- */
@Override
public IMemoryBlockExtension getExtendedMemoryBlock(String expression, Object context) throws DebugException {
diff --git a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleMemoryBlock.java b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleMemoryBlock.java
index 6a93b4dee..06317a2d1 100644
--- a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleMemoryBlock.java
+++ b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleMemoryBlock.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013, 2015 IBM Corporation and others.
+ * Copyright (c) 2013, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -41,7 +41,7 @@ public class SampleMemoryBlock extends DebugElement implements IMemoryBlockExten
private boolean isEnabled = true;
private BigInteger fBaseAddress;
- private ArrayList<Object> fConnections = new ArrayList<Object>();
+ private ArrayList<Object> fConnections = new ArrayList<>();
/**
* Creates memory block
@@ -57,33 +57,17 @@ public class SampleMemoryBlock extends DebugElement implements IMemoryBlockExten
fBaseAddress = address;
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.debug.core.model.IMemoryBlockExtension#getBigBaseAddress()
- */
@Override
public BigInteger getBigBaseAddress() throws DebugException {
fBaseAddress = fDebugTarget.getEngine().evaluateExpression(fExpression, null);
return fBaseAddress;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#
- * supportBaseAddressModification()
- */
@Override
public boolean supportBaseAddressModification() throws DebugException {
return fDebugTarget.getEngine().suppostsBaseAddressModification(this);
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.debug.core.model.IMemoryBlockExtension#setBaseAddress(java
- * .math.BigInteger)
- */
@Override
public void setBaseAddress(BigInteger address) throws DebugException {
try {
@@ -93,24 +77,12 @@ public class SampleMemoryBlock extends DebugElement implements IMemoryBlockExten
}
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.debug.core.model.IMemoryBlockExtension#getBytesFromOffset
- * (long, long)
- */
@Override
synchronized public MemoryByte[] getBytesFromOffset(BigInteger offset, long length) throws DebugException {
BigInteger address = fBaseAddress.subtract(offset);
return getBytesFromAddress(address, length);
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.debug.core.model.IMemoryBlockExtension#getBytesFromAddress
- * (java.math.BigInteger, long)
- */
@Override
public MemoryByte[] getBytesFromAddress(BigInteger address, long length) throws DebugException {
@@ -139,12 +111,6 @@ public class SampleMemoryBlock extends DebugElement implements IMemoryBlockExten
}
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.debug.core.model.IMemoryBlockExtension#connect(java.lang.
- * Object)
- */
@Override
public void connect(Object object) {
@@ -164,12 +130,6 @@ public class SampleMemoryBlock extends DebugElement implements IMemoryBlockExten
isEnabled = true;
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.debug.core.model.IMemoryBlockExtension#disconnect(java.lang
- * .Object)
- */
@Override
public void disconnect(Object object) {
@@ -182,10 +142,6 @@ public class SampleMemoryBlock extends DebugElement implements IMemoryBlockExten
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#getConnected()
- */
@Override
public Object[] getConnections() {
return fConnections.toArray();
@@ -198,50 +154,29 @@ public class SampleMemoryBlock extends DebugElement implements IMemoryBlockExten
isEnabled = false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlock#getStartAddress()
- */
@Override
public long getStartAddress() {
// no need to implement this method as it belongs to IMemoryBlock
return 0;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlock#getLength()
- */
@Override
public long getLength() {
// no need to implement this method as it belongs to IMemoryBlock
return 0;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlock#getBytes()
- */
@Override
public byte[] getBytes() throws DebugException {
// no need to implement this method as it belongs to IMemoryBlock
return new byte[0];
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.debug.core.model.IMemoryBlock#supportsValueModification()
- */
@Override
public boolean supportsValueModification() {
return fDebugTarget.getEngine().supportsValueModification(this);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlock#setValue(long, byte[])
- */
@Override
public void setValue(BigInteger offset, byte[] bytes) throws DebugException {
try {
@@ -255,37 +190,21 @@ public class SampleMemoryBlock extends DebugElement implements IMemoryBlockExten
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDebugElement#getModelIdentifier()
- */
@Override
public String getModelIdentifier() {
return getDebugTarget().getModelIdentifier();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDebugElement#getDebugTarget()
- */
@Override
public IDebugTarget getDebugTarget() {
return fDebugTarget;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDebugElement#getLaunch()
- */
@Override
public ILaunch getLaunch() {
return fDebugTarget.getLaunch();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
@SuppressWarnings("unchecked")
@Override
public <T> T getAdapter(Class<T> adapter) {
@@ -301,19 +220,11 @@ public class SampleMemoryBlock extends DebugElement implements IMemoryBlockExten
return super.getAdapter(adapter);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#getExpression()
- */
@Override
public String getExpression() {
return fExpression;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#dispose()
- */
@Override
public void dispose() throws DebugException {
// remove this memory block from debug target
@@ -327,48 +238,26 @@ public class SampleMemoryBlock extends DebugElement implements IMemoryBlockExten
return isEnabled;
}
- /*
- * (non-Javadoc)
- * @see
- * com.ibm.debug.extended.ui.IMemoryBlockExtension#getMemoryBlockRetrieval()
- */
@Override
public IMemoryBlockRetrieval getMemoryBlockRetrieval() {
return getDebugTarget();
}
- /**
- *
- */
private void fireContentChangeEvent() {
DebugEvent evt = new DebugEvent(this, DebugEvent.CHANGE);
fireEvent(evt);
}
- /*
- * (non-Javadoc)
- * @see
- * com.ibm.debug.extended.ui.IMemoryBlockExtension#isMemoryChangesManaged()
- */
@Override
public boolean supportsChangeManagement() {
return false;
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.debug.core.model.IMemoryBlockExtension#getAddressableSize()
- */
@Override
public int getAddressableSize() throws DebugException {
return fDebugTarget.getEngine().getAddressableSize();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#getAddressSize()
- */
@Override
public int getAddressSize() throws DebugException {
try {
@@ -378,12 +267,6 @@ public class SampleMemoryBlock extends DebugElement implements IMemoryBlockExten
}
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.debug.core.model.IMemoryBlockExtension#getMemoryBlockStartAddress
- * ()
- */
@Override
public BigInteger getMemoryBlockStartAddress() throws DebugException {
@@ -395,12 +278,6 @@ public class SampleMemoryBlock extends DebugElement implements IMemoryBlockExten
return null;
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.debug.core.model.IMemoryBlockExtension#getMemoryBlockEndAddress
- * ()
- */
@Override
public BigInteger getMemoryBlockEndAddress() throws DebugException {
@@ -412,19 +289,11 @@ public class SampleMemoryBlock extends DebugElement implements IMemoryBlockExten
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlock#setValue(long, byte[])
- */
@Override
public void setValue(long offset, byte[] bytes) throws DebugException {
// do not need to implement for IMemoryBlockExtension
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockExtension#getBigLength()
- */
@Override
public BigInteger getBigLength() throws DebugException {
// return -1 by default and default length is calculated
diff --git a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/engine/SampleEngine.java b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/engine/SampleEngine.java
index 7416b357f..e10870f55 100644
--- a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/engine/SampleEngine.java
+++ b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/engine/SampleEngine.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 IBM Corporation and others.
+ * Copyright (c) 2013, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -33,9 +33,9 @@ public class SampleEngine {
Random fRandom = new Random();
byte[] fMemory;
Hashtable<BigInteger, SampleMemoryUnit> memoryBlockTable;
- Hashtable<String, BigInteger> expressionAddressTable = new Hashtable<String, BigInteger>();
- Hashtable<SampleDebugTarget, Object> threadTable = new Hashtable<SampleDebugTarget, Object>();
- Hashtable<SampleThread, Object> stackframeTable = new Hashtable<SampleThread, Object>();
+ Hashtable<String, BigInteger> expressionAddressTable = new Hashtable<>();
+ Hashtable<SampleDebugTarget, Object> threadTable = new Hashtable<>();
+ Hashtable<SampleThread, Object> stackframeTable = new Hashtable<>();
Random random = new Random();
@@ -51,7 +51,7 @@ public class SampleEngine {
if (memoryBlockTable == null) {
// create new memoryBlock table
- memoryBlockTable = new Hashtable<BigInteger, SampleMemoryUnit>();
+ memoryBlockTable = new Hashtable<>();
byte[] bytes = new byte[(int) length * getAddressableSize()];
BigInteger addressKey = address;

Back to the top