summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavor <vorgrimmlerdavid@gmx.de>2013-04-26 11:48:48 +0300
committerdavor <vorgrimmlerdavid@gmx.de>2013-04-26 11:48:48 +0300
commitdfb23736c7fce77e8dddcd7ae7d7133b0c4bdf99 (patch)
tree5d2ed0172e1ef01a2e9b57a7b62db5d761b6e56d
parentf27e8bf5bc4b1718009adb9dcb15cc8fe2037356 (diff)
Fixed java compiling error.
CdkDescriptors.java:43: cannot find symbol > symbol : variable molecule
-rw-r--r--java/CdkDescriptors.java48
1 files changed, 24 insertions, 24 deletions
diff --git a/java/CdkDescriptors.java b/java/CdkDescriptors.java
index 69c27a8..50f6379 100644
--- a/java/CdkDescriptors.java
+++ b/java/CdkDescriptors.java
@@ -34,36 +34,36 @@ class CdkDescriptors {
try {
IMolecule molecule = (IMolecule)reader.next();
engine.process(molecule);
- }
- catch (Exception e) {
- yaml.println("- {}");
- e.printStackTrace();
- continue;
- }
- Iterator it = molecule.getProperties().values().iterator();
- Boolean first = true;
- while (it.hasNext()) {
- try {
- DescriptorValue value = (DescriptorValue)it.next();
- int size = value.getValue().length();
- if (size == 1) {
- if (first) { yaml.print("- "); }
- else { yaml.print(" "); }
- yaml.println(":"+value.getNames()[0].toString() + ": " + value.getValue());
- first = false;
- }
- else {
- String[] values = value.getValue().toString().split(",");
- for (int i = 0; i < size; i++) {
+ Iterator it = molecule.getProperties().values().iterator();
+ Boolean first = true;
+ while (it.hasNext()) {
+ try {
+ DescriptorValue value = (DescriptorValue)it.next();
+ int size = value.getValue().length();
+ if (size == 1) {
if (first) { yaml.print("- "); }
else { yaml.print(" "); }
- yaml.println(":"+value.getNames()[i].toString() + ": " + values[i]);
+ yaml.println(":"+value.getNames()[0].toString() + ": " + value.getValue());
first = false;
}
+ else {
+ String[] values = value.getValue().toString().split(",");
+ for (int i = 0; i < size; i++) {
+ if (first) { yaml.print("- "); }
+ else { yaml.print(" "); }
+ yaml.println(":"+value.getNames()[i].toString() + ": " + values[i]);
+ first = false;
+ }
+ }
}
+ catch (ClassCastException e) { } // sdf properties are stored as molecules properties (strings), ignore them
+ catch (Exception e) { e.printStackTrace(); } // output nothing to yaml
}
- catch (ClassCastException e) { } // sdf properties are stored as molecules properties (strings), ignore them
- catch (Exception e) { e.printStackTrace(); } // output nothing to yaml
+ }
+ catch (Exception e) {
+ yaml.println("- {}");
+ e.printStackTrace();
+ continue;
}
}
yaml.close();