Skip to content
This repository has been archived by the owner on Oct 3, 2019. It is now read-only.

more automatic formatting #3

Merged
merged 1 commit into from
May 12, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions src/main/java/org/eclipse/mat/SnapshotException.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,20 @@ public SnapshotException() {

/**
* Create snapshot exception with message and root cause.
*
* @param message
* @param cause
*/
public SnapshotException(String message, Throwable cause) {
super(message, cause);
}

/**
* Create snapshot exception with message only.
*
* @param message
*/
public SnapshotException(String message) {
super(message);
}

/**
* Create snapshot exception with root cause only.
*
* @param cause
*/
public SnapshotException(Throwable cause) {
super(cause);
Expand Down
9 changes: 3 additions & 6 deletions src/main/java/org/eclipse/mat/collect/ArrayIntBig.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ public ArrayIntBig() {
/**
* Add int to <code>IntArray</code>.
*
* @param element
* int which should be added
* @param element int which should be added
*/
public final void add(int element) {
int index = (length++) & 0x3FF;
Expand All @@ -55,8 +54,7 @@ public final void add(int element) {
/**
* Add int[] to <code>IntArray</code>.
*
* @param elements
* int[] which should be added
* @param elements int[] which should be added
*/
public final void addAll(int[] elements) {
int free = (length & 0x3FF);
Expand All @@ -78,8 +76,7 @@ public final void addAll(int[] elements) {
/**
* Get int at index from <code>IntArray</code>.
*
* @param index
* index of int which should be returned
* @param index index of int which should be returned
* @return int at index
* @throws IndexOutOfBoundsException
*/
Expand Down
35 changes: 12 additions & 23 deletions src/main/java/org/eclipse/mat/collect/ArrayIntCompressed.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ public class ArrayIntCompressed {
* Create <code>IntArrayCompressed</code> from bytes formerly got from
* {@link #toByteArray()}.
*
* @param bytes
* bytes formerly got from {@link #toByteArray()}
* @param bytes bytes formerly got from {@link #toByteArray()}
*/
public ArrayIntCompressed(byte[] bytes) {
// Take data structure
Expand All @@ -47,12 +46,9 @@ public ArrayIntCompressed(byte[] bytes) {
* the number of leading and trailing clear bits. Everything else is stored
* in the internal data structure.
*
* @param size
* number of ints to be stored
* @param leadingClearBits
* number of leading clear bits
* @param trailingClearBits
* number of trailing clear bits
* @param size number of ints to be stored
* @param leadingClearBits number of leading clear bits
* @param trailingClearBits number of trailing clear bits
*/
public ArrayIntCompressed(int size, int leadingClearBits, int trailingClearBits) {
// Initialize data structure
Expand All @@ -63,8 +59,7 @@ public ArrayIntCompressed(int size, int leadingClearBits, int trailingClearBits)
* Create <code>IntArrayCompressed</code> from ints representing the data to
* be stored in compressed form.
*
* @param ints
* ints representing the data to be stored in compressed form
* @param ints ints representing the data to be stored in compressed form
*/
public ArrayIntCompressed(int[] ints) {
// Call more general constructor
Expand All @@ -75,12 +70,9 @@ public ArrayIntCompressed(int[] ints) {
* Create <code>IntArrayCompressed</code> from ints representing the data to
* be stored in compressed form (from offset to offset+length).
*
* @param ints
* ints representing the data to be stored in compressed form
* @param offset
* offset from which on to compress the ints
* @param length
* number of ints to compress from the given array
* @param ints ints representing the data to be stored in compressed form
* @param offset offset from which on to compress the ints
* @param length number of ints to compress from the given array
*/
public ArrayIntCompressed(int[] ints, int offset, int length) {
// Determine leading and trailing clear bits
Expand Down Expand Up @@ -119,10 +111,8 @@ private void init(int size, int varyingBits, int trailingClearBits) {
/**
* Set value at the given index.
*
* @param index
* index at which the value should be set
* @param value
* value to be set at the given index
* @param index index at which the value should be set
* @param value value to be set at the given index
*/
public void set(int index, int value) {
value >>>= trailingClearBits;
Expand All @@ -144,8 +134,7 @@ public void set(int index, int value) {
/**
* Get value from the given index.
*
* @param index
* index at which the value should be set
* @param index index at which the value should be set
* @return value found at the given index
*/
public int get(int index) {
Expand Down Expand Up @@ -174,7 +163,7 @@ public int get(int index) {
* <code>IntArrayCompressed</code> can be reconstructed.
*
* @return bytes representing the internal data structure with which an
* <code>IntArrayCompressed</code> can be reconstructed
* <code>IntArrayCompressed</code> can be reconstructed
*/
public byte[] toByteArray() {
// Return data structure
Expand Down
35 changes: 12 additions & 23 deletions src/main/java/org/eclipse/mat/collect/ArrayLongCompressed.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ public class ArrayLongCompressed {
* Create <code>LongArrayCompressed</code> from bytes formerly got from
* {@link #toByteArray()}.
*
* @param bytes
* bytes formerly got from {@link #toByteArray()}
* @param bytes bytes formerly got from {@link #toByteArray()}
*/
public ArrayLongCompressed(byte[] bytes) {
// Take data structure
Expand All @@ -47,12 +46,9 @@ public ArrayLongCompressed(byte[] bytes) {
* stored, the number of leading and trailing clear bits. Everything else is
* stored in the internal data structure.
*
* @param size
* number of longs to be stored
* @param leadingClearBits
* number of leading clear bits
* @param trailingClearBits
* number of trailing clear bits
* @param size number of longs to be stored
* @param leadingClearBits number of leading clear bits
* @param trailingClearBits number of trailing clear bits
*/
public ArrayLongCompressed(int size, int leadingClearBits, int trailingClearBits) {
// Initialize data structure
Expand All @@ -63,8 +59,7 @@ public ArrayLongCompressed(int size, int leadingClearBits, int trailingClearBits
* Create <code>LongArrayCompressed</code> from longs representing the data
* to be stored in compressed form.
*
* @param longs
* longs representing the data to be stored in compressed form
* @param longs longs representing the data to be stored in compressed form
*/
public ArrayLongCompressed(long[] longs) {
// Call more general constructor
Expand All @@ -75,12 +70,9 @@ public ArrayLongCompressed(long[] longs) {
* Create <code>LongArrayCompressed</code> from longs representing the data
* to be stored in compressed form (from offset to offset+length).
*
* @param longs
* longs representing the data to be stored in compressed form
* @param offset
* offset from which on to compress the longs
* @param length
* number of longs to compress from the given array
* @param longs longs representing the data to be stored in compressed form
* @param offset offset from which on to compress the longs
* @param length number of longs to compress from the given array
*/
public ArrayLongCompressed(long[] longs, int offset, int length) {
// Determine leading and trailing clear bits
Expand Down Expand Up @@ -119,10 +111,8 @@ private void init(int size, int varyingBits, int trailingClearBits) {
/**
* Set value at the given index.
*
* @param index
* index at which the value should be set
* @param value
* value to be set at the given index
* @param index index at which the value should be set
* @param value value to be set at the given index
*/
public void set(int index, long value) {
value >>>= trailingClearBits;
Expand All @@ -144,8 +134,7 @@ public void set(int index, long value) {
/**
* Get value from the given index.
*
* @param index
* index at which the value should be set
* @param index index at which the value should be set
* @return value found at the given index
*/
public long get(int index) {
Expand Down Expand Up @@ -174,7 +163,7 @@ public long get(int index) {
* <code>LongArrayCompressed</code> can be reconstructed.
*
* @return bytes representing the internal data structure with which an
* <code>LongArrayCompressed</code> can be reconstructed
* <code>LongArrayCompressed</code> can be reconstructed
*/
public byte[] toByteArray() {
// Return data structure
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/eclipse/mat/collect/HashMapIntLong.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public interface Entry {

private static NoSuchElementException noSuchElementException = new NoSuchElementException(
"This is static exception, there is no stack trace available. It is thrown by get() method.");
//$NON-NLS-1$
//$NON-NLS-1$

private static final long serialVersionUID = 1L;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/eclipse/mat/hprof/Pass1Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
public class Pass1Parser extends AbstractParser {
private static final Pattern PATTERN_OBJ_ARRAY = Pattern.compile("^(\\[+)L(.*);$"); //$NON-NLS-1$
private static final Pattern PATTERN_PRIMITIVE_ARRAY = Pattern.compile("^(\\[+)(.)$");
//$NON-NLS-1$
//$NON-NLS-1$

private HashMapLongObject<String> class2name = new HashMapLongObject<String>();
private HashMapLongObject<Long> thread2id = new HashMapLongObject<Long>();
Expand Down
22 changes: 11 additions & 11 deletions src/main/java/org/eclipse/mat/parser/internal/DominatorTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,18 +162,18 @@ public void compute()
// retainedSetIdx is still sorted by object id
snapshot.getIndexManager()
.setReader(IndexManager.Index.DOMINATOR, new IndexWriter.IntIndexStreamer().writeTo(
IndexManager.Index.DOMINATOR.getFile(snapshot.getSnapshotInfo().getPrefix()),
new IteratorInt() {
int nextIndex = 2;
IndexManager.Index.DOMINATOR.getFile(snapshot.getSnapshotInfo().getPrefix()),
new IteratorInt() {
int nextIndex = 2;

public boolean hasNext() {
return nextIndex < dom.length;
}
public boolean hasNext() {
return nextIndex < dom.length;
}

public int next() {
return dom[nextIndex++];
}
}));
public int next() {
return dom[nextIndex++];
}
}));

int[] objectIds = new int[snapshot.getSnapshotInfo().getNumberOfObjects() + 2];
for (int i = 0; i < objectIds.length; i++)
Expand Down Expand Up @@ -518,7 +518,7 @@ public void calculateTotalSizesIterative(int e) throws SnapshotException, IOExce

dump.getIndexManager()
.setReader(Index.O2RETAINED, retained.writeTo(
IndexManager.Index.O2RETAINED.getFile(dump.getSnapshotInfo().getPrefix())));
IndexManager.Index.O2RETAINED.getFile(dump.getSnapshotInfo().getPrefix())));
retained = null;

progressListener.done();
Expand Down
46 changes: 23 additions & 23 deletions src/main/java/org/eclipse/mat/parser/internal/GarbageCleaner.java
Original file line number Diff line number Diff line change
Expand Up @@ -209,16 +209,16 @@ public static int[] clean(final PreliminaryIndexImpl idx, final SnapshotImplBuil
MessageUtil.format(Messages.GarbageCleaner_Writing, indexFile.getAbsolutePath()));
idxManager.setReader(Index.O2CLASS,
new IndexWriter.IntIndexStreamer().writeTo(indexFile, new NewObjectIntIterator() {
@Override int doGetNextInt(int index) {
return map[idx.object2classId.get(nextIndex)];
// return
// map[object2classId.get(nextIndex)];
}
@Override int doGetNextInt(int index) {
return map[idx.object2classId.get(nextIndex)];
// return
// map[object2classId.get(nextIndex)];
}

@Override int[] getMap() {
return map;
}
}));
@Override int[] getMap() {
return map;
}
}));

object2classId.close();
object2classId.delete();
Expand All @@ -239,20 +239,20 @@ public static int[] clean(final PreliminaryIndexImpl idx, final SnapshotImplBuil
// arrayObjects
idxManager.setReader(Index.A2SIZE,
new IndexWriter.IntIndexStreamer().writeTo(indexFile, new NewObjectIntIterator() {
IOne2OneIndex a2size = preA2size;
int newIndex = 0;

@Override int doGetNextInt(int index) {
int size = a2size.get(nextIndex);
if (size > 0) arrayObjects.set(newIndex);
newIndex++;
return size;
}

@Override int[] getMap() {
return map;
}
}));
IOne2OneIndex a2size = preA2size;
int newIndex = 0;

@Override int doGetNextInt(int index) {
int size = a2size.get(nextIndex);
if (size > 0) arrayObjects.set(newIndex);
newIndex++;
return size;
}

@Override int[] getMap() {
return map;
}
}));

preA2size.close();
preA2size.delete();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@
import org.eclipse.mat.snapshot.model.IStackFrame;

/**
*
* @noextend This class is not intended to be subclassed by clients. May still
* be subject of change
*
* be subject of change
*/
class StackFrameImpl implements IStackFrame {
private String text;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
import org.eclipse.mat.snapshot.model.IThreadStack;

/**
*
* @noextend This class is not intended to be subclassed by clients. May still
* be subject of change
*
* be subject of change
*/
class ThreadStackImpl implements IThreadStack {
private int threadId;
Expand Down
Loading