java.lang.IndexOutOfBoundsException.printStackTrace()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(110)

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

IndexOutOfBoundsException.printStackTrace介绍

暂无

代码示例

代码示例来源:origin: xinghongfei/LookLook

@Override
  public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) {
    try {
      super.onLayoutChildren(recycler, state);
    } catch (IndexOutOfBoundsException e) {
      e.printStackTrace();
    }
  }
}

代码示例来源:origin: TeamNewPipe/NewPipe

public boolean isLive() {
  if (simpleExoPlayer == null) return false;
  try {
    return simpleExoPlayer.isCurrentWindowDynamic();
  } catch (@NonNull IndexOutOfBoundsException ignored) {
    // Why would this even happen =(
    // But lets log it anyway. Save is save
    if (DEBUG) Log.d(TAG, "Could not update metadata: " + ignored.getMessage());
    if (DEBUG) ignored.printStackTrace();
    return false;
  }
}

代码示例来源:origin: plutext/docx4j

e.printStackTrace();
throw new DiffXException(e);

代码示例来源:origin: weexteam/weex-hackernews

public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) {
 try {
  super.onLayoutChildren(recycler, state);
 } catch (IndexOutOfBoundsException e) {
   e.printStackTrace();
 }
}

代码示例来源:origin: oubowu/PinnedSectionItemDecoration

@Override
public void onLongPress(MotionEvent e) {
  Log.i(TAG, "GestureListener-onLongPress(): ");
  shouldIntercept(e);
  if (!mDisableHeaderClick && mIntercept && mHeaderClickListener != null && mAdapter != null && mPosition <= mAdapter.getItemCount() - 1) {
    // 自己处理点击标签事件
    try {
      mHeaderClickListener.onHeaderLongClick(mTmpView, mTmpClickId, mPosition);
    } catch (IndexOutOfBoundsException e1) {
      e1.printStackTrace();
      Log.i(TAG, "GestureListener-onLongPress(): " + e1);
    }
  }
}

代码示例来源:origin: oubowu/PinnedSectionItemDecoration

@Override
public boolean onSingleTapUp(MotionEvent e) {
  Log.i(TAG, "GestureListener-onSingleTapUp(): ");
  shouldIntercept(e);
  if (!mDisableHeaderClick && mIntercept && mHeaderClickListener != null && mAdapter != null && mPosition <= mAdapter.getItemCount() - 1) {
    // 自己处理点击标签事件
    try {
      mHeaderClickListener.onHeaderClick(mTmpView, mTmpClickId, mPosition);
    } catch (IndexOutOfBoundsException e1) {
      e1.printStackTrace();
    }
  }
  return mIntercept;
}

代码示例来源:origin: tianshaojie/AndroidFine

@Override
protected void dispatchDraw(Canvas canvas) {
  /**
   * This is a bit hacky, but Samsung's ListView has got a bug in it
   * when using Header/Footer Views and the list is empty. This masks
   * the issue so that it doesn't cause an FC. See Issue #66.
   */
  try {
    super.dispatchDraw(canvas);
  } catch (IndexOutOfBoundsException e) {
    e.printStackTrace();
  }
}

代码示例来源:origin: tianshaojie/AndroidFine

@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
  /**
   * This is a bit hacky, but Samsung's ListView has got a bug in it
   * when using Header/Footer Views and the list is empty. This masks
   * the issue so that it doesn't cause an FC. See Issue #66.
   */
  try {
    return super.dispatchTouchEvent(ev);
  } catch (IndexOutOfBoundsException e) {
    e.printStackTrace();
    return false;
  }
}

代码示例来源:origin: oubowu/PinnedSectionItemDecoration

@Override
public boolean onDoubleTap(MotionEvent e) {
  Log.i(TAG, "GestureListener-onDoubleTap(): ");
  shouldIntercept(e);
  if (!mDisableHeaderClick && mIntercept && mHeaderClickListener != null && mAdapter != null && mPosition <= mAdapter.getItemCount() - 1) {
    // 自己处理点击标签事件
    try {
      mHeaderClickListener.onHeaderClick(mTmpView, mTmpClickId, mPosition);
    } catch (IndexOutOfBoundsException e1) {
      e1.printStackTrace();
    }
  }
  // 有机型在调用onDoubleTap后会接着调用onLongPress,这里这样处理
  mGestureDetector.setIsLongpressEnabled(false);
  return mIntercept;
}

代码示例来源:origin: weexteam/weex-hackernews

e.printStackTrace();

代码示例来源:origin: diffplug/spotless

e.printStackTrace();
return 0;

代码示例来源:origin: EvoSuite/evosuite

/**
 * @throws IndexOutOfBoundsException iff (i<0)
 */
public static int notNegative(final int i) {
 if (i < 0) {
   IndexOutOfBoundsException e = new IndexOutOfBoundsException();
  e.printStackTrace();
  throw e;
 }
 
 return i;
}

代码示例来源:origin: jMetal/jMetal

public void repaint() {
  try {
    for (int i = 0; i < this.charts.values().size(); i++) {
      this.sw.repaintChart(i);
    }
  } catch (IndexOutOfBoundsException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
  }
}

代码示例来源:origin: myxh/CoolShopping

@Override
protected void dispatchDraw(Canvas canvas) {
  /**
   * This is a bit hacky, but Samsung's ListView has got a bug in it
   * when using Header/Footer Views and the list is empty. This masks
   * the issue so that it doesn't cause an FC. See Issue #66.
   */
  try {
    super.dispatchDraw(canvas);
  } catch (IndexOutOfBoundsException e) {
    e.printStackTrace();
  }
}

代码示例来源:origin: gdpancheng/LoonAndroid3

@Override
protected void dispatchDraw(Canvas canvas) {
  /**
   * This is a bit hacky, but Samsung's ListView has got a bug in it when using Header/Footer Views and the list is empty. This masks the issue so that it doesn't cause an FC. See Issue #66.
   */
  try {
    super.dispatchDraw(canvas);
  } catch (IndexOutOfBoundsException e) {
    e.printStackTrace();
  }
}

代码示例来源:origin: gdpancheng/LoonAndroid3

@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
  /**
   * This is a bit hacky, but Samsung's ListView has got a bug in it when using Header/Footer Views and the list is empty. This masks the issue so that it doesn't cause an FC. See Issue #66.
   */
  try {
    return super.dispatchTouchEvent(ev);
  } catch (IndexOutOfBoundsException e) {
    e.printStackTrace();
    return false;
  }
}

代码示例来源:origin: sunfusheng/GroupRecyclerViewAdapter

@Override
  public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) {
    try {
      super.onLayoutChildren(recycler, state);
    } catch (IndexOutOfBoundsException e) {
      e.printStackTrace();
    }
  }
}

代码示例来源:origin: bzsome/VirtualApp-x326

@Override
public int getMovementFlags(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) {
  try {
    AppData data = mLaunchpadAdapter.getList().get(viewHolder.getAdapterPosition());
    if (!data.canReorder()) {
      return makeMovementFlags(0, 0);
    }
  } catch (IndexOutOfBoundsException e) {
    e.printStackTrace();
  }
  return super.getMovementFlags(recyclerView, viewHolder);
}

代码示例来源:origin: SmartDataAnalytics/DL-Learner

public void add(MonKeyImp monkey, int index, double value) {
  try {
    get(monkey).getMonitors()[index].add(value);
  } catch (IndexOutOfBoundsException e) {
    e.printStackTrace();
    logger.error("index too big, is: "+index+" max = " +  get(monkey).getMonitors().length);
  }
}

代码示例来源:origin: weexteam/weex-hackernews

e.printStackTrace();
 WXLogUtils.e("Dom module call miss arguments.");
} catch (ClassCastException cce) {

相关文章