Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is() check should always be executed when instantiating a model #7

Open
PeterWippermann opened this issue Apr 28, 2016 · 0 comments
Open

Comments

@PeterWippermann
Copy link

In org.senchalabs.gwt.gwtdriver.models.GwtWidget.GwtWidget(WebDriver, WebElement) there is an assertion:
assert is(getClass()) : "Not actually a widget, shouldn't be wrapped up as a widget";

To me this is a very useful check at runtime. However, since it's implemented as an assertion it isn't executed by default, since assertions are turned off in the JVM by default.
Of course, I could turn on assertions for myself but this would mean I would have to ensure they are turned on in all our development environments and I would have to confige my CI machine resp. my Maven config to have them turned on there as well.

So wouldn't it be a nice alternative to implement this check in an if-clause and raising an exception? Or does this have any significant drawbacks, e.g. on runtime?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant