java.util.ConcurrentModificationException.toString()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(98)

本文整理了Java中java.util.ConcurrentModificationException.toString()方法的一些代码示例,展示了ConcurrentModificationException.toString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ConcurrentModificationException.toString()方法的具体详情如下:
包路径:java.util.ConcurrentModificationException
类名称:ConcurrentModificationException
方法名:toString

ConcurrentModificationException.toString介绍

暂无

代码示例

代码示例来源:origin: hibernate/hibernate-orm

@Test
  @TestForIssue( jiraKey = "HHH-7446" )
  public void testUniqueConstraintAnnotationOnNaturalIds() throws Exception {
    Configuration configuration = new Configuration();
    configuration.setProperty( Environment.HBM2DDL_AUTO, "create-drop" );
    configuration.addAnnotatedClass(Month.class);
    SessionFactory sf = null;
    try {
      sf = configuration.buildSessionFactory();
      sf.close();
    }
    catch (ConcurrentModificationException e) {
      fail(e.toString()); 
    }
  }
}

代码示例来源:origin: org.glassfish.main.persistence.cmp/cmp-support-ejb

public void remove() {
    assertIsValid();
    assertInTransaction();
    try {
      _iterator.remove();
    } catch(ConcurrentModificationException e) {
      IllegalStateException ise = new IllegalStateException(
          e.toString());
      ise.initCause(e);
      throw ise;
    }
  }
}

代码示例来源:origin: org.glassfish.main.persistence.cmp/cmp-support-ejb

public Object next() {
  assertIsValid();
  assertInTransaction();
  try {
    lastReturned = _iterator.next();
  } catch(ConcurrentModificationException e) {
    IllegalStateException ise = new IllegalStateException(
        e.toString());
    ise.initCause(e);
    throw ise;
  }
  return  helper.convertPCToEJBLocalObject(lastReturned, pm);
}

代码示例来源:origin: com.dtrules/dtrules

}catch(ConcurrentModificationException e){
  String ps = generatePostfix(cnt);
  RulesException re = new RulesException("access error",array.get(cnt).postFix(),e.toString()+"\r\n"+
      "This happens generally when you have attempted to modify an array\r\n "+
      "which is in the context because you are iterating over its contents\r\n"+

相关文章