Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes # What was done? * Fix NPE that was causing initialization error and flank crash as a result ``` Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class flank.common.config.FlankPropertiesKt at ftl.util.CrashReporterKt.report(CrashReporter.kt:31) at ftl.run.exception.ExceptionHandlerKt.withGlobalExceptionHandling(ExceptionHandler.kt:78) at ftl.run.exception.ExceptionHandlerKt.withGlobalExceptionHandling(ExceptionHandler.kt:12) at ftl.Main$Companion.main(Main.kt:54) at ftl.Main.main(Main.kt) ``` * `GoogleApiLogger` (all actually) was incorrectly enabled during Sentry client initialization. As result, output was flooded with logs if at least one FTL `IOException` was thrown ``` Jan 20, 2021 8:40:28 PM com.google.api.client.http.HttpRequest execute CONFIG: -------------- REQUEST -------------- POST https://oauth2.googleapis.com/token Accept-Encoding: gzip User-Agent: Google-HTTP-Java-Client/1.38.1 (gzip) Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Content-Length: 234 Jan 20, 2021 8:40:28 PM com.google.api.client.http.HttpRequest execute CONFIG: curl -v --compressed -X POST -H 'Accept-Encoding: gzip' -H 'User-Agent: Google-HTTP-Java-Client/1.38.1 (gzip)' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -d '@-' -- 'https://oauth2.googleapis.com/token' << $$$ Jan 20, 2021 8:40:28 PM com.google.api.client.util.LoggingByteArrayOutputStream close CONFIG: Total: 234 bytes Jan 20, 2021 8:40:28 PM com.google.api.client.util.LoggingByteArrayOutputStream close CONFIG: (and lots of more) ``` ## Test Plan > How do we know the code works? 1. Run `./gradlew clean flankFullRun` 2. There should be no errors 3. Start flank run but from outside the project directory (use flank fat jar) 4. Run should proceed normally
- Loading branch information