Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2016-04-21 19:22:03 -0400
committerSergey Prigogin2016-04-21 19:22:03 -0400
commite901d4a7d4298b999365288b6b5b8d018b75ae73 (patch)
tree0961aec2a6ca7ad2f890719382d71be254b19234 /codan/org.eclipse.cdt.codan.core
parent9f79b897c143fbbd6a6463399b890c4de5679737 (diff)
downloadorg.eclipse.cdt-e901d4a7d4298b999365288b6b5b8d018b75ae73.tar.gz
org.eclipse.cdt-e901d4a7d4298b999365288b6b5b8d018b75ae73.tar.xz
org.eclipse.cdt-e901d4a7d4298b999365288b6b5b8d018b75ae73.zip
Cosmetics.
Diffstat (limited to 'codan/org.eclipse.cdt.codan.core')
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/ListProblemPreference.java29
1 files changed, 14 insertions, 15 deletions
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/ListProblemPreference.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/ListProblemPreference.java
index d52c315317..b210c07904 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/ListProblemPreference.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/ListProblemPreference.java
@@ -21,11 +21,11 @@ import java.util.Iterator;
*
* @noextend This class is not intended to be extended by clients.
*/
-public class ListProblemPreference extends AbstractProblemPreference implements IProblemPreferenceCompositeValue,
- IProblemPreferenceCompositeDescriptor {
+public class ListProblemPreference extends AbstractProblemPreference
+ implements IProblemPreferenceCompositeValue, IProblemPreferenceCompositeDescriptor {
/**
* Constant that represent a key for "shared" child preference (descriptor)
- * of all elements
+ * of all elements.
*/
public static final String COMMON_DESCRIPTOR_KEY = "#"; //$NON-NLS-1$
protected ArrayList<Object> list = new ArrayList<Object>();
@@ -48,7 +48,7 @@ public class ListProblemPreference extends AbstractProblemPreference implements
}
/**
- * Set child descriptor (all elements have the same). Value and key
+ * Sets child descriptor (all elements have the same). Value and key
* of it would be ignored and reset.
*
* @param desc
@@ -80,7 +80,6 @@ public class ListProblemPreference extends AbstractProblemPreference implements
}
/**
- *
* @return descriptor of the child elements
*/
public IProblemPreference getChildDescriptor() {
@@ -106,8 +105,7 @@ public class ListProblemPreference extends AbstractProblemPreference implements
* Get read only problem preference for element equal to key's int value.
* If key is null or # return generic descriptor with null value.
*
- * @throws NumberFormatException
- * if key is not number
+ * @throws NumberFormatException if key is not number
*/
@Override
public IProblemPreference getChildDescriptor(String key) throws NumberFormatException {
@@ -126,7 +124,7 @@ public class ListProblemPreference extends AbstractProblemPreference implements
}
/**
- * Return array of clones values of child preferences.
+ * Returns array of clones values of child preferences.
*/
@Override
public IProblemPreference[] getChildDescriptors() {
@@ -219,7 +217,7 @@ public class ListProblemPreference extends AbstractProblemPreference implements
@Override
public void importValue(String str) {
- if (str.length()==0) return;
+ if (str.isEmpty()) return;
StreamTokenizer tokenizer = getImportTokenizer(str);
try {
importValue(tokenizer);
@@ -239,10 +237,11 @@ public class ListProblemPreference extends AbstractProblemPreference implements
if (token != '(')
throw new IllegalArgumentException(chara);
token = tokenizer.nextToken();
- if (token != ')')
+ if (token != ')') {
tokenizer.pushBack();
- else
+ } else {
return;
+ }
while (true) {
String ik = String.valueOf(index);
IProblemPreference desc = getChildDescriptor(ik);
@@ -263,15 +262,15 @@ public class ListProblemPreference extends AbstractProblemPreference implements
}
/**
- * If info key is '#' resets common descriptor to null, otherwise removes
- * value
+ * If info key is '#' resets common descriptor to null, otherwise removes value.
*/
@Override
public void removeChildDescriptor(IProblemPreference info) {
- if (info.getKey().equals(COMMON_DESCRIPTOR_KEY))
+ if (info.getKey().equals(COMMON_DESCRIPTOR_KEY)) {
setChildDescriptor(null);
- else
+ } else {
removeChildValue(info.getKey());
+ }
}
/**

Back to the top