- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 01 Oct 2009 14:33:30 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn In directory hutz:/tmp/cvs-serv14687/src/org/w3c/unicorn Modified Files: UnicornCall.java Log Message: disposes all the InputModules that have been created Index: UnicornCall.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/UnicornCall.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- UnicornCall.java 1 Oct 2009 13:58:59 -0000 1.31 +++ UnicornCall.java 1 Oct 2009 14:33:28 -0000 1.32 @@ -66,6 +66,8 @@ private ArrayList<Message> messages; + private List<InputModule> inputModules; + /** * Creates a new UnicornCall. */ @@ -74,6 +76,7 @@ mapOfStringParameter = new LinkedHashMap<String, String[]>(); mapOfResponse = new LinkedHashMap<String, Response>(); messages = new ArrayList<Message>(); + inputModules = new ArrayList<InputModule>(); } @@ -164,12 +167,15 @@ if (aInputMethod.getMethod() != inputParameter.getInputMethod()) { messages.add(new Message(Message.Level.WARNING, "\"" + aObserver.getName(sLang) + "\" $message_input_changed_1 " + inputParameter.getInputMethod().toString().toLowerCase() + " $message_input_changed_2", "$message_input_changed_long")); } - + + InputModule inputModule = createInputModule(aInputMethod, inputParameter.getInputModule()); + inputModules.add(inputModule); + // create a new request with input parameter final Request aRequest = Request.createRequest( // the corresponding best input module //InputFactory.getInputModule(aInputMethod.getMethod()), - createInputModule(aInputMethod, inputParameter.getInputModule()), + inputModule, // URL of the service to call aInputMethod.getCallMethod().getURL().toString(), // Name of the parameter holding resource information @@ -555,11 +561,14 @@ try { switch (aInputMethod.getMethod()) { case DIRECT: + logger.debug("Creating DirectInputModule"); return new DirectInputModule(inputModule); case UPLOAD: + logger.debug("Creating FakeUploadInputModule"); return new FakeUploadInputModule(inputModule); //return new FileItemInputModule(inputModule); case URI: + logger.debug("Creating URIInputModule"); return new URIInputModule(inputModule); default: return null; @@ -572,6 +581,8 @@ public void dispose() { inputParameter.dispose(); + for (InputModule inputModule : inputModules) + inputModule.dispose(); } } \ No newline at end of file
Received on Thursday, 1 October 2009 14:33:31 UTC