-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Duration static methods don't seem to work with java API #3385
Copy link
Copy link
Closed
Labels
@aws-cdk/coreRelated to core CDK functionalityRelated to core CDK functionalitybugThis issue is a bug.This issue is a bug.language/javaRelated to Java bindingsRelated to Java bindingsneeds-reproductionThis issue needs reproduction.This issue needs reproduction.
Description
Note: for support questions, please first reference our documentation, then use Stackoverflow. This repository's issues are intended for feature requests and bug reports.
-
I'm submitting a ...
- 🪲 bug report
- 🚀 feature request
- 📚 construct library gap
- ☎️ security issue or vulnerability => Please see policy
- ❓ support request => Please see note at the top of this template.
-
What is the current behavior?
If the current behavior is a 🪲bug🪲: Please provide the steps to reproduce
Calling Duration.seconds(29) results in an exception.
- What is the expected behavior (or behavior of feature suggested)?
Duration.seconds(29) should return a Duration object.
-
What is the motivation / use case for changing the behavior or adding this feature?
-
Please tell us about your environment:
- CDK CLI Version: 1.1.0 (build 1a11e96)
- Module Version: 1.1.0.DEVPREVIEW
- OS: OSX Mojave
- Language: Java
-
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc)
Stacktrace:
Argument to Intrinsic must be a plain value object, got () => {
throw new Error(`Duration.toString() was used, but .toSeconds,
.toMinutes or .toDays should have been called instead`); } Error:
Argument to Intrinsic must be a plain value object, got () => {
throw new Error(`Duration.toString() was used, but .toSeconds,
.toMinutes or .toDays should have been called instead`); } at new
Intrinsic
(/private/var/folders/f6/fxr8vlfn6bb54sff66lx7qfr0000gn/T/jsii-kernel-MjEHJS/node_modules/@aws-cdk/core/lib/private/intrinsic.js:18:19)
at Function.asAny
(/private/var/folders/f6/fxr8vlfn6bb54sff66lx7qfr0000gn/T/jsii-kernel-MjEHJS/node_modules/@aws-cdk/core/lib/token.js:74:52)
at Function.asString
(/private/var/folders/f6/fxr8vlfn6bb54sff66lx7qfr0000gn/T/jsii-kernel-MjEHJS/node_modules/@aws-cdk/core/lib/token.js:50:69)
at Duration.toString
(/private/var/folders/f6/fxr8vlfn6bb54sff66lx7qfr0000gn/T/jsii-kernel-MjEHJS/node_modules/@aws-cdk/core/lib/duration.js:124:30)
at _wrapSandboxCode
(/private/var/folders/f6/fxr8vlfn6bb54sff66lx7qfr0000gn/T/jsii-java-runtime180821756933517341/jsii-runtime.js:6498:51)
at Kernel._wrapSandboxCode
(/private/var/folders/f6/fxr8vlfn6bb54sff66lx7qfr0000gn/T/jsii-java-runtime180821756933517341/jsii-runtime.js:7134:19)
at ret._ensureSync
(/private/var/folders/f6/fxr8vlfn6bb54sff66lx7qfr0000gn/T/jsii-java-runtime180821756933517341/jsii-runtime.js:6498:25)
at Kernel._ensureSync
(/private/var/folders/f6/fxr8vlfn6bb54sff66lx7qfr0000gn/T/jsii-java-runtime180821756933517341/jsii-runtime.js:7102:20)
at Kernel.invoke
(/private/var/folders/f6/fxr8vlfn6bb54sff66lx7qfr0000gn/T/jsii-java-runtime180821756933517341/jsii-runtime.js:6497:26)
at KernelHost.processRequest
(/private/var/folders/f6/fxr8vlfn6bb54sff66lx7qfr0000gn/T/jsii-java-runtime180821756933517341/jsii-runtime.js:6191:28)
at KernelHost.run
(/private/var/folders/f6/fxr8vlfn6bb54sff66lx7qfr0000gn/T/jsii-java-runtime180821756933517341/jsii-runtime.js:6137:14)
at processRequest
(/private/var/folders/f6/fxr8vlfn6bb54sff66lx7qfr0000gn/T/jsii-java-runtime180821756933517341/jsii-runtime.js:6137:45)
at KernelHost.processRequest
(/private/var/folders/f6/fxr8vlfn6bb54sff66lx7qfr0000gn/T/jsii-java-runtime180821756933517341/jsii-runtime.js:6233:16)
at KernelHost.run
(/private/var/folders/f6/fxr8vlfn6bb54sff66lx7qfr0000gn/T/jsii-java-runtime180821756933517341/jsii-runtime.js:6137:14)
at processRequest
(/private/var/folders/f6/fxr8vlfn6bb54sff66lx7qfr0000gn/T/jsii-java-runtime180821756933517341/jsii-runtime.js:6137:45)
at KernelHost.processRequest
(/private/var/folders/f6/fxr8vlfn6bb54sff66lx7qfr0000gn/T/jsii-java-runtime180821756933517341/jsii-runtime.js:6233:16)
at KernelHost.run
(/private/var/folders/f6/fxr8vlfn6bb54sff66lx7qfr0000gn/T/jsii-java-runtime180821756933517341/jsii-runtime.js:6137:14)
at processRequest
(/private/var/folders/f6/fxr8vlfn6bb54sff66lx7qfr0000gn/T/jsii-java-runtime180821756933517341/jsii-runtime.js:6137:45)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/coreRelated to core CDK functionalityRelated to core CDK functionalitybugThis issue is a bug.This issue is a bug.language/javaRelated to Java bindingsRelated to Java bindingsneeds-reproductionThis issue needs reproduction.This issue needs reproduction.