Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegisterData.java')
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegisterData.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegisterData.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegisterData.java
index 05a12cd5e..27c1874d2 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegisterData.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegisterData.java
@@ -4,9 +4,10 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
+ * IBM Corporation - bug fixing
*******************************************************************************/
package org.eclipse.debug.examples.core.pda.protocol;
@@ -16,8 +17,8 @@ import java.util.StringTokenizer;
/**
* Object representing a register in the registers command results.
- *
- * @see PDARCommand
+ *
+ * @see PDARCommand
*/
public class PDARegisterData {
@@ -25,19 +26,19 @@ public class PDARegisterData {
final public String fName;
final public boolean fWritable;
final public PDABitFieldData[] fBitFields;
-
+
PDARegisterData(String regString) {
StringTokenizer st = new StringTokenizer(regString, "|"); //$NON-NLS-1$
-
+
String regInfo = st.nextToken();
StringTokenizer regSt = new StringTokenizer(regInfo, " "); //$NON-NLS-1$
fName = regSt.nextToken();
fWritable = Boolean.getBoolean(regSt.nextToken());
-
- List bitFieldsList = new ArrayList();
+
+ List<PDABitFieldData> bitFieldsList = new ArrayList<PDABitFieldData>();
while (st.hasMoreTokens()) {
bitFieldsList.add(new PDABitFieldData(st.nextToken()));
}
- fBitFields = (PDABitFieldData[])bitFieldsList.toArray(new PDABitFieldData[bitFieldsList.size()]);
+ fBitFields = bitFieldsList.toArray(new PDABitFieldData[bitFieldsList.size()]);
}
} \ No newline at end of file

Back to the top