Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/main/kotlin/graphql/kickstart/tools/SchemaParserDictionary.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,6 @@ class SchemaParserDictionary {
*/
fun toMap(): Map<String, Class<*>> = dictionary.toMap()

// TODO remove in 15.0.0 (#900)
/**
* Returns a copy of the entries added so far. If several types share a class, the inverse of the copy only maps that class
* back to the first of them.
*/
@Deprecated("Use toMap() instead", ReplaceWith("toMap()"))
@Suppress("DEPRECATION")
fun getDictionary(): graphql.kickstart.tools.util.BiMap<String, Class<*>> =
graphql.kickstart.tools.util.BiMap.unmodifiableCopyOf(dictionary)

/**
* Add arbitrary classes to the parser's dictionary, overriding the generated type name.
*/
Expand Down
145 changes: 0 additions & 145 deletions src/main/kotlin/graphql/kickstart/tools/util/BiMap.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -110,20 +110,6 @@ class SchemaParserDictionaryTest {
assertEquals(dictionary.toMap().entries.map { it.key to it.value }, listOf("B" to Map::class.java, "A" to String::class.java, "C" to Map::class.java))
}

@Test
@Suppress("DEPRECATION")
fun `getDictionary keeps working and only maps a shared class back to its first name`() {
val dictionary = SchemaParserDictionary()
.add("B", Map::class)
.add("A", String::class)
.add("C", Map::class)

val deprecated = dictionary.getDictionary()

assertEquals(deprecated.toMap(), dictionary.toMap())
assertEquals(deprecated.inverse().toMap(), mapOf<Class<*>, String>(Map::class.java to "B", String::class.java to "A"))
}

@Test
fun `input type and object type can share a dictionary class`() {
val schema = SchemaParser.newParser()
Expand Down
87 changes: 0 additions & 87 deletions src/test/kotlin/graphql/kickstart/tools/util/BiMapTest.kt

This file was deleted.

Loading