diff --git a/apis/atmos/src/main/java/org/jclouds/atmos/xml/ErrorHandler.java b/apis/atmos/src/main/java/org/jclouds/atmos/xml/ErrorHandler.java index 4b82dac546..dbc9dcb8de 100644 --- a/apis/atmos/src/main/java/org/jclouds/atmos/xml/ErrorHandler.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/xml/ErrorHandler.java @@ -39,7 +39,7 @@ public class ErrorHandler extends ParseSax.HandlerWithResult { } else if (qName.equals("Message")) { this.message = currentText.toString().trim(); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/atmos/src/main/java/org/jclouds/atmos/xml/ListDirectoryResponseHandler.java b/apis/atmos/src/main/java/org/jclouds/atmos/xml/ListDirectoryResponseHandler.java index 309214b3cd..2fd0697970 100644 --- a/apis/atmos/src/main/java/org/jclouds/atmos/xml/ListDirectoryResponseHandler.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/xml/ListDirectoryResponseHandler.java @@ -55,7 +55,7 @@ public class ListDirectoryResponseHandler extends ParseSax.HandlerWithResult { if (qName.equals("publicIp")) { ipAddress = currentOrNull(); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/xml/AttachmentHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/AttachmentHandler.java index af532fa39d..7bb31f79fa 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/xml/AttachmentHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/AttachmentHandler.java @@ -73,7 +73,7 @@ public class AttachmentHandler extends ParseSax.HandlerForGeneratedRequestWithRe } else if (qName.equals("attachTime")) { attachTime = dateCodec.toDate(currentText.toString().trim()); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/xml/BaseReservationHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/BaseReservationHandler.java index 969d8acf69..4422da2699 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/xml/BaseReservationHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/BaseReservationHandler.java @@ -178,7 +178,7 @@ public abstract class BaseReservationHandler extends HandlerForGeneratedReque this.attachTime = null; this.deleteOnTermination = true; } - currentText = new StringBuilder(); + currentText.setLength(0); } diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/xml/BlockDeviceMappingHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/BlockDeviceMappingHandler.java index 962a53e3d7..8e2f514d55 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/xml/BlockDeviceMappingHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/BlockDeviceMappingHandler.java @@ -69,7 +69,7 @@ public class BlockDeviceMappingHandler extends this.attachmentStatus = null; this.attachTime = null; } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/xml/BooleanValueHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/BooleanValueHandler.java index b04386452d..17a69988ab 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/xml/BooleanValueHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/BooleanValueHandler.java @@ -36,7 +36,7 @@ public class BooleanValueHandler extends ParseSax.HandlerWithResult { if (qName.equalsIgnoreCase("value")) { this.value = Boolean.parseBoolean(currentText.toString().trim()); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/xml/BundleTaskHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/BundleTaskHandler.java index 48419af912..dd3dd0efc3 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/xml/BundleTaskHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/BundleTaskHandler.java @@ -98,7 +98,7 @@ public class BundleTaskHandler extends ParseSax.HandlerForGeneratedRequestWithRe } else if (qName.equals("updateTime")) { updateTime = dateCodec.toDate(currentText.toString().trim()); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/xml/CreateVolumeResponseHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/CreateVolumeResponseHandler.java index af910a70d4..db6ae45c2a 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/xml/CreateVolumeResponseHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/CreateVolumeResponseHandler.java @@ -145,7 +145,7 @@ public class CreateVolumeResponseHandler extends ParseSax.HandlerForGeneratedReq } } - currentText = new StringBuilder(); + currentText.setLength(0); } private Volume newVolume() { diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeAddressesResponseHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeAddressesResponseHandler.java index dd0a1e14fe..d07b00b72d 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeAddressesResponseHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeAddressesResponseHandler.java @@ -61,7 +61,7 @@ public class DescribeAddressesResponseHandler extends ipAddress = null; instanceId = null; } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeAvailabilityZonesResponseHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeAvailabilityZonesResponseHandler.java index 403979470f..43be76464c 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeAvailabilityZonesResponseHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeAvailabilityZonesResponseHandler.java @@ -90,7 +90,7 @@ public class DescribeAvailabilityZonesResponseHandler extends ParseSax.HandlerWi this.zoneState = null; this.messages = Sets.newHashSet(); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeImagesResponseHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeImagesResponseHandler.java index 8cfea0ff98..55a2c92d31 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeImagesResponseHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeImagesResponseHandler.java @@ -219,7 +219,7 @@ public class DescribeImagesResponseHandler extends ParseSax.HandlerForGeneratedR } } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeKeyPairsResponseHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeKeyPairsResponseHandler.java index b3a19dfe29..aaea0e0467 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeKeyPairsResponseHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeKeyPairsResponseHandler.java @@ -74,7 +74,7 @@ public class DescribeKeyPairsResponseHandler extends ParseSax.HandlerForGenerate } else if (qName.equals("keyName")) { builder.keyName(currentOrNull(currentText)); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeRegionsResponseHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeRegionsResponseHandler.java index b0dab5e313..dfda6c2e5a 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeRegionsResponseHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/DescribeRegionsResponseHandler.java @@ -54,7 +54,7 @@ public class DescribeRegionsResponseHandler extends ParseSax.HandlerWithResult { if (qName.equalsIgnoreCase("ImageId")) { this.imageId = currentText.toString().trim(); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/xml/InstanceInitiatedShutdownBehaviorHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/InstanceInitiatedShutdownBehaviorHandler.java index 1fb81b6d06..676830d124 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/xml/InstanceInitiatedShutdownBehaviorHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/InstanceInitiatedShutdownBehaviorHandler.java @@ -38,7 +38,7 @@ public class InstanceInitiatedShutdownBehaviorHandler extends if (qName.equalsIgnoreCase("value")) { this.behavior = InstanceInitiatedShutdownBehavior.fromValue(currentText.toString().trim()); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/xml/InstanceStateChangeHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/InstanceStateChangeHandler.java index 5290e6b688..9e5fda5dd5 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/xml/InstanceStateChangeHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/InstanceStateChangeHandler.java @@ -97,7 +97,7 @@ public class InstanceStateChangeHandler extends this.previousState = null; } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/xml/InstanceTypeHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/InstanceTypeHandler.java index 6572c0eba7..9d76cc4d99 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/xml/InstanceTypeHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/InstanceTypeHandler.java @@ -37,7 +37,7 @@ public class InstanceTypeHandler extends if (qName.equalsIgnoreCase("value")) { this.type = currentText.toString().trim(); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/xml/IpPermissionHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/IpPermissionHandler.java index 83393fb661..61e6de0bfa 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/xml/IpPermissionHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/IpPermissionHandler.java @@ -72,7 +72,7 @@ public class IpPermissionHandler extends ParseSax.HandlerForGeneratedRequestWith builder.tenantIdGroupNamePair(userId, groupId); userId = groupId = null; } - currentText = new StringBuilder(); + currentText.setLength(0); } private static String currentOrNegative(StringBuilder currentText) { diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/xml/KeyPairResponseHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/KeyPairResponseHandler.java index 59f8f8f707..f99c2a8378 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/xml/KeyPairResponseHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/KeyPairResponseHandler.java @@ -69,7 +69,7 @@ public class KeyPairResponseHandler extends ParseSax.HandlerForGeneratedRequestW } else if (qName.equals("keyName")) { builder.keyName(currentOrNull(currentText)); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/xml/PermissionHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/PermissionHandler.java index 0eef83fa9e..258f1e2737 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/xml/PermissionHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/PermissionHandler.java @@ -45,7 +45,7 @@ public class PermissionHandler extends ParseSax.HandlerWithResult { } else if (qName.equalsIgnoreCase("userId")) { userIds.add(currentText.toString().trim()); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/xml/SecurityGroupHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/SecurityGroupHandler.java index f5ea378f5b..ebb37e5a13 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/xml/SecurityGroupHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/SecurityGroupHandler.java @@ -113,7 +113,7 @@ public class SecurityGroupHandler extends ParseSax.HandlerForGeneratedRequestWit } else if (equalsOrSuffix(qName, "groupDescription")) { builder.description(currentOrNull(currentText)); } - currentText = new StringBuilder(); + currentText.setLength(0); } protected void endItem(String uri, String name, String qName) throws SAXException { diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/xml/SnapshotHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/SnapshotHandler.java index bf4ebc61ce..f8ac96b0a3 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/xml/SnapshotHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/SnapshotHandler.java @@ -94,7 +94,7 @@ public class SnapshotHandler extends ParseSax.HandlerForGeneratedRequestWithResu } else if (qName.equals("ownerAlias")) { ownerAlias = currentText.toString().trim(); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/xml/StringValueHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/StringValueHandler.java index 5e1d0e5714..c4a114940b 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/xml/StringValueHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/StringValueHandler.java @@ -37,7 +37,7 @@ public class StringValueHandler extends if (qName.equalsIgnoreCase("value")) { this.value = currentText.toString().trim(); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/xml/SubnetHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/SubnetHandler.java index f254140965..f3fc5cab3e 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/xml/SubnetHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/SubnetHandler.java @@ -78,7 +78,7 @@ public class SubnetHandler extends ParseSax.HandlerForGeneratedRequestWithResult } else if (equalsOrSuffix(qName, "availabilityZone")) { builder.availabilityZone(currentOrNull(currentText)); } - currentText = new StringBuilder(); + currentText.setLength(0); } @Override diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/xml/TagHandler.java b/apis/ec2/src/main/java/org/jclouds/ec2/xml/TagHandler.java index d3f34d04dc..c4e4b6d692 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/xml/TagHandler.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/xml/TagHandler.java @@ -62,7 +62,7 @@ public class TagHandler extends ParseSax.HandlerForGeneratedRequestWithResult extends ParseSax.HandlerFo if (qName.equals(elementName)) { text = currentOrNull(currentText); } - currentText = new StringBuilder(); + currentText.setLength(0); } @Override diff --git a/apis/sts/src/main/java/org/jclouds/aws/xml/ErrorHandler.java b/apis/sts/src/main/java/org/jclouds/aws/xml/ErrorHandler.java index a491093e84..3cf015c9e2 100644 --- a/apis/sts/src/main/java/org/jclouds/aws/xml/ErrorHandler.java +++ b/apis/sts/src/main/java/org/jclouds/aws/xml/ErrorHandler.java @@ -46,7 +46,7 @@ public class ErrorHandler extends ParseSax.HandlerWithResult { } else if (!qName.equals("Error")) { error.getDetails().put(qName, currentText.toString().trim()); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/sts/src/main/java/org/jclouds/aws/xml/SessionCredentialsHandler.java b/apis/sts/src/main/java/org/jclouds/aws/xml/SessionCredentialsHandler.java index 965e41c36c..88804f0f90 100644 --- a/apis/sts/src/main/java/org/jclouds/aws/xml/SessionCredentialsHandler.java +++ b/apis/sts/src/main/java/org/jclouds/aws/xml/SessionCredentialsHandler.java @@ -64,7 +64,7 @@ public class SessionCredentialsHandler extends ParseSax.HandlerForGeneratedReque builder.expiration(dateService.iso8601DateParse(currentOrNull(currentText))); } } - currentText = new StringBuilder(); + currentText.setLength(0); } @Override diff --git a/apis/sts/src/main/java/org/jclouds/sts/xml/UserAndSessionCredentialsHandler.java b/apis/sts/src/main/java/org/jclouds/sts/xml/UserAndSessionCredentialsHandler.java index 03e25d7f01..4d7705e919 100644 --- a/apis/sts/src/main/java/org/jclouds/sts/xml/UserAndSessionCredentialsHandler.java +++ b/apis/sts/src/main/java/org/jclouds/sts/xml/UserAndSessionCredentialsHandler.java @@ -83,7 +83,7 @@ public class UserAndSessionCredentialsHandler extends ParseSax.HandlerForGenerat } else if (qName.equals("PackedPolicySize")) { builder.packedPolicySize(Integer.parseInt(currentOrNull(currentText))); } - currentText = new StringBuilder(); + currentText.setLength(0); } @Override diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/CatalogHandler.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/CatalogHandler.java index 60bd01f8e8..41546dfd9f 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/CatalogHandler.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/CatalogHandler.java @@ -87,7 +87,7 @@ public class CatalogHandler extends ParseSax.HandlerWithResult { } else if (SaxUtils.equalsOrSuffix(qName, "IsPublished")) { published = Boolean.parseBoolean(currentOrNull()); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/CatalogItemHandler.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/CatalogItemHandler.java index 926e8a893a..0a5e1a265e 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/CatalogItemHandler.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/CatalogItemHandler.java @@ -64,7 +64,7 @@ public class CatalogItemHandler extends ParseSax.HandlerWithResult properties.put(key, currentOrNull()); key = null; } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/GuestCustomizationSectionHandler.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/GuestCustomizationSectionHandler.java index 3fb22276b0..548ea421cf 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/GuestCustomizationSectionHandler.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/GuestCustomizationSectionHandler.java @@ -75,7 +75,7 @@ public class GuestCustomizationSectionHandler extends ParseSax.HandlerWithResult public void startElement(String uri, String localName, String qName, Attributes attrs) { Map attributes = SaxUtils.cleanseAttributes(attrs); - this.currentText = new StringBuilder(); + this.currentText.setLength(0); if (qName.endsWith("GuestCustomizationSection")) { guest = newReferenceType(attributes); } else if (qName.endsWith("Link") && "edit".equals(attributes.get("rel"))) { @@ -120,7 +120,7 @@ public class GuestCustomizationSectionHandler extends ParseSax.HandlerWithResult } else if (qName.endsWith("Name")) { this.name = currentOrNull(); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/NetworkConnectionHandler.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/NetworkConnectionHandler.java index aefb753c2a..0224a30fe5 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/NetworkConnectionHandler.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/NetworkConnectionHandler.java @@ -70,7 +70,7 @@ public class NetworkConnectionHandler extends ParseSax.HandlerWithResult { } else if (qName.endsWith("FullName")) { fullName = currentOrNull(); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgNetworkHandler.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgNetworkHandler.java index 521f086b81..a4e3044be5 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgNetworkHandler.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/OrgNetworkHandler.java @@ -308,7 +308,7 @@ public class OrgNetworkHandler extends ParseSax.HandlerWithResult { } else if (SaxUtils.equalsOrSuffix(qName, "AllowedExternalIpAddress")) { allowedExternalIpAddresses.add(currentOrNull()); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/SupportedVersionsHandler.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/SupportedVersionsHandler.java index 3e393ac482..d778da51f6 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/SupportedVersionsHandler.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/SupportedVersionsHandler.java @@ -43,7 +43,7 @@ public class SupportedVersionsHandler extends ParseSax.HandlerWithResult { } else if (equalsOrSuffix(qName, "ovfDescriptorUploaded")) { ovfDescriptorUploaded = Boolean.parseBoolean(SaxUtils.currentOrNull(currentText)); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/VAppTemplateHandler.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/VAppTemplateHandler.java index 2476c16443..d0cd121115 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/VAppTemplateHandler.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/VAppTemplateHandler.java @@ -128,7 +128,7 @@ public class VAppTemplateHandler extends ParseSax.HandlerWithResult { } else if (qName.endsWith("IsEnabled")) { isEnabled = Boolean.parseBoolean(currentOrNull()); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/VmHandler.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/VmHandler.java index dd044774cb..f68ee07201 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/VmHandler.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/VmHandler.java @@ -150,7 +150,7 @@ public class VmHandler extends ParseSax.HandlerWithResult { } else if (SaxUtils.equalsOrSuffix(qName, "VAppScopedLocalId")) { vAppScopedLocalId = currentOrNull(); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/ovf/VCloudOperatingSystemHandler.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/ovf/VCloudOperatingSystemHandler.java index 058e76ae5d..37866de35c 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/ovf/VCloudOperatingSystemHandler.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/xml/ovf/VCloudOperatingSystemHandler.java @@ -69,7 +69,7 @@ public class VCloudOperatingSystemHandler extends ParseSax.HandlerWithResult } else if (!qName.equals("Error")) { error.getDetails().put(qName, currentText.toString()); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/compute/src/main/java/org/jclouds/cim/xml/ResourceAllocationSettingDataHandler.java b/compute/src/main/java/org/jclouds/cim/xml/ResourceAllocationSettingDataHandler.java index dc0d6e7ea3..519e1b3f76 100644 --- a/compute/src/main/java/org/jclouds/cim/xml/ResourceAllocationSettingDataHandler.java +++ b/compute/src/main/java/org/jclouds/cim/xml/ResourceAllocationSettingDataHandler.java @@ -95,7 +95,7 @@ public class ResourceAllocationSettingDataHandler extends ParseSax.HandlerWithRe builder.hostResource(current); } } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/compute/src/main/java/org/jclouds/cim/xml/VirtualSystemSettingDataHandler.java b/compute/src/main/java/org/jclouds/cim/xml/VirtualSystemSettingDataHandler.java index c64a6cb60e..52feaf25d4 100644 --- a/compute/src/main/java/org/jclouds/cim/xml/VirtualSystemSettingDataHandler.java +++ b/compute/src/main/java/org/jclouds/cim/xml/VirtualSystemSettingDataHandler.java @@ -97,7 +97,7 @@ public class VirtualSystemSettingDataHandler extends ParseSax.HandlerWithResult< builder.notes(current); } } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/compute/src/main/java/org/jclouds/ovf/xml/SectionHandler.java b/compute/src/main/java/org/jclouds/ovf/xml/SectionHandler.java index 63e70578cc..a8d130310d 100644 --- a/compute/src/main/java/org/jclouds/ovf/xml/SectionHandler.java +++ b/compute/src/main/java/org/jclouds/ovf/xml/SectionHandler.java @@ -61,7 +61,7 @@ public class SectionHandler, B extends Section.Builder> if (equalsOrSuffix(qName, "Info")) { builder.info(currentOrNull(currentText)); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/core/src/main/java/org/jclouds/http/UriTemplates.java b/core/src/main/java/org/jclouds/http/UriTemplates.java index 68f532bb47..db81dc78b9 100644 --- a/core/src/main/java/org/jclouds/http/UriTemplates.java +++ b/core/src/main/java/org/jclouds/http/UriTemplates.java @@ -54,7 +54,7 @@ public class UriTemplates { builder.append(value); else builder.append('{').append(key).append('}'); - var = new StringBuilder(); + var.setLength(0); break; default: if (inVar) diff --git a/core/src/test/java/org/jclouds/http/IntegrationTestAsyncClient.java b/core/src/test/java/org/jclouds/http/IntegrationTestAsyncClient.java index 9265488ddc..dff2bca789 100644 --- a/core/src/test/java/org/jclouds/http/IntegrationTestAsyncClient.java +++ b/core/src/test/java/org/jclouds/http/IntegrationTestAsyncClient.java @@ -179,7 +179,7 @@ public interface IntegrationTestAsyncClient extends Closeable { if (qName.equals("bar")) { bar = currentText.toString(); } - currentText = new StringBuilder(); + currentText.setLength(0); } @Override diff --git a/core/src/test/java/org/jclouds/http/IntegrationTestClient.java b/core/src/test/java/org/jclouds/http/IntegrationTestClient.java index ba8d4d0f29..27ec54b2fe 100644 --- a/core/src/test/java/org/jclouds/http/IntegrationTestClient.java +++ b/core/src/test/java/org/jclouds/http/IntegrationTestClient.java @@ -177,7 +177,7 @@ public interface IntegrationTestClient extends Closeable { if (qName.equals("bar")) { bar = currentText.toString(); } - currentText = new StringBuilder(); + currentText.setLength(0); } @Override diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/AWSEC2DescribeSecurityGroupsResponseHandler.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/AWSEC2DescribeSecurityGroupsResponseHandler.java index 4c2eec0493..ff39f83c9a 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/AWSEC2DescribeSecurityGroupsResponseHandler.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/AWSEC2DescribeSecurityGroupsResponseHandler.java @@ -97,7 +97,7 @@ public class AWSEC2DescribeSecurityGroupsResponseHandler extends } else if (inSecurityGroupInfo) { securityGroupHandler.endElement(uri, name, qName); } - currentText = new StringBuilder(); + currentText.setLength(0); } protected void endItem(String uri, String name, String qName) throws SAXException { diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/AWSEC2IpPermissionHandler.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/AWSEC2IpPermissionHandler.java index 27410fff2d..f2702e4bc8 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/AWSEC2IpPermissionHandler.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/AWSEC2IpPermissionHandler.java @@ -72,7 +72,7 @@ public class AWSEC2IpPermissionHandler extends ParseSax.HandlerForGeneratedReque builder.tenantIdGroupNamePair(userId, groupId); userId = groupId = null; } - currentText = new StringBuilder(); + currentText.setLength(0); } private static String currentOrNegative(StringBuilder currentText) { diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/AWSEC2SecurityGroupHandler.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/AWSEC2SecurityGroupHandler.java index ce20cbe90a..dc4615e226 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/AWSEC2SecurityGroupHandler.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/AWSEC2SecurityGroupHandler.java @@ -112,7 +112,7 @@ public class AWSEC2SecurityGroupHandler extends HandlerForGeneratedRequestWithRe } else if (equalsOrSuffix(qName, "groupDescription")) { builder.description(currentOrNull(currentText)); } - currentText = new StringBuilder(); + currentText.setLength(0); } protected void endItem(String uri, String name, String qName) throws SAXException { diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/BaseAWSReservationHandler.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/BaseAWSReservationHandler.java index 854e03aa4c..e394fdaebc 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/BaseAWSReservationHandler.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/BaseAWSReservationHandler.java @@ -208,7 +208,7 @@ public abstract class BaseAWSReservationHandler extends HandlerForGeneratedRe this.attachTime = null; this.deleteOnTermination = true; } - currentText = new StringBuilder(); + currentText.setLength(0); } protected void inItem() { diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/CreateSecurityGroupResponseHandler.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/CreateSecurityGroupResponseHandler.java index 84db488f8a..684407c2c7 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/CreateSecurityGroupResponseHandler.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/CreateSecurityGroupResponseHandler.java @@ -31,7 +31,7 @@ public class CreateSecurityGroupResponseHandler extends ParseSax.HandlerWithResu if (qName.equals("groupId")) { id = currentText.toString().trim(); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/LaunchSpecificationHandler.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/LaunchSpecificationHandler.java index 68d37d5c89..81a9662a4d 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/LaunchSpecificationHandler.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/LaunchSpecificationHandler.java @@ -124,7 +124,7 @@ public class LaunchSpecificationHandler extends HandlerForGeneratedRequestWithRe if (monitoringEnabled != null) builder.monitoringEnabled(Boolean.valueOf(monitoringEnabled)); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/MonitoringStateHandler.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/MonitoringStateHandler.java index dfae3b7ccc..633b50309b 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/MonitoringStateHandler.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/MonitoringStateHandler.java @@ -45,7 +45,7 @@ public class MonitoringStateHandler extends this.instanceId = null; this.state = null; } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/PlacementGroupHandler.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/PlacementGroupHandler.java index 6fadf34c61..252cc588ed 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/PlacementGroupHandler.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/PlacementGroupHandler.java @@ -57,7 +57,7 @@ public class PlacementGroupHandler extends } else if (qName.equals("state")) { state = PlacementGroup.State.fromValue(currentText.toString().trim()); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/ProductCodesHandler.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/ProductCodesHandler.java index 6f4915be92..fcf198486d 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/ProductCodesHandler.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/ProductCodesHandler.java @@ -41,7 +41,7 @@ public class ProductCodesHandler extends ParseSax.HandlerWithResult> if (qName.equalsIgnoreCase("productCode")) { productCodes.add(currentText.toString().trim()); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/ReservedInstancesOfferingHandler.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/ReservedInstancesOfferingHandler.java index 786c26196e..0a9583ca45 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/ReservedInstancesOfferingHandler.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/ReservedInstancesOfferingHandler.java @@ -80,7 +80,7 @@ public class ReservedInstancesOfferingHandler extends } else if (qName.equalsIgnoreCase("usagePrice")) { this.usagePrice = Float.parseFloat(currentText.toString().trim()); } - currentText = new StringBuilder(); + currentText.setLength(0); } public void characters(char ch[], int start, int length) { diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/SpotHandler.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/SpotHandler.java index 78d29ef475..4b3d9c740b 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/SpotHandler.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/xml/SpotHandler.java @@ -64,7 +64,7 @@ public class SpotHandler extends ParseSax.HandlerForGeneratedRequestWithResult