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

fix #985 make sFactory private in factories #2006

Merged
merged 10 commits into from
Dec 16, 2014

Conversation

maxme
Copy link
Contributor

@maxme maxme commented Nov 20, 2014

@maxme maxme added this to the 3.5 milestone Nov 20, 2014
import java.net.URI;

public class XMLRPCFactory {
public static XMLRPCFactoryAbstract sFactory;
private static XMLRPCFactoryAbstract sFactory;

public static XMLRPCClientInterface instantiate(URI uri, String httpUser, String httpPassword) {
if (sFactory == null) {
sFactory = new XMLRPCFactoryDefault();
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we move this (and others like it) to a static initializer?

Good discussion here.

@maxme maxme modified the milestones: 3.6, 3.5 Nov 24, 2014
…ctory-private

Conflicts:
	WordPress/src/androidTest/java/org/wordpress/android/ActivityRobotiumTestCase.java
@nbradbury nbradbury self-assigned this Dec 5, 2014
@nbradbury
Copy link
Contributor

I tested this by running the "connectedCheck" task and saw this: https://cloudup.com/cosWi_l8fv1

@maxme
Copy link
Contributor Author

maxme commented Dec 16, 2014

@nbradbury needs another review, tests are failing for the WordPressComRest subproject. To run tests for the WordPress project only: ./gradlew WordPress:cAT.

@nbradbury
Copy link
Contributor

That worked :shipit:

nbradbury added a commit that referenced this pull request Dec 16, 2014
…y-private

fix #985 make sFactory private in factories
@nbradbury nbradbury merged commit 9abb0ad into develop Dec 16, 2014
@nbradbury nbradbury deleted the issue/985-make-sfactory-private branch December 16, 2014 15:52
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.

Make sFactory members private and prevent call to the setter in non test mode
3 participants