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

ReadOnlyCollectionView2X fails on iterator.next

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.7.6
    • None
    • None
    • 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

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

            Dates

              Created:
              Updated: