aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-collada/src/main/java/com/ardor3d
diff options
context:
space:
mode:
authorneothemachine <[email protected]>2013-02-11 15:00:14 +0100
committerneothemachine <[email protected]>2013-02-11 15:00:14 +0100
commit770fbc9f7660221b9a0f349e0c840c284157075b (patch)
tree633d24355a61c3d83ab6b81f32d174c4bb062b71 /ardor3d-collada/src/main/java/com/ardor3d
parent92d036b9137115922601578a95b002f776e2b0ac (diff)
parent95583e464d52079dee2f92f6d6875e5706e27ff5 (diff)
Merge branch 'master' into dependencies
Diffstat (limited to 'ardor3d-collada/src/main/java/com/ardor3d')
-rw-r--r--ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaAnimUtils.java26
-rw-r--r--ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaDOMUtil.java2
-rw-r--r--ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaInputPipe.java2
3 files changed, 15 insertions, 15 deletions
diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaAnimUtils.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaAnimUtils.java
index 379651e..5076600 100644
--- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaAnimUtils.java
+++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaAnimUtils.java
@@ -979,7 +979,7 @@ public class ColladaAnimUtils {
String accessorString = targetString.substring(accessorIndex, targetString.length());
accessorString = accessorString.replace(".", "");
- if (accessorString.startsWith("(")) {
+ if (accessorString.length() > 0 && accessorString.charAt(0) == '(') {
int endPara = accessorString.indexOf(")");
final String indexXString = accessorString.substring(1, endPara);
target.accessorIndexX = Integer.parseInt(indexXString);
@@ -1104,46 +1104,46 @@ public class ColladaAnimUtils {
private static void getElementString(final Element e, final StringBuilder str, final int depth, final int maxDepth,
final boolean showDots) {
addSpacing(str, depth);
- str.append("<");
+ str.append('<');
str.append(e.getName());
- str.append(" ");
+ str.append(' ');
final List<Attribute> attrs = e.getAttributes();
for (int i = 0; i < attrs.size(); i++) {
final Attribute attr = attrs.get(i);
str.append(attr.getName());
str.append("=\"");
str.append(attr.getValue());
- str.append("\"");
+ str.append('"');
if (i < attrs.size() - 1) {
- str.append(" ");
+ str.append(' ');
}
}
if (!e.getChildren().isEmpty() || !"".equals(e.getText())) {
- str.append(">");
+ str.append('>');
if (depth < maxDepth) {
- str.append("\n");
- for (final Element child : e.getChildren()) {
+ str.append('\n');
+ for (final Element child : (List<Element>) e.getChildren()) {
getElementString(child, str, depth + 1, maxDepth, showDots);
}
if (!"".equals(e.getText())) {
addSpacing(str, depth + 1);
str.append(e.getText());
- str.append("\n");
+ str.append('\n');
}
} else if (showDots) {
- str.append("\n");
+ str.append('\n');
addSpacing(str, depth + 1);
str.append("...");
- str.append("\n");
+ str.append('\n');
}
addSpacing(str, depth);
str.append("</");
str.append(e.getName());
- str.append(">");
+ str.append('>');
} else {
str.append("/>");
}
- str.append("\n");
+ str.append('\n');
}
private static void addSpacing(final StringBuilder str, final int depth) {
diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaDOMUtil.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaDOMUtil.java
index 2f67140..956af66 100644
--- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaDOMUtil.java
+++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaDOMUtil.java
@@ -110,7 +110,7 @@ public class ColladaDOMUtil {
}
private String parseUrl(String baseUrl) {
- if (baseUrl.startsWith("#")) {
+ if (baseUrl.length() > 1 && baseUrl.charAt(0) == '#') {
baseUrl = baseUrl.substring(1);
}
return baseUrl;
diff --git a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaInputPipe.java b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaInputPipe.java
index 3f3a87e..d883756 100644
--- a/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaInputPipe.java
+++ b/ardor3d-collada/src/main/java/com/ardor3d/extension/model/collada/jdom/ColladaInputPipe.java
@@ -142,7 +142,7 @@ public class ColladaInputPipe {
}
// String paramType = param.getAttributeValue("type");
}
- if (_paramCount > 1 && skippedParam == true) {
+ if (_paramCount > 1 && skippedParam) {
ColladaInputPipe.logger.warning("Parameter skipping not yet supported when parsing sources. "
+ _source.getAttributeValue("id"));
}