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

Update osgi annotations in datastorage #316

Merged

Conversation

PiteroS678
Copy link
Contributor

@PiteroS678 PiteroS678 commented Aug 9, 2018

Description

I updated osgi annotations in datastorage

Motivation and Context

Before, annotations was marked as deprecated

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

I hereby agree to the terms of the AET Contributor License Agreement.

@PiteroS678 PiteroS678 changed the title new OSGi annotations - datastorage Update osgi annotations in datastorage Aug 9, 2018
@malaskowski malaskowski changed the base branch from master to feature/upgrade-osgi-annotations August 9, 2018 08:20
+ "...[,hostN[:portN]]][/[database][?options]]", type = AttributeType.STRING)
String MongoURI() default DEFAULT_MONGODB_URI;

@AttributeDefinition(name = ALLOW_AUTO_CREATE, description = "Allows automatic creation of DB if set to true", type = AttributeType.BOOLEAN)
Copy link
Contributor

Choose a reason for hiding this comment

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

name should be set to the label value of old annotation

boolean DEFAULT_AUTOCREATE_VALUE = false;

@AttributeDefinition(name = MONGO_URI_PROPERTY_NAME, description = MONGO_URI_PROPERTY_DESCRIPTION, type = AttributeType.STRING)
String MongoURI() default DEFAULT_MONGODB_URI;
Copy link
Contributor

Choose a reason for hiding this comment

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

In Java usually methods names start with lowercase. Please adjust methods names in this interface.

Copy link
Contributor Author

@PiteroS678 PiteroS678 Aug 10, 2018

Choose a reason for hiding this comment

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

There's a problem with that adjustment. @AttributeDefinition is case sensitive to keys from *.cfg
https://github.com/Cognifide/aet/blob/master/osgi-dependencies/configs/src/main/resources/com.cognifide.aet.vs.mongodb.MongoDBClient.cfg#L19

Copy link
Contributor

Choose a reason for hiding this comment

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

Darn...
Let's leave it as is for now. Could you please raise a new ticket to fix that (make the properties to start with lowercase) in the future?
Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@plutasnyy plutasnyy merged commit 1aa8545 into feature/upgrade-osgi-annotations Aug 10, 2018
@plutasnyy plutasnyy deleted the update-osgi-annotation-datastorage branch August 10, 2018 08:26
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.

4 participants