Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.6.0
-
None
Description
At line https://github.com/jclouds/jclouds/blob/master/apis/rackspace-clouddns/src/main/java/org/jclouds/rackspace/clouddns/v1/functions/RecordsToPagedIterable.java there's a call for optional.get() when doing pagination.
There's no test case to test whether or not pagination works at all.
https://github.com/jclouds/jclouds/blob/master/apis/rackspace-clouddns/src/test/java/org/jclouds/rackspace/clouddns/v1/features/RecordApiExpectTest.java
A user of denominator found a bug in this code, and took time to note the stack trace and json.
https://github.com/Netflix/denominator/issues/145
Please backfill a test case and see about fixing this.
Thread [main] (Suspended (breakpoint at line 42 in Absent))
Absent.get() line: 42
RecordsToPagedIterable.markerToNextForArg0(Optional<Object>) line: 52
RecordsToPagedIterable(Arg0ToPagedIterable<T,I>).apply(IterableWithMarker<T>) line: 73
RecordsToPagedIterable(Arg0ToPagedIterable<T,I>).apply(Object) line: 61
Functions$FunctionComposition<A,B,C>.apply(A) line: 210
InvokeHttpMethod.invoke(Invocation) line: 97
InvokeHttpMethod.apply(Invocation) line: 80
InvokeHttpMethod.apply(Object) line: 51
FunctionalReflection$FunctionalInvocationHandler<T>.handleInvocation(Object, Method, Object[]) line: 119
FunctionalReflection$FunctionalInvocationHandler<T>(AbstractInvocationHandler).invoke(Object, Method, Object[]) line: 70
$Proxy72.list() line: not available
CloudDNSResourceRecordSetApi.list() line: 33
ResourceRecordSetCommands$ResourceRecordSetList.doRun(DNSApiManager) line: 58
ResourceRecordSetCommands$ResourceRecordSetList(Denominator$DenominatorCommand).run() line: 132
Denominator.main(String[]) line: 74
2013-05-21 12:20:10,939 DEBUG [jclouds.headers] [main] >> GET https://dns.api.rackspacecloud.com/v1.0/XXXXXX/domains/YYYYYY/records HTTP/1.1
2013-05-21 12:20:10,940 DEBUG [jclouds.headers] [main] >> Accept: application/json
2013-05-21 12:20:10,940 DEBUG [jclouds.headers] [main] >> X-Auth-Token: XXXXXXXXXXXXXXXXXXXXXXXX
2013-05-21 12:20:12,842 DEBUG [jclouds.headers] [main] << HTTP/1.1 200 OK
2013-05-21 12:20:12,843 DEBUG [jclouds.headers] [main] << Date: Tue, 21 May 2013 10:20:12 GMT
2013-05-21 12:20:12,843 DEBUG [jclouds.headers] [main] << x-api-version: 1.0.24
2013-05-21 12:20:12,843 DEBUG [jclouds.headers] [main] << Via: 1.1 Repose (Repose/2.6.11)
2013-05-21 12:20:12,843 DEBUG [jclouds.headers] [main] << Server: Jetty(8.0.y.z-SNAPSHOT)
2013-05-21 12:20:12,843 DEBUG [jclouds.headers] [main] << Content-Type: application/json
2013-05-21 12:20:12,843 DEBUG [jclouds.headers] [main] << Content-Length: 17540
2013-05-21 12:20:13,122 DEBUG [jclouds.wire] [main] << "{
"records":[
,
,
,
,
,
,
,
{ "name":"ZZZZZ.mydomain.com", "id":"A-1234567", "type":"A", "data":"777.213.78.999", "ttl":300, "updated":"2013-04-10T02:19:04.000+0000", "created":"2013-04-10T02:19:04.000+0000" } ],
"totalEntries":271,
"links":[
]
}"