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

[Minor] Code refactored #504

Merged
merged 4 commits into from Feb 20, 2017

Conversation

Projects
None yet
4 participants
@himani1
Copy link
Contributor

commented Feb 20, 2017

No description provided.

@@ -95,7 +95,7 @@ final class PubSubRef[T] private[lagom] (val topic: TopicId[T], mediator: ActorR
* This method is especially useful when writing tests that require that a subscriber
* is known before sending messages to a topic.
*/
def hasAnySubscribers(): Future[Boolean] = {
def hasAnySubscribers: Future[Boolean] = {

This comment has been minimized.

Copy link
@jroper

jroper Feb 20, 2017

Member

The Scala style guides use case for omission of parentheses on zero arity methods is for pure functions - functions with no side effects. This function causes messages to be sent over the network, hence it rightly has parentheses.

@@ -12,7 +12,7 @@ import com.lightbend.lagom.javadsl.api.ServiceInfo
*/
@Singleton
class ServiceInfoProvider(primaryServiceInterface: Class[_], secondaryServices: Array[Class[_]]) extends Provider[ServiceInfo] {
@Inject private var serverBuilder: JavadslServerBuilder = _
@Inject private val serverBuilder: JavadslServerBuilder = _

This comment has been minimized.

Copy link
@jroper

jroper Feb 20, 2017

Member

serverBuilder must be mutable, since it gets injected by Guice after instantiation.

@jroper

This comment has been minimized.

Copy link
Member

commented Feb 20, 2017

Hi @himani1, thanks for this effort! Some of the changes you've made will need to be reverted since they are as they are for good reason. If you can update those, then we can merge this PR.

@himani1

This comment has been minimized.

Copy link
Contributor Author

commented Feb 20, 2017

@jroper Thanks for pointing out the mistakes, I have corrected them. Kindly please have a look.

@jroper

jroper approved these changes Feb 20, 2017

@ignasi35 ignasi35 merged commit 18af933 into lagom:master Feb 20, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
typesafe-cla-validator All users have signed the CLA
Details

@himani1 himani1 deleted the himani1:code-refactoring branch Feb 20, 2017

mdonkers added a commit to mdonkers/lagom that referenced this pull request Mar 12, 2017

[Minor] Code refactored (lagom#504)
* Minor code refactoring done

* minor code refactoring

* Reverted a missing parantheses.

@TimMoore TimMoore added this to the 1.4.0 milestone Apr 13, 2017

@ignasi35 ignasi35 modified the milestones: 1.4.0, 1.4.0-M1 Jun 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.