Skip to content

Commit 34280c0

Browse files
committed
Cleanup
1 parent 2245ab1 commit 34280c0

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

src/main/java/com/saasquatch/jsonschemainferrer/JsonSchemaInferrer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ private Set<ObjectNode> processPrimitives(@Nonnull Collection<ValueNode> valueNo
244244
final String format = anyOf.path(Consts.Fields.FORMAT).textValue();
245245
@Nonnull
246246
final PrimitivesSummary primitivesSummary =
247-
primitivesSummaryMap.getPrimitivesSummary(type, format);
247+
Objects.requireNonNull(primitivesSummaryMap.getPrimitivesSummary(type, format));
248248
processGenericSchemaFeature(anyOf, primitivesSummary.getSamples(), type);
249249
}
250250
return anyOfs;

src/main/java/com/saasquatch/jsonschemainferrer/JsonSchemaInferrerBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public JsonSchemaInferrerBuilder setIntegerTypePreference(
6060
}
6161

6262
/**
63-
* Set the {@link IntegerTypeCriterionL}. The default is
63+
* Set the {@link IntegerTypeCriterion}. The default is
6464
* {@link IntegerTypeCriteria#nonFloatingPoint()}.
6565
*
6666
* @see IntegerTypeCriterion

src/main/java/com/saasquatch/jsonschemainferrer/JunkDrawer.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,7 @@ static Stream<JsonNode> getAllValuesForFieldName(
176176
}
177177

178178
/**
179-
*
180179
* @param samples Assumed to be {@link ObjectNode}s
181-
* @param requireNonNull
182180
* @return The field names common to the given samples
183181
*/
184182
@Nonnull
@@ -205,7 +203,7 @@ static Set<String> getCommonFieldNames(@Nonnull Iterable<? extends JsonNode> sam
205203
/**
206204
* Get the length of the Base64 String for the given number of bytes
207205
*/
208-
static int getBase64Length(@Nonnull int bytesLength) {
206+
static int getBase64Length(int bytesLength) {
209207
return (bytesLength + 2) / 3 * 4;
210208
}
211209

src/test/java/com/saasquatch/jsonschemainferrer/JsonSchemaInferrerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void testBasic() {
4949
}
5050

5151
@Test
52-
public void testSimpleExample() throws Exception {
52+
public void testSimpleExample() {
5353
final JsonNode simple = loadJson("simple.json");
5454
{
5555
final ObjectNode schema = JsonSchemaInferrer.newBuilder().build().inferForSample(simple);
@@ -91,7 +91,7 @@ public void testSimpleExample() throws Exception {
9191
}
9292

9393
@Test
94-
public void testAdvancedExample() throws Exception {
94+
public void testAdvancedExample() {
9595
final JsonNode advanced = loadJson("advanced.json");
9696
{
9797
final ObjectNode schema = JsonSchemaInferrer.newBuilder().build().inferForSample(advanced);

0 commit comments

Comments
 (0)