You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@clerezza.apache.org by "Hasan (JIRA)" <ji...@apache.org> on 2011/01/23 22:56:46 UTC
[jira] Created: (CLEREZZA-405) removing unused variable in
tcmanager
removing unused variable in tcmanager
-------------------------------------
Key: CLEREZZA-405
URL: https://issues.apache.org/jira/browse/CLEREZZA-405
Project: Clerezza
Issue Type: Improvement
Reporter: Hasan
Assignee: Hasan
Priority: Trivial
The statement
final TripleCollection triples = getTriples(name);
in the code below can be removed
private void registerMGraphAsService(UriRef name) {
Dictionary props = new Properties();
props.put("name", name.getUnicodeString());
String[] interfaceNames;
final TripleCollection triples = getTriples(name);
interfaceNames = new String[]{
MGraph.class.getName(),
LockableMGraph.class.getName()
};
Object service = new MGraphServiceFactory(this, name, tcAccessController);
ServiceRegistration serviceReg = componentContext.getBundleContext().registerService(
interfaceNames, service, props);
serviceRegistrations.put(name, serviceReg);
}
And the above method can be merged with the similar method:
private void registerGraphAsService(UriRef name) {
Dictionary props = new Properties();
props.put("name", name.getUnicodeString());
String[] interfaceNames;
interfaceNames = new String[]{Graph.class.getName()};
Object service = new GraphServiceFactory(this, name, tcAccessController);
ServiceRegistration serviceReg = componentContext.getBundleContext().registerService(
interfaceNames, service, props);
serviceRegistrations.put(name, serviceReg);
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (CLEREZZA-405) removing unused variable in tcmanager
Posted by "Hasan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLEREZZA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hasan closed CLEREZZA-405.
--------------------------
Resolution: Fixed
the unnecessary statement is removed and both methods are merged
> removing unused variable in tcmanager
> -------------------------------------
>
> Key: CLEREZZA-405
> URL: https://issues.apache.org/jira/browse/CLEREZZA-405
> Project: Clerezza
> Issue Type: Improvement
> Reporter: Hasan
> Assignee: Hasan
> Priority: Trivial
>
> The statement
> final TripleCollection triples = getTriples(name);
> in the code below can be removed
> private void registerMGraphAsService(UriRef name) {
>
> Dictionary props = new Properties();
> props.put("name", name.getUnicodeString());
> String[] interfaceNames;
> final TripleCollection triples = getTriples(name);
> interfaceNames = new String[]{
> MGraph.class.getName(),
> LockableMGraph.class.getName()
> };
> Object service = new MGraphServiceFactory(this, name, tcAccessController);
> ServiceRegistration serviceReg = componentContext.getBundleContext().registerService(
> interfaceNames, service, props);
> serviceRegistrations.put(name, serviceReg);
> }
> And the above method can be merged with the similar method:
> private void registerGraphAsService(UriRef name) {
> Dictionary props = new Properties();
> props.put("name", name.getUnicodeString());
> String[] interfaceNames;
> interfaceNames = new String[]{Graph.class.getName()};
> Object service = new GraphServiceFactory(this, name, tcAccessController);
> ServiceRegistration serviceReg = componentContext.getBundleContext().registerService(
> interfaceNames, service, props);
> serviceRegistrations.put(name, serviceReg);
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.