Examples of AssertionError


Examples of java.lang.AssertionError

                mVal = new String(mArgs[++mArgNum]);
            }
            return cc.charValue();

        default:
            throw new AssertionError("Unknown valueExpected state");

        }

    } finally {
        mArgNum++;
View Full Code Here

Examples of java.lang.AssertionError

* used.
*/
public void registerOpt(char c, String s, ValueExpected ve)
{
    if (c == '-') {
        throw new AssertionError("CmdLineParser:  '-' is not a legal single character designator.");
    }

    Character cc = Character.valueOf(c);
    if (mShort.put(cc, ve) != null) {
        throw new AssertionError("CmdLineParser:  You have already registered option " + cc.toString());
    }

    if (mLong != null) {
        if (mLong.put(s, cc) != null) {
            throw new AssertionError("CmdLineParser:  You have already registered option " + s);
        }
    }
}
View Full Code Here

Examples of java.lang.AssertionError

                mVal = mArgs[++mArgNum];
            }
            return cc.charValue();

        default:
            throw new AssertionError("Unknown valueExpected state");

        }

    } finally {
        mArgNum++;
View Full Code Here

Examples of java.lang.AssertionError

                    {
                        System.err.printf("Error while reading Super Column %s key %s - %s%n", superColumn, ByteBufferUtil.string(key), getExceptionMessage(e));
                    }
                    catch (CharacterCodingException e1)
                    {
                        throw new AssertionError(e1); // keys are valid string
                    }

                    if (!session.ignoreErrors())
                        break;
                }
View Full Code Here

Examples of java.lang.AssertionError

* used.
*/
public void registerOpt(char c, String s, ValueExpected ve)
{
    if (c == '-') {
        throw new AssertionError("CmdLineParser:  '-' is not a legal single character designator.");
    }

    Character cc = new Character(c);
    if (mShort.put(cc, ve) != null) {
        throw new AssertionError("CmdLineParser:  You have already registered option " + cc.toString());
    }

    if (mLong != null) {
        if (mLong.put(s, cc) != null) {
            throw new AssertionError("CmdLineParser:  You have already registered option " + s);
        }
    }
}
View Full Code Here

Examples of java.lang.AssertionError

                mVal = new String(mArgs[++mArgNum]);
            }
            return cc.charValue();

        default:
            throw new AssertionError("Unknown valueExpected state");

        }

    } finally {
        mArgNum++;
View Full Code Here

Examples of java.lang.AssertionError

* used.
*/
public void registerOpt(char c, String s, ValueExpected ve)
{
    if (c == '-') {
        throw new AssertionError("CmdLineParser:  '-' is not a legal single character designator.");
    }

    Character cc = new Character(c);
    if (mShort.put(cc, ve) != null) {
        throw new AssertionError("CmdLineParser:  You have already registered option " + cc.toString());
    }

    if (mLong != null) {
        if (mLong.put(s, cc) != null) {
            throw new AssertionError("CmdLineParser:  You have already registered option " + s);
        }
    }
}
View Full Code Here

Examples of java.lang.AssertionError

                mVal = new String(mArgs[++mArgNum]);
            }
            return cc.charValue();

        default:
            throw new AssertionError("Unknown valueExpected state");

        }

    } finally {
        mArgNum++;
View Full Code Here

Examples of java.lang.AssertionError

   * @throws AssertionError if any.
   */
  public static void assertMinimizeNotPossible( @NotNull List<? extends Module> modules, @NotNull Key<?>... keys ) throws AssertionError {
    GuiceModulesHelper.Result minimal = minimize( modules, keys );
    if ( !minimal.getRemoved().isEmpty() ) {
      throw new AssertionError( "Can be minimized:\nRemove:\n" + minimal.getRemovedClassNamesAsString() + minimal.asInstantiations() );
    }
  }
View Full Code Here

Examples of org.eclipse.wst.wsi.internal.report.AssertionError

                          lineNumber = el.getLineNumber();
                          columnNumber = el.getColumnNumber();
                        }

                        assertionerrors.add(
                          new AssertionError(ta.getId(), ta.getFailureMessage(), lineNumber, columnNumber));
                      }
                    }
                    // the errorMessageList is null but there is an error so assign it to line 0 for now
                    else
                    {
                      assertionerrors.add(new AssertionError(ta.getId(), ta.getFailureMessage(), 0, 0));
                    }
                  }
                }
                else if (ar.getResult().equalsIgnoreCase(FAILED) &&
                         wsiPreferences.getComplianceLevel().equals(WSITestToolsProperties.WARN_NON_WSI))
                {
                  if (ta.isEnabled())
                  {
                    List errorMessageList = ar.getFailureDetailList();
                    if (errorMessageList != null)
                    {
                      Iterator errorMessages = errorMessageList.iterator();
                      while (errorMessages.hasNext())
                      {
                        FailureDetailImpl fdi = (FailureDetailImpl) errorMessages.next();
                        int lineNumber = 0;
                        int columnNumber = 0;

                        ElementLocation el = fdi.getElementLocation();

                        if (el != null)
                        {
                          lineNumber = el.getLineNumber();
                          columnNumber = el.getColumnNumber();
                        }
                        assertionwarnings.add(
                          new AssertionError(ta.getId(), ta.getFailureMessage(), lineNumber, columnNumber));
                      }
                    }
                    // the errorMessageList is null but there is an error so assign it to line 0 for now
                    else
                    {
                      assertionwarnings.add(new AssertionError(ta.getId(), ta.getFailureMessage(), 0, 0));
                    }
                  }
                }
              }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.