Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor change to enable calling apps to be aware of exceptions #523

Closed
wants to merge 11 commits into from
Prev Previous commit
Next Next commit
declare that example main methods throw IOException
  • Loading branch information
brett-matson committed Jan 19, 2021
commit df9ad652986614abfe90717a8a7ca432e78706ea
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public int compare(
* @param args
* @throws IOException
*/
public static void main(String[] args) {
public static void main(String[] args) throws IOException {
ExampleHelpers.configureLogging();
ClassPropertyUsageAnalyzer.printDocumentation();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static class UsageStatistics {
*
* @param args
*/
public static void main(String[] args) {
public static void main(String[] args) throws IOException {
ExampleHelpers.configureLogging();
EntityStatisticsProcessor.printDocumentation();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public static void configureLogging() {
* the object to use for processing entities in this dump
*/
public static void processEntitiesFromWikidataDump(
EntityDocumentProcessor entityDocumentProcessor) {
EntityDocumentProcessor entityDocumentProcessor) throws IOException {

// Controller object for processing dumps:
DumpProcessingController dumpProcessingController = new DumpProcessingController(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public int compare(SiteRecord o1, SiteRecord o2) {
* @param args
* @throws IOException
*/
public static void main(String[] args) {
public static void main(String[] args) throws IOException {
ExampleHelpers.configureLogging();
GenderRatioProcessor.printDocumentation();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class LifeExpectancyProcessor implements EntityDocumentProcessor {
* offline mode, modify the settings in {@link ExampleHelpers}.
*
*/
public static void main(String[] args) {
public static void main(String[] args) throws IOException {
ExampleHelpers.configureLogging();
LifeExpectancyProcessor.printDocumentation();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class LocalDumpFileExample {
*/
private final static String DUMP_FILE = "./src/resources/sample-dump-20150815.json.gz";

public static void main(String[] args) {
public static void main(String[] args) throws IOException {
ExampleHelpers.configureLogging();
LocalDumpFileExample.printDocumentation();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
* #L%
*/

import java.io.IOException;

import org.wikidata.wdtk.datamodel.interfaces.EntityDocumentProcessor;
import org.wikidata.wdtk.dumpfiles.DumpProcessingController;
import org.wikidata.wdtk.dumpfiles.MwRevision;
Expand All @@ -41,7 +43,7 @@
*/
public class TutorialExample {

public static void main(String[] args) {
public static void main(String[] args) throws IOException {
ExampleHelpers.configureLogging();

// Controller object for processing dumps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public class WorldMapProcessor implements EntityDocumentProcessor {
*
* @param args
*/
public static void main(String[] args) {
public static void main(String[] args) throws IOException {
ExampleHelpers.configureLogging();
WorldMapProcessor.printDocumentation();

Expand Down