UPnP redundant casts

This commit is contained in:
zzz
2019-03-10 12:58:23 +00:00
parent 30dbe24777
commit 365f5a8c7b
18 changed files with 19 additions and 19 deletions

View File

@ -387,7 +387,7 @@ public class HTTPPacket
public HTTPHeader getHeader(int n)
{
return (HTTPHeader)httpHeaderList.get(n);
return httpHeaderList.get(n);
}
public HTTPHeader getHeader(String name)

View File

@ -55,7 +55,7 @@ public class HTTPServerList extends Vector<HTTPServer>
public HTTPServer getHTTPServer(int n)
{
return (HTTPServer)get(n);
return get(n);
}
////////////////////////////////////////////////

View File

@ -25,12 +25,12 @@ public class ParameterList extends Vector<Parameter>
public Parameter at(int n)
{
return (Parameter)get(n);
return get(n);
}
public Parameter getParameter(int n)
{
return (Parameter)get(n);
return get(n);
}
public Parameter getParameter(String name)

View File

@ -326,7 +326,7 @@ public class Action
public boolean performActionListener(ActionRequest actionReq)
{
ActionListener listener = (ActionListener)getActionListener();
ActionListener listener = getActionListener();
if (listener == null)
return false;
ActionResponse actionRes = new ActionResponse();

View File

@ -39,7 +39,7 @@ public class ActionList extends Vector<Action>
public Action getAction(int n)
{
return (Action)get(n);
return get(n);
}
}

View File

@ -51,7 +51,7 @@ public class AllowedValueList extends Vector<AllowedValue>
public AllowedValue getAllowedValue(int n)
{
return (AllowedValue)get(n);
return get(n);
}
public boolean isAllowed(String v){

View File

@ -39,7 +39,7 @@ public class ArgumentList extends Vector<Argument>
public Argument getArgument(int n)
{
return (Argument)get(n);
return get(n);
}
public Argument getArgument(String name)

View File

@ -1280,7 +1280,7 @@ public class Device implements org.cybergarage.http.HTTPRequestListener,
ActionList actionList = service.getActionList();
int actionCnt = actionList.size();
for (int i = 0; i < actionCnt; i++) {
Action action = (Action) actionList.getAction(i);
Action action = actionList.getAction(i);
String actionName = action.getName();
if (actionName == null)
continue;

View File

@ -39,7 +39,7 @@ public class DeviceList extends Vector<Device>
public Device getDevice(int n)
{
return (Device)get(n);
return get(n);
}
}

View File

@ -39,7 +39,7 @@ public class IconList extends Vector<Icon>
public Icon getIcon(int n)
{
return (Icon)get(n);
return get(n);
}
}

View File

@ -39,7 +39,7 @@ public class ServiceStateTable extends Vector<StateVariable>
public StateVariable getStateVariable(int n)
{
return (StateVariable)get(n);
return get(n);
}
}

View File

@ -172,7 +172,7 @@ public class UPnP
private static final String toUUID(int seed)
{
String id = Integer.toString((int)(seed & 0xFFFF), 16);
String id = Integer.toString(seed & 0xFFFF, 16);
int idLen = id.length();
String uuid = "";
for (int n=0; n<(4-idLen); n++)

View File

@ -39,7 +39,7 @@ public class PropertyList extends Vector<Property>
public Property getProperty(int n)
{
return (Property)get(n);
return get(n);
}
}

View File

@ -48,7 +48,7 @@ public class SSDPNotifySocketList extends Vector<SSDPNotifySocket>
public SSDPNotifySocket getSSDPNotifySocket(int n)
{
return (SSDPNotifySocket)get(n);
return get(n);
}
////////////////////////////////////////////////

View File

@ -66,7 +66,7 @@ public class SSDPSearchResponseSocketList extends Vector<SSDPSearchResponseSocke
public SSDPSearchResponseSocket getSSDPSearchResponseSocket(int n)
{
return (SSDPSearchResponseSocket)get(n);
return get(n);
}
////////////////////////////////////////////////

View File

@ -67,7 +67,7 @@ public class SSDPSearchSocketList extends Vector<SSDPSearchSocket>
public SSDPSearchSocket getSSDPSearchSocket(int n)
{
return (SSDPSearchSocket)get(n);
return get(n);
}
public void addSearchListener(SearchListener listener)

View File

@ -25,7 +25,7 @@ public class AttributeList extends Vector<Attribute>
public Attribute getAttribute(int n)
{
return (Attribute)get(n);
return get(n);
}
public Attribute getAttribute(String name)

View File

@ -25,7 +25,7 @@ public class NodeList extends Vector<Node>
public Node getNode(int n)
{
return (Node)get(n);
return get(n);
}
public Node getNode(String name)