Skip to content

Commit

Permalink
NUTCH-2897 Do not supress deprecated API warnings
Browse files Browse the repository at this point in the history
- deprecate constructor of NutchJob
- remove deprocated call to Object.finalize() from Plugin.finalize()
  • Loading branch information
sebastian-nagel committed Oct 3, 2023
1 parent 810b1d6 commit a1ab433
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/java/org/apache/nutch/plugin/Plugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ private void setDescriptor(PluginDescriptor descriptor) {
}

@Override
@SuppressWarnings("deprecation")
protected void finalize() throws Throwable {
super.finalize();
shutDown();
}
}
13 changes: 12 additions & 1 deletion src/java/org/apache/nutch/util/NutchJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,18 @@ public class NutchJob extends Job {

private static final String JOB_FAILURE_LOG_FORMAT = "%s job did not succeed, job id: %s, job status: %s, reason: %s";

@SuppressWarnings("deprecation")
/**
* @deprecated, use instead {@link #getInstance(Configuration)} or
* {@link Job#getInstance(Configuration, String)}.
*
* @param conf
* configuration for the job
* @param jobName
* name of the job
* @throws IOException
* see {@link Job#Job(Configuration, String)}
*/
@Deprecated
public NutchJob(Configuration conf, String jobName) throws IOException {
super(conf, jobName);
if (conf != null) {
Expand Down

0 comments on commit a1ab433

Please sign in to comment.