Skip to content

Commit

Permalink
capitalize nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
elucash committed Dec 30, 2017
1 parent d7994f7 commit 30a7af5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

@Nonnull(when = When.MAYBE)
@TypeQualifierNickname
public @interface nullable {}
public @interface Nullable {}
7 changes: 3 additions & 4 deletions src/io/immutables/lang/typing/Checking.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package io.immutables.lang.typing;

import io.immutables.nullable;
import io.immutables.Nullable;
import io.immutables.lang.typing.Type.Declared;
import io.immutables.lang.typing.Type.Product;
import java.util.Arrays;
import javax.annotation.Nullable;

interface Checking {
@Deprecated
Expand Down Expand Up @@ -117,7 +116,7 @@ public Type product(Type.Product expected, Type actual) {
@Override
public Type product(Type.Product actual, Type.Product expected) {
Type[] actualComponents = actual.components();
@nullable Type[] matched = matchComponentwise(expected.components(), actualComponents);
@Nullable Type[] matched = matchComponentwise(expected.components(), actualComponents);
if (matched != null) {
return actualComponents != matched ? Type.Product.of(matched) : actual;
}
Expand Down Expand Up @@ -181,7 +180,7 @@ public Type parameter(Type.Parameter expected, Type actual) {
return arguments[i] = actual;
}

protected @nullable Type[] matchComponentwise(Type[] expect, Type[] actual) {
protected @Nullable Type[] matchComponentwise(Type[] expect, Type[] actual) {
if (expect.length != actual.length) return null;
Type[] result = null; // may be needed if we're copying
for (int i = 0; i < expect.length; i++) {
Expand Down

0 comments on commit 30a7af5

Please sign in to comment.