Changeset 5319


Ignore:
Timestamp:
Feb 28, 2019, 10:51:14 AM (3 years ago)
Author:
Nicklas Nordborg
Message:

References #1113: Switch to JSON.simple 1.1.1-1

Switched to the new version. Compilation errors have been fixed. There are now over 200 warnings about Unnecessary @SuppressWarnings("unchecked").

Location:
extensions/net.sf.basedb.reggie/trunk
Files:
1 added
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/.classpath

    r5297 r5319  
    33  <classpathentry kind="src" path="src"/>
    44  <classpathentry kind="lib" path="lib/compile/servlet-api.jar"/>
    5   <classpathentry kind="lib" path="lib/compile/json_simple-1.1.jar"/>
    65  <classpathentry kind="lib" path="lib/compile/slf4j-api-1.6.4.jar"/>
    76  <classpathentry kind="lib" path="META-INF/lib/itextpdf-5.5.3.jar"/>
     
    1716  <classpathentry kind="lib" path="META-INF/lib/poi-ooxml-4.0.1.jar"/>
    1817  <classpathentry kind="lib" path="lib/compile/commons-io-1.4.jar"/>
     18  <classpathentry kind="lib" path="lib/compile/json-simple-1.1.1-1.jar"/>
    1919  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
    2020  <classpathentry kind="output" path=".build"/>
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/json/FilteredJSONObject.java

    r4404 r5319  
    1515  @since 4.10
    1616*/
    17 @SuppressWarnings({"rawtypes", "unchecked"})
    1817public class FilteredJSONObject
    1918  extends JSONObject
     
    2120
    2221  private static final long serialVersionUID = -5032543945179269026L;
    23   private final Filter filter;
     22  private final Filter<Object> filter;
    2423 
    25   public FilteredJSONObject(Filter filter)
     24  public FilteredJSONObject(Filter<Object> filter)
    2625  {
    2726    this.filter = filter;
     
    2928
    3029  @Override
    31   public Object put(Object key, Object value)
     30  public Object put(String key, Object value)
    3231  {
    3332    return filter.evaluate(value) ? super.put(key, value) : null;
     
    3534
    3635  @Override
    37   public void putAll(Map m)
     36  public void putAll(Map<? extends String, ? extends Object> m)
    3837  {
    39     for (Object entry : m.entrySet())
     38    for (Map.Entry<? extends String, ? extends Object> entry : m.entrySet())
    4039    {
    41       Map.Entry e = (Map.Entry)entry;
    42       if (filter.evaluate(e.getValue())) super.put(e.getKey(),  e.getValue());
     40      if (filter.evaluate(entry.getValue())) super.put(entry.getKey(),  entry.getValue());
    4341    }
    4442    super.putAll(m);
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/DemuxMergeServlet.java

    r4985 r5319  
    345345          Number seqRunId = (Number)jsonSeqRun.get("id");
    346346          String readString = (String)jsonSeqRun.get("ReadString");
    347           JSONArray jsonOmitLanes = (JSONArray)jsonSeqRun.get("OmitLanes");
     347          List<Number> jsonOmitLanes = (List<Number>)jsonSeqRun.get("OmitLanes");
    348348          boolean excludeDoNotUse = Boolean.TRUE.equals(jsonSeqRun.get("excludeDoNotUse"));
    349349         
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/GenotypeServlet.java

    r5063 r5319  
    498498        JSONObject jsonReq = JsonUtil.parseRequest(req);
    499499        JSONArray jsonItems = (JSONArray)jsonReq.get("items");
    500         Set<Number> jsonPaired = new HashSet<Number>((JSONArray)jsonReq.get("paired"));
     500        Set<Number> jsonPaired = new HashSet<Number>((List<Number>)jsonReq.get("paired"));
    501501       
    502502        ItemSubtype mergedType = Subtype.MERGED_SEQUENCES.get(dc);
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/MRnaServlet.java

    r4983 r5319  
    392392       
    393393        JSONObject jsonReq = JsonUtil.parseRequest(req);
    394         JSONArray jsonIgnore = (JSONArray)jsonReq.get("ignore");
     394        List<Long> jsonIgnore = (List<Long>)jsonReq.get("ignore");
    395395        boolean preNormalized = jsonReq.get("preNormalized") != null;
    396396        boolean flagNotSelected = !preNormalized && jsonReq.get("flag") != null;
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/SampleReportServlet.java

    r4177 r5319  
    19411941                DateToStringConverter converter = new DateToStringConverter(new SimpleDateFormat("yyyy-MM-dd"));
    19421942                String dateStr = converter.convert(date);
    1943                 jsonMultipleDates.put(dateCounter, dateStr);
     1943                jsonMultipleDates.put(Integer.toString(dateCounter), dateStr);
    19441944                dateCounter++;
    19451945              }
Note: See TracChangeset for help on using the changeset viewer.