Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use safe keyword when hook target namspace clashes with reserved java… #426

Merged

Conversation

Brianwithay21
Copy link
Member

… keywords

Issue #, if available:

Description of changes:
Using a safe keyword that appends a _ to the end of a nampspace if it is a reservered keyword in Java. This is updated for when generating POJOs for a Resource Hooks targets.

For example, the AWS::Panorama::Package resource was generating the following path:

package com.mycompany.testing.mytesthook.model.aws.panorama.package;

public class AwsPanoramaPackage extends ResourceHookTarget {

...

}

------

public class AwsPanoramaPackageTargetModel extends ResourceHookTargetModel<AwsPanoramaPackage> {

...

}

Now a underscore is added so there is no name clashing causing complication errors for these certain resource types:

package com.mycompany.testing.mytesthook.model.aws.panorama.package_;

...

public class AwsPanoramaPackage_ extends ResourceHookTarget {

...

}

-----

public class AwsPanoramaPackage_TargetModel extends ResourceHookTargetModel<AwsPanoramaPackage_> {

...

}

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mrinaudo-aws mrinaudo-aws self-requested a review September 22, 2023 17:10
Copy link
Contributor

@mrinaudo-aws mrinaudo-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Brianwithay21 Brianwithay21 merged commit 745f5ca into aws-cloudformation:master Sep 22, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants