summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorVictor Mocanu2017-10-25 10:58:56 +0200
committerVictor Mocanu2017-10-25 10:58:56 +0200
commitc91521ab6556a4aa8aaabccf4d09b8141bb7cc92 (patch)
tree29695e6a6c9eef3a38866ac69803b5eca86604bb /src/main/java
parentfix code formatting (diff)
downloadmaster-sync-shared-c91521ab6556a4aa8aaabccf4d09b8141bb7cc92.tar.gz
master-sync-shared-c91521ab6556a4aa8aaabccf4d09b8141bb7cc92.tar.xz
master-sync-shared-c91521ab6556a4aa8aaabccf4d09b8141bb7cc92.zip
[VBox] changed comments to english, renamed some variables
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/openslx/util/vm/VboxConfig.java20
-rw-r--r--src/main/java/org/openslx/util/vm/VboxMetaData.java3
2 files changed, 11 insertions, 12 deletions
diff --git a/src/main/java/org/openslx/util/vm/VboxConfig.java b/src/main/java/org/openslx/util/vm/VboxConfig.java
index 86c5c3d..ee9cd25 100644
--- a/src/main/java/org/openslx/util/vm/VboxConfig.java
+++ b/src/main/java/org/openslx/util/vm/VboxConfig.java
@@ -75,7 +75,7 @@ public class VboxConfig
} catch ( ParserConfigurationException | SAXException | IOException e ) {
LOGGER.warn( "Could not parse .Vbox", e );
- throw new UnsupportedVirtualizerFormatException( "Konnte VBoxConfig nicht erstellen!" );
+ throw new UnsupportedVirtualizerFormatException( "Could not create VBoxConfig!" );
}
displayName = new String();
}
@@ -129,7 +129,6 @@ public class VboxConfig
setMachineName();
setOsType();
if ( checkForPlaceholders() ) {
- LOGGER.debug( "we have placeholders" );
return;
}
setHdds();
@@ -257,8 +256,7 @@ public class VboxConfig
/**
* Function used to find a node in the document
* Function returnes a NodeList of Nodes...not just a Node...even when the wanted Node a single
- * Node is
- * you get a NodeList with just one element
+ * Node is you get a NodeList with just one element
*
* @param targetTag as String
* @return nodes as NodeList
@@ -361,15 +359,15 @@ public class VboxConfig
LOGGER.warn( "Node: '" + nameOfParent + "' could not be found" );
return null;
}
- Element newTag = doc.createElement( nameOfnewNode );
+ Element newNode = doc.createElement( nameOfnewNode );
if ( !oneLiner ) {
org.w3c.dom.Text a = doc.createTextNode( "\n" );
- newTag.appendChild( a );
+ newNode.appendChild( a );
}
- parent.appendChild( newTag );
+ parent.appendChild( newNode );
- return newTag;
+ return newNode;
}
// function removes a given child and the format childNode
@@ -382,13 +380,13 @@ public class VboxConfig
parent.removeChild( node );
// HACK remove empty lines
- // format children have type 3
+ // format children (\n or \t) have type 3
if ( previousSibling.getNodeType() == 3 ) {
// the value of these Nodes are characters
String tmp = previousSibling.getNodeValue();
boolean shouldDelete = true;
- for ( int foo = 0; foo < tmp.length(); foo++ ) {
- if ( !Character.isWhitespace( tmp.charAt( foo ) ) ) {
+ for ( int i = 0; i < tmp.length(); i++ ) {
+ if ( !Character.isWhitespace( tmp.charAt( i ) ) ) {
shouldDelete = false;
break;
}
diff --git a/src/main/java/org/openslx/util/vm/VboxMetaData.java b/src/main/java/org/openslx/util/vm/VboxMetaData.java
index fc34ee1..f504c70 100644
--- a/src/main/java/org/openslx/util/vm/VboxMetaData.java
+++ b/src/main/java/org/openslx/util/vm/VboxMetaData.java
@@ -56,7 +56,7 @@ public class VboxMetaData extends VmMetaData
hdds.add( hardDisk );
}
- // DEBUG Code???? mark such code please!
+ // hey debug code here
try {
addFloppy( 0, null, true );
WriteToFile();
@@ -64,6 +64,7 @@ public class VboxMetaData extends VmMetaData
// WriteToFile exceptions here...not important for the the LOGGER
e.printStackTrace();
}
+ // end here
}
// --TODO will be needed later again