Skip to content

Commit

Permalink
[hotfix] [formats] Dependency and code clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
twalthr committed Feb 23, 2018
1 parent 461d66e commit 1b1c002
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 30 deletions.
26 changes: 0 additions & 26 deletions flink-formats/flink-json/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,32 +50,6 @@ under the License.
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<!-- test dependencies -->

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-core</artifactId>
<version>${project.version}</version>
<scope>test</scope>
<type>test-jar</type>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
* <p>This converter has been developed for JSON Schema draft-07 but also includes keywords of
* older drafts to be as compatible as possible.
*/
@SuppressWarnings("OptionalIsPresent")
public final class JsonSchemaConverter {

private JsonSchemaConverter() {
Expand Down Expand Up @@ -180,9 +179,9 @@ else if (typeNode.isTextual()) {
}
}
}
// use TYPE of reference as fallback
else if (ref.isPresent() && ref.get().has(TYPE)) {
typeSet.add(convertType(node.get(REF).asText(), ref.get(), root));
// use TYPE of reference as fallback if present
else {
ref.filter(r -> r.has(TYPE)).ifPresent(r -> typeSet.add(convertType(node.get(REF).asText(), r, root)));
}

// simple interpretation of ONE_OF for supporting "object or null"
Expand Down

0 comments on commit 1b1c002

Please sign in to comment.