incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hasan (JIRA)" <j...@apache.org>
Subject [jira] Created: (CLEREZZA-405) removing unused variable in tcmanager
Date Sun, 23 Jan 2011 21:56:46 GMT
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.


Mime
View raw message