https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/JobConfiguration.java#L39
JobConfiguration.Type is package-private. Yet, there is a public method in its Builder that returns the type of the job configuration, which is kind of useless. Because the enum itself is package private, it's not accessible outside the package/API.
Thus, it makes it hard to:
- Check the type returned e.g. is a
QUERY, EXTRACT..
- Write unit tests
For example, clients should be able to do this:
assertTrue(jobInfo.getConfiguration().getType() == JobConfiguration.Type.QUERY);
..and not have to do this:
assertTrue(jobInfo.getConfiguration() instanceof QueryJobConfiguration);
Is there a good reason why the enum is package-private, and not public?
https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/JobConfiguration.java#L39
JobConfiguration.Typeis package-private. Yet, there is a public method in itsBuilderthat returns the type of the job configuration, which is kind of useless. Because the enum itself is package private, it's not accessible outside the package/API.Thus, it makes it hard to:
QUERY,EXTRACT..For example, clients should be able to do this:
assertTrue(jobInfo.getConfiguration().getType() == JobConfiguration.Type.QUERY);..and not have to do this:
assertTrue(jobInfo.getConfiguration() instanceof QueryJobConfiguration);Is there a good reason why the enum is package-private, and not public?