Example usage for java.lang CloneNotSupportedException printStackTrace

List of usage examples for java.lang CloneNotSupportedException printStackTrace

Introduction

In this page you can find the example usage for java.lang CloneNotSupportedException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:com.supremainc.biostar2.user.MyProfileFragment.java

private void editAccessGroup() {
    Bundle bundle = new Bundle();
    try {/*from  w  ww  .  j a va2  s .co  m*/
        bundle.putSerializable(User.TAG, mUserInfo.clone());
        bundle.putSerializable(Setting.DISABLE_MODIFY, true);
    } catch (CloneNotSupportedException e) {
        e.printStackTrace();
        return;
    }
    mScreenControl.addScreen(ScreenType.USER_ACCESS_GROUP, bundle);
}

From source file:com.supremainc.biostar2.user.MyProfileFragment.java

private void editCard() {
    Bundle bundle = new Bundle();
    try {/*from   w  w w .  j  a  va 2 s .  co m*/
        bundle.putSerializable(User.TAG, mUserInfo.clone());
        bundle.putSerializable(Setting.DISABLE_MODIFY, true);
    } catch (CloneNotSupportedException e) {
        e.printStackTrace();
        return;
    }
    mScreenControl.addScreen(ScreenType.CARD_RIGISTER, bundle);
}

From source file:com.supremainc.biostar2.user.MyProfileFragment.java

private void editFingerPrint() {
    Bundle bundle = new Bundle();
    try {//  w  w  w.j  a  va  2  s . co m
        bundle.putSerializable(User.TAG, mUserInfo.clone());
        bundle.putSerializable(Setting.DISABLE_MODIFY, true);
    } catch (CloneNotSupportedException e) {
        e.printStackTrace();
        return;
    }
    mScreenControl.addScreen(ScreenType.FINGERPRINT_REGISTER, bundle);
}

From source file:com.supremainc.biostar2.user.MyProfileFragment.java

private void editOperator() {
    Bundle bundle = new Bundle();
    try {//from   w w  w  .ja  va 2  s .  c  om
        bundle.putSerializable(User.TAG, mUserInfo.clone());
        bundle.putSerializable(Setting.DISABLE_MODIFY, true);
    } catch (CloneNotSupportedException e) {
        e.printStackTrace();
        return;
    }
    mScreenControl.addScreen(ScreenType.USER_PERMISSION, bundle);
}

From source file:org.saiku.adhoc.service.report.SaikuAdhocPreProcessor.java

@Override
public MasterReport performPreProcessing(final MasterReport definition,
        final DefaultFlowController flowController) throws ReportProcessingException {

    try {//from w  ww. ja va 2 s .  co  m
        return (MasterReport) performCommonPreProcessing(definition, flowController,
                definition.getResourceManager());
    } catch (CloneNotSupportedException e) {
        e.printStackTrace();
    }

    return definition;

}

From source file:com.supremainc.biostar2.user.MyProfileFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    Log.e(TAG, "onSaveInstanceState");
    User bundleItem = null;/*from  w w  w.  j  av a 2s  .  c o  m*/
    try {
        bundleItem = (User) mUserInfo.clone();
    } catch (CloneNotSupportedException e) {
        e.printStackTrace();
        return;
    }
    outState.putSerializable(User.TAG, bundleItem);
    outState.putInt("photoStatus", mPhotoStatus.ordinal());
}

From source file:com.supremainc.biostar2.user.MyProfileFragment.java

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    if (super.onOptionsItemSelected(item)) {
        return true;
    }//from w  w w  .j  a va 2 s.  c o m
    switch (item.getItemId()) {
    case R.id.action_save:
        if (mInvalidChecker.isEmptyString(getString(R.string.info), getString(R.string.user_create_empty),
                mLayout.getUserID())) {
            return true;
        }

        if (mLayout.isOperator()) {
            if (mInvalidChecker.isEmptyString(getString(R.string.info),
                    getString(R.string.user_create_empty_idpassword), mLayout.getUserLoginID())) {
                return true;
            }
            if (!mUserInfo.password_exist) {
                if (mPasswordData == null) {
                    mPopup.show(PopupType.ALERT, getString(R.string.info),
                            getString(R.string.user_create_empty_idpassword), null, null, null);
                    return true;
                }
            }
        }

        if (mInvalidChecker.isInvalidEmail(getString(R.string.info), getString(R.string.invalid_email),
                mLayout.getEmail())) {
            return true;
        }

        if (mPinData != null && mPinData.length() > 0 && mPinData.length() < 4) {
            mPopup.show(PopupType.ALERT, getString(R.string.info), getString(R.string.pincount), null, null,
                    null);
            return true;
        }

        UpdateClone();
        mPopup.showWait(true);
        User user = null;
        try {
            user = mUserInfo.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
            return true;
        }
        mUserDataProvider.modifyMyProfile(TAG, user, mModifyUserListener, mModifyUserErrorListener, null);
        return true;
    default:
        break;
    }
    return false;
}

From source file:jdbc.pool.CConnectionPoolManager.java

/**
 * Returns the pool attributes for the specified pool.
 * //ww  w. j  a  v a  2s .c o  m
 * If the pool is not found in the configurations then the method returns null.
 * 
 * @param pstrPoolName Name of the pool.
 * @return CPoolAttribute
 * @since 12.00.001
 */
public CPoolAttribute getPoolAttributes(String pstrPoolName) {
    if (myPoolAttributes_.containsKey(pstrPoolName)) {
        CPoolAttribute attrib = null;
        try {
            attrib = (CPoolAttribute) ((CPoolAttribute) myPoolAttributes_.get(pstrPoolName)).clone();
            //                attrib.setPassword(null);
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return attrib;
    }
    return null;
}

From source file:org.jfree.data.time.junit.TimeSeriesTest.java

/**
 * A test for bug 1832432./*from   ww  w . jav a  2s .  c om*/
 */
public void testBug1832432() {
    TimeSeries s1 = new TimeSeries("Series");
    TimeSeries s2 = null;
    try {
        s2 = (TimeSeries) s1.clone();
    } catch (CloneNotSupportedException e) {
        e.printStackTrace();
    }
    assertTrue(s1 != s2);
    assertTrue(s1.getClass() == s2.getClass());
    assertTrue(s1.equals(s2));

    // test independence
    s1.add(new Day(1, 1, 2007), 100.0);
    assertFalse(s1.equals(s2));
}

From source file:org.jfree.data.time.junit.TimeSeriesTest.java

/**
 * Another test of the clone() method./*ww w.ja v a  2  s. c  o  m*/
 */
public void testClone2() {
    TimeSeries s1 = new TimeSeries("S1");
    s1.add(new Year(2007), 100.0);
    s1.add(new Year(2008), null);
    s1.add(new Year(2009), 200.0);
    TimeSeries s2 = null;
    try {
        s2 = (TimeSeries) s1.clone();
    } catch (CloneNotSupportedException e) {
        e.printStackTrace();
    }
    assertTrue(s1.equals(s2));

    // check independence
    s2.addOrUpdate(new Year(2009), 300.0);
    assertFalse(s1.equals(s2));
    s1.addOrUpdate(new Year(2009), 300.0);
    assertTrue(s1.equals(s2));
}