Changeset 7527


Ignore:
Timestamp:
Nov 7, 2018, 9:07:03 AM (3 years ago)
Author:
Nicklas Nordborg
Message:

References #2130: Upgrade 3-rd party libraries

Updated Apache Commons Collections to version 4.2.

Location:
trunk
Files:
1 added
2 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/.classpath

    r7526 r7527  
    1919  <classpathentry kind="lib" path="lib/dist/json-simple-1.1.1.jar"/>
    2020  <classpathentry kind="lib" path="lib/svn/svnant-1.4dev.jar"/>
    21   <classpathentry kind="lib" path="lib/dist/commons-collections-3.1.jar"/>
    2221  <classpathentry kind="lib" path="lib/dist/jdom-2.0.6.jar"/>
    2322  <classpathentry kind="lib" path="lib/dist/jcommon-1.0.23.jar"/>
     
    3534  <classpathentry kind="lib" path="lib/dist/httpcore-4.4.10.jar"/>
    3635  <classpathentry kind="lib" path="lib/dist/commons-email-1.5.jar"/>
     36  <classpathentry kind="lib" path="lib/dist/commons-collections4-4.2.jar"/>
    3737  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
    3838  <classpathentry kind="output" path="xbin"/>
  • trunk/doc/3rd-party-components.txt

    r7526 r7527  
    198198Jar files : javax-mail-1.5.3.jar
    199199
     200Apache Commons Collections 4
     201----------------------------
     202Package for working with collections.
     203
     204More info : https://commons.apache.org/proper/commons-collections/
     205Version   : 4.2
     206License   : Apache License 2.0 (apache.license-2.0.txt)
     207Jar files : commons-collections4-4.2.jar
    200208
    201209jBCrypt
     
    368376Version   : 2.2
    369377License   : Apache License, Version 2.0 (yauaa-LICENSE.txt)
    370 Files     : yauaa-2.2.jar, snakeyaml-1.18.jar, commons-collections4-4.1.jar
     378Files     : yauaa-2.2.jar, snakeyaml-1.18.jar
    371379            commons-lang3-3.6.jar
    372380
  • trunk/src/clients/web/net/sf/basedb/clients/web/extensions/ServletWrapper.java

    r7517 r7527  
    3535import javax.servlet.http.HttpServletResponse;
    3636
    37 import org.apache.commons.collections.iterators.IteratorEnumeration;
     37import org.apache.commons.collections4.iterators.IteratorEnumeration;
    3838
    3939/**
     
    116116  }
    117117
    118   @SuppressWarnings("unchecked")
    119118  @Override
    120119  public Enumeration<String> getInitParameterNames()
    121120  {
    122     return (Enumeration<String>)new IteratorEnumeration(parameters.keySet().iterator());
     121    return new IteratorEnumeration<String>(parameters.keySet().iterator());
    123122  }
    124123
  • trunk/src/core/net/sf/basedb/core/Config.java

    r5595 r7527  
    3636import java.nio.charset.Charset;
    3737
    38 import org.apache.commons.collections.CollectionUtils;
    39 import org.apache.commons.collections.Predicate;
     38import org.apache.commons.collections4.CollectionUtils;
     39import org.apache.commons.collections4.Predicate;
    4040
    4141import net.sf.basedb.util.ComparableComparator;
     
    139139      {
    140140        final Pattern p = Pattern.compile(filter);
    141         CollectionUtils.filter(tmp, new Predicate()
     141        CollectionUtils.filter(tmp, new Predicate<String>()
    142142        {
    143143          @Override
    144           public boolean evaluate(Object o)
     144          public boolean evaluate(String o)
    145145          {
    146             return !p.matcher((String)o).matches() || commonCharsets.contains(o);
     146            return !p.matcher(o).matches() || commonCharsets.contains(o);
    147147          }
    148148        });
  • trunk/src/core/net/sf/basedb/core/ItemList.java

    r6928 r7527  
    3232import java.util.TreeSet;
    3333
    34 import org.apache.commons.collections.CollectionUtils;
    35 import org.apache.commons.collections.Predicate;
     34import org.apache.commons.collections4.CollectionUtils;
     35import org.apache.commons.collections4.Predicate;
    3636
    3737import net.sf.basedb.core.query.Expressions;
     
    235235    }
    236236   
    237     Predicate countFilter = new Predicate()
     237    Predicate<Integer> countFilter = new Predicate<Integer>()
    238238      {
    239239        @Override
    240         public boolean evaluate(Object o)
     240        public boolean evaluate(Integer count)
    241241        {
    242           int count = (Integer)o;
    243242          return minCount <= count && count <= maxCount;
    244243        }
  • trunk/src/core/net/sf/basedb/core/ReporterList.java

    r7308 r7527  
    3131import java.util.Set;
    3232
    33 import org.apache.commons.collections.CollectionUtils;
    34 import org.apache.commons.collections.Predicate;
     33import org.apache.commons.collections4.CollectionUtils;
     34import org.apache.commons.collections4.Predicate;
    3535
    3636import net.sf.basedb.core.data.ReporterListData;
     
    204204    }
    205205    CollectionUtils.filter(union.values(),
    206       new Predicate()
     206      new Predicate<Integer>()
    207207    {
    208208      @Override
    209       public boolean evaluate(Object o)
     209      public boolean evaluate(Integer count)
    210210      {
    211         int count = (Integer)o;
    212211        return minCount <= count && count <= maxCount;
    213212      }
  • trunk/src/core/net/sf/basedb/util/overview/OverviewUtil.java

    r7005 r7527  
    3131import java.util.Set;
    3232
    33 import org.apache.commons.collections.IteratorUtils;
     33import org.apache.commons.collections4.IteratorUtils;
    3434
    3535import net.sf.basedb.core.Annotatable;
     
    210210      (ExtensionsInvoker<ValidationRuleAction>)registry.useExtensions(new ClientContext(dc, overview), settings, "net.sf.basedb.util.overview.validationrule");
    211211   
    212     List<ValidationRuleAction> xtRules = (List<ValidationRuleAction>)IteratorUtils.toList(invoker.iterator());
     212    List<ValidationRuleAction> xtRules = IteratorUtils.toList(invoker.iterator());
    213213    if (xtRules != null && xtRules.size() > 0)
    214214    {
  • trunk/src/core/net/sf/basedb/util/overview/validator/ExtensionNodeValidator.java

    r6875 r7527  
    2525import java.util.List;
    2626
    27 import org.apache.commons.collections.IteratorUtils;
     27import org.apache.commons.collections4.IteratorUtils;
    2828
    2929import net.sf.basedb.core.Application;
     
    190190      Registry registry = Application.getExtensionsManager().getRegistry();
    191191      Settings settings = Application.getExtensionsManager().getSettings();
    192       ExtensionsInvoker<?> invoker = registry.useExtensions(clientContext, settings, "net.sf.basedb.util.overview.validator");
     192      ExtensionsInvoker<NodeValidatorAction<I>> invoker = (ExtensionsInvoker<NodeValidatorAction<I>>)registry.useExtensions(clientContext, settings, "net.sf.basedb.util.overview.validator");
    193193     
    194194      xtValidators = IteratorUtils.toList(invoker.iterator());
  • trunk/src/core/net/sf/basedb/util/uri/ConnectionManagerUtil.java

    r6875 r7527  
    2626import java.util.List;
    2727
    28 import org.apache.commons.collections.IteratorUtils;
     28import org.apache.commons.collections4.IteratorUtils;
    2929
    3030import net.sf.basedb.core.Application;
     
    6666    @return A list with the factories
    6767  */
    68   @SuppressWarnings({ "unchecked", "rawtypes" })
    6968  public static List<ConnectionManagerFactory> getFactories()
    7069  {
    7170    ExtensionsInvoker<ConnectionManagerFactory> invoker = getInvoker(null, null);
    72     List list = IteratorUtils.toList(invoker.iterator(), Math.max(invoker.getNumExtensions(), 1));
     71    List<ConnectionManagerFactory> list = IteratorUtils.toList(invoker.iterator(), Math.max(invoker.getNumExtensions(), 1));
    7372    return list;
    7473  }
Note: See TracChangeset for help on using the changeset viewer.