Skip to content

#567 Marker Interface pull request #572

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

Merged
merged 13 commits into from
May 29, 2017
Merged

#567 Marker Interface pull request #572

merged 13 commits into from
May 29, 2017

Conversation

4lexis
Copy link
Contributor

@4lexis 4lexis commented May 3, 2017

Pull request for marker interface pattern #567

marker/README.md Outdated
Use the Marker Interface pattern when

* you want to identify the special objects from normal objects
* define a type that is implemented by instances of the marked class, marker annotations can not do that
Copy link
Owner

Choose a reason for hiding this comment

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

Please clarify this sentence

marker/README.md Outdated
## Real world examples

* [javase.7.docs.api.java.io.Serializable](https://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html)
* [javase.7.docs.api.java.lang.Cloneable](https://docs.oracle.com/javase/7/docs/api/java/lang/Cloneable.html)
Copy link
Owner

Choose a reason for hiding this comment

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

Please point to Java 8 docs

marker/pom.xml Outdated
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>RELEASE</version>
Copy link
Owner

Choose a reason for hiding this comment

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

Any particular reason why you use JUnit 5 instead of 4? The rest of the project still uses 4. There is an issue #408 about moving to JUnit 5.

@@ -0,0 +1,10 @@
/**
* Created by Alexis on 29-Apr-17.
Copy link
Owner

Choose a reason for hiding this comment

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

Please add proper JavaDoc instead of creator

@@ -0,0 +1,12 @@
/**
* Created by Alexis on 02-May-17.
Copy link
Owner

Choose a reason for hiding this comment

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

Please add proper JavaDoc instead of creator

if (guard instanceof Permission) {
guard.enter();
} else {
System.out.println("You have no permission to enter, please leave this area");
Copy link
Owner

Choose a reason for hiding this comment

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

Please use logging framework instead of printing to System.out. See issue #502

@iluwatar
Copy link
Owner

@4lexis you have my review comments. Please notify when you've made the changes.

@4lexis
Copy link
Contributor Author

4lexis commented May 23, 2017

@iluwatar Here, I made requested changes.

@iluwatar iluwatar merged commit dd0ca2d into iluwatar:master May 29, 2017
@iluwatar
Copy link
Owner

Good work @4lexis thank you for the pattern contribution! 👍

@iluwatar
Copy link
Owner

@all-contributors please add @4lexis for code

@allcontributors
Copy link
Contributor

@iluwatar

I've put up a pull request to add @4lexis! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants