Skip to content

Commit

Permalink
Minor code improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
vogti committed Jun 7, 2022
1 parent 6c0d3c1 commit 205eaa3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ protected String getEnvironment() {
*/
protected Properties executePhases( final ChronosJob job, final File inputDirectory, final File outputDirectory ) throws ExecutionException {

long startTime = 0L;
long startTime;
final Properties results = new Properties();

final Object preparePhaseData;
Expand Down Expand Up @@ -627,7 +627,7 @@ protected void removeChronosLogHandler( final ChronosHttpClient.ChronosLogHandle


/**
* Watches if the job to observe is aborted/canceled at the Chronos Web Site.
* Watches if the job to observe is aborted/canceled at the Chronos website.
* The job's state is fetched every 10 seconds (default) and compared against ABORTED
*/
private class AbortedMonitor {
Expand All @@ -637,7 +637,7 @@ private class AbortedMonitor {


/**
* Calls the observe(ChronosJob, long) method with the default sleeping time.
* Calls the <code>observe(ChronosJob, long)</code> method with the default sleeping time.
*
* @see #observe(ChronosJob, long)
* @see AbstractChronosAgent#SLEEPING_TIME_VALUE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ private String getUrl( final InetAddress address, final int port, final ChronosR
if ( this.secure ) {
url.append( "https://" );
} else {
//noinspection HttpUrlsUsage
url.append( "http://" );
}
if ( this.useHostname ) {
Expand Down Expand Up @@ -838,7 +839,7 @@ public final class ChronosLogHandler {
private final Properties query;
private final Map<String, Object> parameters;

AtomicInteger sequenceNumber = new AtomicInteger();
final AtomicInteger sequenceNumber = new AtomicInteger();


public ChronosLogHandler( final ChronosJob job ) {
Expand All @@ -865,11 +866,9 @@ public void publish( String message ) {
final JSONObject status = jsonResponse.getJSONObject( ChronosRestApi.STATUS_OBJECT_KEY );

if ( status.getInt( ChronosRestApi.STATUS_CODE_KEY ) != ChronosRestApi.STATUS_CODE__SUCCESS ) {
log.warn( "Service returned: {0}: {1}",
new Object[]{
status.getInt( ChronosRestApi.STATUS_CODE_KEY ),
status.getString( ChronosRestApi.STATUS_MESSAGE_KEY )
} );
log.warn( "Service returned: {}: {}",
status.getInt( ChronosRestApi.STATUS_CODE_KEY ),
status.getString( ChronosRestApi.STATUS_MESSAGE_KEY ) );
}
} catch ( UnirestException ex ) {
log.warn( "Exception while publishing log records.", ex );
Expand Down

0 comments on commit 205eaa3

Please sign in to comment.