Werner Keil created DMAP-55:
-------------------------------
Summary: Resolve twisting of Singleton and Factory in
DeviceMapFactory
Key: DMAP-55
URL: https://issues.apache.org/jira/browse/DMAP-55
Project: DeviceMap
Issue Type: Bug
Components: Java API
Reporter: Werner Keil
Assignee: Reza Naghibi
There's an irritating mix-up between a factory pattern and singleton commonly
applied via getInstance(), valueOf() or similar.
LocationProvider myLocationProvider = LocationProvider.getInstance(myCriteria);
Location myLocation = myLocationProvider.getLocation(300);
see
http://stackoverflow.com/questions/10477281/please-tell-me-when-to-use-getinstance-method-in-java
In DeviceMapFactory getInstance() returns a DeviceMapClient() which is
confusing/wrong, it should return an instance of DeviceMapFactory.
If the factory's static method is not meant to return itself, then please
rename it to getClient() or similar, see above.
--
This message was sent by Atlassian JIRA
(v6.2#6252)