Cleanup: fix some compiler warnings (mostly deprecations, javaClass)

This commit is contained in:
Mikhail Glukhikh
2017-02-21 17:38:43 +03:00
parent d0cc1635db
commit b121bf8802
445 changed files with 773 additions and 949 deletions
@@ -31,7 +31,7 @@ class ProtoBufConsistencyTest : TestCase() {
for (protoPath in PROTO_PATHS) {
val classFqName = protoPath.packageName + "." + protoPath.debugClassName
val klass = javaClass.classLoader.loadClass(classFqName) ?: error("Class not found: $classFqName")
val klass = this::class.java.classLoader.loadClass(classFqName) ?: error("Class not found: $classFqName")
for (field in klass.declaredFields) {
if (Modifier.isStatic(field.modifiers) && field.type == GeneratedExtension::class.java) {
// The only place where type information for an extension is stored is the field's declared generic type.