3 ms·
Response myResponse = new Response(); ResponseType myResponseType = responseTypeFactory.CreateNewDisagreementResponseType(); responseManger.SetResponseType(my
by InclinedPlane 17y ago
Response myResponse = new Response();
ResponseType myResponseType = responseTypeFactory.CreateNewDisagreementResponseType();
responseManger.SetResponseType(myResponse, myResponseType);
return myResponse;
- jrockway 17y agoThe "new Response()" value is unused.
- InclinedPlane 17y agoGood point, I wanted to have that in there because the constant redundancy of that pattern is a slap in the face to most people who've used dynamic languages or languages with type inference. I've updated the example to avoid reassignment to the same variable.
- jrockway 17y agoYou're preaching to the choir :)
- barrkel 17y agoYou're just agreeing with him though - the only bits of Java, as opposed to API, in there are [()=;.], 'new' and 'return'.
- jrockway 17y agoBut of course, you can't actually put just that in a file and expect it to compile. You have to wrap it with class whatever public static void main ....