Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-12240

ReadOnlyCollectionView2X fails on iterator.next

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.7.6
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Ignite Flags:
      Docs Required, Release Notes Required

      Description

      Simple reproducer below will throw NoSuchElementException.
      Iterator only works if one call hasNext before next.

          /** */
          @Test
          public void testReadOnlyCollection() throws Exception {
              Collection<String> c1 = Collections.emptyList();
              Collection<String> c2 = Arrays.asList("1");
      
              ReadOnlyCollectionView2X<String> view = new ReadOnlyCollectionView2X<>(c1, c2);
      
              assertEquals("1", view.iterator().next());
          }
      

        Attachments

          Activity

            People

            • Assignee:
              kcheng.mvp kcheng.mvp
              Reporter:
              nizhikov Nikolay Izhikov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: