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

GEODE-1617: Regions can be created with a variety of characters that … #285

Closed
wants to merge 2 commits into from
Closed

GEODE-1617: Regions can be created with a variety of characters that … #285

wants to merge 2 commits into from

Conversation

kjduling
Copy link

…are unsupported

Added comprehensive test to validate region names

…are unsupported

Added comprehensive test to validate region names
@kirklund
Copy link
Contributor

+1

@kirklund
Copy link
Contributor

I reworded your commit message:

GEODE-1617: add test for region names

Added comprehensive test to validate region names

This closes #285

@@ -0,0 +1,75 @@
package org.apache.geode.cache;
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing the Apache license header on this file.

Copy link
Author

Choose a reason for hiding this comment

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

Hmm, my local build didn't catch that and should have. Fixed.

ira.setInternalRegion(false);
validateCharacters(ira);
try {
LocalRegion.validateRegionName("__InvalidInternalRegionName", ira);
Copy link
Contributor

Choose a reason for hiding this comment

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

Aren't you missing a fail() stmt here?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, fixed.

Copy link
Contributor

@kirklund kirklund left a comment

Choose a reason for hiding this comment

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

Please fix up license and failure message.

} else {
try {
LocalRegion.validateRegionName(name, ira);
fail("Should have received an IllegalArgumentException");
Copy link
Contributor

Choose a reason for hiding this comment

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

Recommend adding which character to the message so we get instant info about which character should have been illegal but was allowed.

Copy link
Author

Choose a reason for hiding this comment

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

I added printing the offending character and the numeric value of it.

…are unsupported

Added comprehensive test to validate region names
@kirklund
Copy link
Contributor

Pushed to develop. Thanks!

@asfgit asfgit closed this in 0c9002b Nov 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants