Commit Graph

779 Commits

Author SHA1 Message Date
Andrew Gaul 34cfdbe266 Enforce Override annotation via Checkstyle
Also remove bogus inheritDoc on base and static methods.
2014-08-31 19:37:50 -07:00
Andrew Gaul 195998b3b6 Miscellaneous FindBugs fixes 2014-08-30 14:33:10 -07:00
Andrew Gaul 5399cb6877 Avoid unnecessary boxing
Found with FindBugs.
2014-08-30 14:30:47 -07:00
Andrew Gaul 480f0e883d Prevent instantiation of utility classes
Also prevent extension.
2014-08-26 12:23:36 -07:00
Andrew Gaul 967f55c2e4 Enforce type naming via Checkstyle 2014-08-26 11:29:25 -07:00
Andrew Gaul 9c2c2e0c44 Remove spurious whitespace
Also remove spurious unary operator plus.
2014-08-26 11:15:55 -07:00
Jeremy Daggett e711275fb1 Prefer isEmpty() for collections rather than size() 2014-08-20 11:07:48 -07:00
Stuart Hendren f3778b6cbd JCLOUDS-661: Adding a test for single-port firewall rules 2014-08-14 12:49:06 -04:00
Andrew Gaul 95cfc0d950 JCLOUDS-653: Address Guava 18 deprecations
Mostly renaming Objects.toStringHelper to MoreObjects.toStringHelper.
2014-08-08 11:12:21 -07:00
Andrew Gaul 59462747e7 Reset StringBuilder instead of creating new ones
This avoids unneeded garbage, especially during XML parsing.  Replaced
with:

find -name \*.java | xargs sed -i 's/^\( *[^ ]*\) = new StringBuilder();$/\1.setLength(0);/'
2014-08-06 11:22:49 -07:00
Andrew Phillips e3d9851216 Up to 2.0.0-SNAPSHOT after the 1.8.0 release 2014-08-05 09:10:24 +02:00
Aled Sage 1fb286809e JCLOUDS-549: Fix NPE in LoginCredentials.toString
- also deprecates LoginCredentails.get(Password|PrivateKey)
- use getOptionalPassword and getOptionalPrivateKey instead
2014-07-18 14:09:18 +01:00
Andrew Gaul fb60d76704 JCLOUDS-622: Remove most vestiges of InputSupplier
Guava 16 deprecated InputSupplier and a future release will remove it.
2014-07-16 16:07:59 -07:00
Werner Buck 22c5fbbd78 JCLOUDS-625: Set VolumeBuilder id to nullable in VolumeImpl
VolumeBuilder does not allow null id while VolumeImpl allows it to be nullable.
2014-07-16 00:43:47 +02:00
Andrea Turli 4cf6efe39a refactor BaseComputeServiceLiveTest to simplify the extension of this base test 2014-07-07 10:53:13 +02:00
Andrew Gaul a68eb38901 JCLOUDS-612: Securely create temporary directories
This commit addresses a potential security issue where an attacker
could hijack the ScriptBuilder payload by predicting the temporary
directory name.
2014-06-25 23:23:06 +02:00
Christopher Dancy 8598ee858a JCLOUDS-610: Return the affected nodes from resumeNodesMatching, suspendNodesMatching and rebootNodesMatching
Methods have been refactored to match the functionality provided by destroyNodesMatching.
2014-06-24 22:58:34 +02:00
Andrew Gaul 5b5e713cba Avoid unnecessary object creation
Prefer StringBuffer.append(string, index1, index2) over
StringBuffer.append(String.substring(index1, index2).
2014-06-24 13:15:18 -07:00
Ignasi Barrera b0250cfb4f JCLOUDS-588: Register discovered images in the image cache
Images were cached in memory using a memoized supplier. To allow growing
this cache with the discovered images, the ImageCacheSupplier class has
been created. It provides an in-memory cache with all discovered images
and acts as a view over the image cache that also provides access to
them.

The in-memory cache for the discovered images expires with the session,
just as the image cache does.

The default memoized image supplier has been changed to the
ImageCacheSupplier, to make sure all providers get injected the right
instance, and the old supplier has been qualified with the 'imageCache'
name, in case a provider needs the basic image cache.
2014-06-20 12:35:18 +02:00
Christopher Dancy ea68554244 NodePredicates gained static predicate SUSPENDED
Replaced hard-coded Strings in toString methods of static predicates with their enum.toString counterparts

Added test 'testNodeRunningFailsOnSuspended'

Revert "Added test 'testNodeRunningFailsOnSuspended'"

This reverts commit 2a543bfe20540bb4f10ef4f86e845a63bdbe90e3.

Removed test 'testNodeRunningFailsOnSuspended'. Added test 'testNodeSuspendedReturnsTrueWhenSuspended'.

Renamed '

Revert "Renamed '"

This reverts commit 061e9292a812066562ab47ba5eea15337fc13c3d.

Renamed 'AtomicNodeSuspended.nodeRunning' to 'AtomicNodeSuspended.nodeSuspended'.\nWhere applicable combined all calls to 'replay(Object...)' instead of the old 'replay(node);replay(computeService);'
2014-06-16 16:58:35 -05:00
Chris Custine c857ccc479 JCLOUDS-583: Updates HP Cloud compute provider to work with 13.5 release 2014-06-10 09:41:46 +02:00
Andrew Phillips 9b50754c24 Cleaning up Checkstyle violations from b1c1636 and 39f77ad 2014-06-09 23:17:37 -04:00
Andrew Gaul 9cdd53b0b7 JCLOUDS-546: Remove Javadoc @author annotations
Annotations removed with:

find -name \*.java | xargs sed -i /@author/d

Empty Javadoc removed with multiple iterations of:

find -name \*.java | xargs sed -i -z 's/ \*\n \*\// \*\//'
find -name \*.java | xargs sed -i -z 's/ \* \n \*\// \*\//'
find -name \*.java | xargs sed -i -z 's/\/\*\*\n \*\/\n//'
2014-06-07 21:44:54 -07:00
Ignasi Barrera 39f77ad3f8 JCLOUDS-570: Fallback to the GetImageStrategy
If the TemplateBuilderImpl is given an imageId but the image can not be
found in the image cache, fallback to the GetImageStrategy to perform a
call to the provider to try to get it.

We've seen that in some cases images are not returned in the image list
but they actually exist in the provider. This fix won't make them
available when filtering by other properties such as the operating system,
etc, but at least will make them available if their id is known.
2014-06-06 12:40:27 +02:00
Ignasi Barrera 22a6028336 JCLOUDS-573: Make sure to destroy all nodes created in the tests 2014-05-21 09:21:31 +02:00
Andrew Gaul 1f1f4f0a49 Override hashCode when equals overridden
Java 8 added a warning for this:

https://bugs.openjdk.java.net/browse/JDK-6563143
2014-05-20 21:22:43 -07:00
Andrew Gaul 62a6842748 Address CheckStyle violations 2014-05-17 00:49:40 -07:00
Andrew Gaul baddf8fe80 Replace InputSupplierMap with Map<K, ByteSource>
A future version of Guava will remove InputSupplier.
2014-05-16 18:10:52 -07:00
Andrew Gaul d9d8d421cb Migrate InputSupplier callers to ByteSource
A future version of Guava will remove InputSupplier.
2014-05-16 18:08:19 -07:00
Andrew Gaul 70cf3e1f7c Make constants final classes instead of interfaces
This commit prohibits implementation of the empty interface and
instantiation of the class.  Refer to _Effective Java_ item 19 for
more background.
2014-05-16 09:45:52 -07:00
Andrew Gaul 67c2b5f6b9 Enable whitespace around Checkstyle rule 2014-05-08 18:31:47 -07:00
Andrew Gaul 2d88f5164e Enforce that all commas have trailing whitespace 2014-05-08 18:28:08 -07:00
Andrew Gaul 82e9e9e42f JCLOUDS-534: Upgrade to Guava 17.0-rc2
This commit accommodates changes to Predicates.and.toString and
PublicSuffixPatterns.EXACT.  Release notes:

https://code.google.com/p/guava-libraries/wiki/Release17
2014-04-14 18:38:15 -07:00
Andrew Gaul 7af18d4843 JCLOUDS-534: Address Guava 17 compatibility issues
Corrected with:

find -name \*.java | xargs sed -i 's/new Stopwatch();/Stopwatch.createUnstarted();/'
find -name \*.java | xargs sed -i 's/new Stopwatch().start();/Stopwatch.createStarted();/'
2014-04-11 14:24:12 -07:00
ashley-taylor b5218e0ce6 JCLOUDS-528: Ability to control interfaces to test for SocketFinder 2014-04-11 14:35:17 -04:00
Pasi Niemi 85a1a8c1dd JCLOUDS-516: Add ssh agent support via sch agentproxy 2014-03-27 09:04:34 +01:00
Andrew Gaul 266d7f847b Prefer ByteSource over deprecated InputSupplier 2014-02-18 22:35:10 -08:00
Andrew Gaul 9416416ff4 Address Checkstyle violations 2014-01-19 20:51:51 -08:00
Andrew Bayer e2cd6d8322 JCLOUDS-416. Add TemplateOptions#networks.
- Adds networks field/methods to TemplateOptions.
- Adds them to children as well for legacy reasons.
- Deprecates CloudStackTemplateOptions#networkIds methods in favor of #networks.
- TODO: Modify compute abstraction layer for provisioning for nova,
    EC2, et al to take advantage of this.
2014-01-07 16:15:48 -08:00
Andrew Gaul c7b0f66544 Replace calls to Closeables.closeQuietly
Guava 16 removes this API.  Replace with Closeables2.closeQuietly.
References JCLOUDS-413 and JCLOUDS-415.
2013-12-21 12:30:59 -08:00
Andrew Gaul f9e98681b6 Address miscellaneous Guava deprecations
References JCLOUDS-415.
2013-12-20 14:05:44 -08:00
Andrew Bayer c1ee11d9bd Updating to 1.8.0-SNAPSHOT 2013-12-17 11:31:56 -08:00
Andrew Gaul 0398276be3 Remove redundant imports
Also enforce no new ones via Checkstyle
2013-12-12 18:23:43 -08:00
Andrew Gaul 828d8790c2 Enforce no unused imports via Checkstyle
Removed with:

mvn checkstyle:checkstyle --quiet -Dcheckstyle.output.file=/dev/stdout -Dcheckstyle.output.format=plain | tac | while read i; do echo $i | sed -n 's/\([^:]*\):\([^:]*\):.*/sed -i \2d \1/p' | bash; done
2013-12-11 17:27:43 -08:00
Andrew Gaul 4cef85d1cd Address Checkstyle violations in tests 2013-12-09 14:40:07 -08:00
Zack Shoylev 295c6e741e Fixes broken cloudservers live tests, updates versions for images 2013-12-02 11:47:43 -06:00
Andrew Bayer 23e43b2c8d JCLOUDS-381. Allow explicit naming of nodes via TemplateOptions. 2013-11-21 10:15:25 -08:00
Alex Heneveld 3ecbf90847 remove addl whitespace pointed out in JCLOUDS-331 2013-11-19 17:37:02 -05:00
Alex Heneveld 9a7336bb0e applies tidies for imageChooser (JCLOUDS-331) as suggested in pull #202 2013-11-18 10:31:34 -05:00
Martin Harris ca8289b692 JCLOUDS-331: Changed return type of TemplateBuilder.imageChooser
TemplateBuilderImpl -> TemplateBuilder
2013-11-06 21:25:59 -05:00