Added several Assert.notNul(...) calls #175

Merged
merged 3 commits into from Jun 3, 2016

Projects

None yet

3 participants

@hendrikebbers
Member
hendrikebbers commented May 18, 2016 edited

Refactored all "if(X == null) throw NPE" blocks to Assert.notNull(...)


This change is Reviewable

@hendrikebbers hendrikebbers Added several Assert.notNul(...) calls
81538ee
@coveralls

Coverage Status

Coverage decreased (-0.05%) to 65.26% when pulling 81538ee on asserts into 7551feb on master.

@hendrikebbers hendrikebbers added this to the 0.8.6 milestone May 18, 2016
@aalmiray
Contributor
aalmiray commented Jun 3, 2016

Reviewed 27 of 27 files at r1.
Review status: all files reviewed at latest revision, 4 unresolved discussions, some commit checks failed.


platform/dolphin-platform-client-javafx/src/main/java/com/canoo/dolphin/client/javafx/FXWrapper.java, line 46 [r1] (raw file):

     */
    public static DoubleProperty wrapDoubleProperty(final Property<Double> dolphinProperty) {
        requireNonNull(dolphinProperty, "dolphinProperty");

please be consistent. Either use imports or qualify the static method with the owning class name


platform/dolphin-platform-client-javafx/src/main/java/com/canoo/dolphin/client/javafx/impl/DefaultDolphinBinder.java, line 36 [r1] (raw file):

    public DefaultDolphinBinder(final Property<S> property) {
        this.property = Assert.requireNonNull(property, "property");;

remove extra semicolon


platform/dolphin-platform-server-javaee/src/main/java/com/canoo/dolphin/server/javaee/ModelInjectionException.java, line 28 [r1] (raw file):

    }

    public ModelInjectionException(final String message) {

why are these arguments made final? This exception class follows the standard impl template. No additional operations were performed in the constructors


platform/dolphin-platform-server/src/main/java/com/canoo/dolphin/server/context/DolphinSessionImpl.java, line 36 [r1] (raw file):

    public DolphinSessionImpl(String dolphinSessionId) {
        Assert.requireNonBlank(dolphinSessionId, "dolphinSessionId");

these 2 lines can be merged


Comments from Reviewable

@hendrikebbers hendrikebbers Merge branch 'master' into asserts
# Conflicts:
#	platform/dolphin-platform-server/src/main/java/com/canoo/dolphin/server/controller/ControllerHandler.java
d69d065
@hendrikebbers
Member

Review status: 13 of 27 files reviewed at latest revision, 4 unresolved discussions.


platform/dolphin-platform-client-javafx/src/main/java/com/canoo/dolphin/client/javafx/impl/DefaultDolphinBinder.java, line 36 [r1] (raw file):

Previously, aalmiray (Andres Almiray) wrote…

remove extra semicolon

Done

platform/dolphin-platform-server-javaee/src/main/java/com/canoo/dolphin/server/javaee/ModelInjectionException.java, line 28 [r1] (raw file):

Previously, aalmiray (Andres Almiray) wrote…

why are these arguments made final? This exception class follows the standard impl template. No additional operations were performed in the constructors

Done

platform/dolphin-platform-server/src/main/java/com/canoo/dolphin/server/context/DolphinSessionImpl.java, line 36 [r1] (raw file):

Previously, aalmiray (Andres Almiray) wrote…

these 2 lines can be merged

Done

platform/dolphin-platform-client-javafx/src/main/java/com/canoo/dolphin/client/javafx/FXWrapper.java, line 46 [r1] (raw file):

Previously, aalmiray (Andres Almiray) wrote…

please be consistent. Either use imports or qualify the static method with the owning class name

Done

Comments from Reviewable

@hendrikebbers hendrikebbers Based on review
fc71323
@hendrikebbers hendrikebbers merged commit 3789b9d into master Jun 3, 2016

0 of 3 checks passed

code-review/reviewable 14 files, 4 discussions left (aalmiray)
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
@hendrikebbers hendrikebbers deleted the asserts branch Jun 3, 2016
@aalmiray aalmiray removed the in progress label Jun 3, 2016
@coveralls

Coverage Status

Coverage decreased (-0.03%) to 64.635% when pulling fc71323 on asserts into 8a768fc on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment