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
Warns the user if specified mainClass is not a valid Java class. #228
Merged
+35
−1
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c8757e1
Warns the user if specified mainClass is not a valid Java class.
coollog b8df379
Updates CHANGELOG.
coollog bbd5357
Changes to use built-in mechanisms.
coollog 844823f
Changes to use built-in mechanisms.
coollog a6fc62a
Changes to use built-in mechanisms.
coollog f92736f
Fixes format.
coollog d9e3029
Fixes format.
coollog c0a8b9f
Fixes format.
coollog f025f96
Merge branch 'master' into warn-invalid-main-class
coollog File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -153,4 +153,14 @@ public void testBuilder_missingValues() { | ||
| ex.getMessage()); | ||
| } | ||
| } | ||
|
|
||
| @Test | ||
| public void testValidJavaClassRegex() { | ||
| Assert.assertTrue("my.Class".matches(BuildConfiguration.VALID_JAVA_CLASS_REGEX)); | ||
| Assert.assertTrue("my.java_Class$valid".matches(BuildConfiguration.VALID_JAVA_CLASS_REGEX)); | ||
| Assert.assertFalse("${start-class}".matches(BuildConfiguration.VALID_JAVA_CLASS_REGEX)); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you verify that |
||
| Assert.assertFalse("123not.Valid".matches(BuildConfiguration.VALID_JAVA_CLASS_REGEX)); | ||
| Assert.assertFalse("{class}".matches(BuildConfiguration.VALID_JAVA_CLASS_REGEX)); | ||
| Assert.assertFalse("not valid".matches(BuildConfiguration.VALID_JAVA_CLASS_REGEX)); | ||
| } | ||
| } | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh confusing, can you comment on top of this, what this means?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually never mind, the tests are good.