Test Blame

src/test/java/org/apache/commons/jxpath/util/ValueUtilsTest.java
TagDateBlameLineSource
  latest    Tue Nov 24 16:21:28 UTC 2015    4787cc  73
    public void testGetValueFromSetNegativeIndex() {
  latest    Tue Nov 24 16:21:28 UTC 2015    4787cc  74
        final Object data = new Object();
  latest    Tue Nov 24 16:21:28 UTC 2015    4787cc  75
        final Set dataSet = new HashSet();
  latest    Tue Nov 24 16:21:28 UTC 2015    4787cc  76
        dataSet.add(data);
  latest    Tue Nov 24 16:21:28 UTC 2015    4787cc  77
        assertNull(ValueUtils.getValue(dataSet, -1));
  latest    Tue Nov 24 16:21:28 UTC 2015    4787cc  78
    }

Found Source Blame

src/main/java/org/apache/commons/jxpath/util/ValueUtils.java
TagDateBlameLineSource
  jwsdp_10_ea2_01    Thu Aug 23 00:47:02 UTC 2001    bc53a6  44
    private static Map dynamicPropertyHandlerMap = new HashMap();
  JXPATH_1_2    Sun Apr 04 22:06:36 UTC 2004    755483  292
        collection = getValue(collection);
  jwsdp_10_ea2_01    Thu Aug 23 00:47:02 UTC 2001    bc53a6  293
        Object value = collection;
  JXPATH_1_1_BETA_1    Sat Jan 11 05:41:27 UTC 2003    2327c4  294
        if (collection != null) {
  JXPATH_1_1_BETA_1    Sat Jan 11 05:41:27 UTC 2003    2327c4  295
            if (collection.getClass().isArray()) {
  JXPATH_1_1_BETA_1    Sat Jan 11 05:41:27 UTC 2003    2327c4  296
                if (index < 0 || index >= Array.getLength(collection)) {
  JXPATH_1_1_BETA_1    Wed Apr 10 03:40:21 UTC 2002    34b7a4  297
                    return null;
  jwsdp_10_ea2_01    Thu Aug 23 00:47:02 UTC 2001    bc53a6  299
                value = Array.get(collection, index);
  JXPATH_1_1_BETA_1    Sat Jan 11 05:41:27 UTC 2003    2327c4  301
            else if (collection instanceof List) {
  JXPATH_1_1_BETA_1    Sat Jan 11 05:41:27 UTC 2003    2327c4  302
                if (index < 0 || index >= ((List) collection).size()) {
  JXPATH_1_1_BETA_1    Wed Apr 10 03:40:21 UTC 2002    34b7a4  303
                    return null;
  JXPATH_1_1_BETA_1    Sat Jan 11 05:41:27 UTC 2003    2327c4  305
                value = ((List) collection).get(index);
  JXPATH_1_1_BETA_1    Sat Jan 11 05:41:27 UTC 2003    2327c4  307
            else if (collection instanceof Collection) {
  JXPATH_1_1_BETA_1    Wed Apr 10 03:40:21 UTC 2002    34b7a4  312
                int i = 0;
  JXPATH_1_1_BETA_1    Sat Jan 11 05:41:27 UTC 2003    2327c4  313
                Iterator it = ((Collection) collection).iterator();
  JXPATH_1_1_BETA_1    Sat Jan 11 05:41:27 UTC 2003    2327c4  314
                for (; i < index; i++) {
  JXPATH_1_1_BETA_1    Sat Jan 11 05:41:27 UTC 2003    2327c4  317
                if (it.hasNext()) {
  jwsdp_10_ea2_01    Thu Aug 23 00:47:02 UTC 2001    bc53a6  318
                    value = it.next();
  jwsdp_10_ea2_01    Thu Aug 23 00:47:02 UTC 2001    bc53a6  325
        return value;
  JXPATH_1_2    Sun Apr 04 22:06:36 UTC 2004    755483  528
        while (object instanceof Container) {
  JXPATH_1_2    Sun Apr 04 22:06:36 UTC 2004    755483  531
        return object;