Skip to content

Commit

Permalink
#126: Fix @optional annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabrina Wullschleger committed Mar 8, 2024
1 parent 84143ec commit 448e178
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
13 changes: 7 additions & 6 deletions gretl/src/main/java/ch/so/agi/gretl/tasks/CsvExport.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@

import org.gradle.api.DefaultTask;
import org.gradle.api.GradleException;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.InputFile;
import org.gradle.api.tasks.Optional;
import org.gradle.api.tasks.TaskAction;
import org.gradle.api.tasks.*;

import ch.ehi.basics.settings.Settings;
import ch.interlis.iom_j.csv.CsvReader;
Expand All @@ -19,6 +16,8 @@
import ch.so.agi.gretl.logging.LogEnvironment;
import ch.so.agi.gretl.util.TaskUtil;

import javax.annotation.Nullable;

public class CsvExport extends DefaultTask {
protected GretlLogger log;
private Connector database;
Expand Down Expand Up @@ -70,12 +69,14 @@ public String getSchemaName() {
return schemaName;
}

@Optional
@Internal
@Nullable
public String[] getAttributes(){
return attributes;
}

@Optional
@Internal
@Nullable
public String getEncoding(){
return encoding;
}
Expand Down
9 changes: 4 additions & 5 deletions gretl/src/main/java/ch/so/agi/gretl/tasks/CsvValidator.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@
import ch.so.agi.gretl.tasks.impl.CsvValidatorImpl;

import org.gradle.api.file.FileCollection;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.Optional;
import org.gradle.api.tasks.TaskAction;
import org.gradle.api.tasks.TaskExecutionException;
import org.gradle.api.tasks.*;

import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.List;

Expand Down Expand Up @@ -41,7 +39,8 @@ public Character getValueDelimiter() {
public Character getValueSeparator() {
return valueSeparator;
}
@Optional
@Internal
@Nullable
public String getEncoding(){
return encoding;
}
Expand Down

0 comments on commit 448e178

Please sign in to comment.