Changeset c59ef24


Ignore:
Timestamp:
Nov 26, 2013 8:16:45 PM (6 years ago)
Author:
str4d <str4d@…>
Branches:
master
Children:
8770d7e
Parents:
85aa2fb
Message:

i2psnark: more type arguments

Location:
apps/i2psnark/java/src/org/klomp/snark/bencode
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • apps/i2psnark/java/src/org/klomp/snark/bencode/BEValue.java

    r85aa2fb rc59ef24  
    143143   * throw a InvalidBEncodingException.
    144144   */
     145  @SuppressWarnings("unchecked")
    145146  public List<BEValue> getList() throws InvalidBEncodingException
    146147  {
     
    160161   * a Map, otherwise it will throw a InvalidBEncodingException.
    161162   */
     163  @SuppressWarnings("unchecked")
    162164  public Map<String, BEValue> getMap() throws InvalidBEncodingException
    163165  {
  • apps/i2psnark/java/src/org/klomp/snark/bencode/BEncoder.java

    r85aa2fb rc59ef24  
    6060      bencode((Number)o, out);
    6161    else if (o instanceof List)
    62       bencode((List)o, out);
     62      bencode((List<?>)o, out);
    6363    else if (o instanceof Map)
    64       bencode((Map<String, Object>)o, out);
     64      bencode((Map<?, ?>)o, out);
    6565    else if (o instanceof BEValue)
    6666      bencode(((BEValue)o).getValue(), out);
     
    111111  }
    112112
    113   public static byte[] bencode(List l)
     113  public static byte[] bencode(List<?> l)
    114114  {
    115115    try
     
    125125  }
    126126
    127   public static void bencode(List l, OutputStream out) throws IOException
     127  public static void bencode(List<?> l, OutputStream out) throws IOException
    128128  {
    129129    out.write('l');
    130     Iterator it = l.iterator();
     130    Iterator<?> it = l.iterator();
    131131    while (it.hasNext())
    132132      bencode(it.next(), out);
Note: See TracChangeset for help on using the changeset viewer.