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

[ci] Updates spotbugs to 6.0.15 #3233

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -267,5 +267,23 @@ private static final class AmesFeatures {

List<String> featureArray;
Set<String> categorical;

/**
* Sets the feature array.
*
* @param featureArray the feature array
*/
public void setFeatureArray(List<String> featureArray) {
this.featureArray = featureArray;
}

/**
* Sets the categorical value.
*
* @param categorical the categorical value
*/
public void setCategorical(Set<String> categorical) {
this.categorical = categorical;
}
}
}
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ repositories {

dependencies {
implementation("com.google.googlejavaformat:google-java-format:1.22.0")
implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:5.1.3")
implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:6.0.15")
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,23 @@ private static final class AirPassengers {

Date start;
float[] target;

/**
* Sets the start date.
*
* @param start the start date
*/
public void setStart(Date start) {
this.start = start;
}

/**
* Sets the target value.
*
* @param target the target value
*/
public void setTarget(float[] target) {
this.target = target;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -277,5 +277,32 @@ private static final class M5Features {
Set<String> categorical;
// categorical = String in featureArray its value indicate a String in featureToMap
Map<String, Map<String, Integer>> featureToMap;

/**
* Sets the feature array.
*
* @param featureArray the feature array
*/
public void setFeatureArray(List<String> featureArray) {
this.featureArray = featureArray;
}

/**
* Sets the categorical value.
*
* @param categorical the categorical value
*/
public void setCategorical(Set<String> categorical) {
this.categorical = categorical;
}

/**
* Sets the feature map.
*
* @param featureToMap the feature map
*/
public void setFeatureToMap(Map<String, Map<String, Integer>> featureToMap) {
this.featureToMap = featureToMap;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,22 @@ public class PretrainedConfig {
String problemType;

Map<String, String> id2label;

/**
* Sets the problem type.
*
* @param problemType the problem type
*/
public void setProblemType(String problemType) {
this.problemType = problemType;
}

/**
* Sets the id to label map.
*
* @param id2label the id to label map
*/
public void setId2label(Map<String, String> id2label) {
this.id2label = id2label;
}
}
10 changes: 9 additions & 1 deletion tools/conf/findbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
<Bug pattern="PZLA_PREFER_ZERO_LENGTH_ARRAYS,DB_DUPLICATE_SWITCH_CLAUSES,BC_UNCONFIRMED_CAST,URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD,URF_UNREAD_FIELD"/>
</Match>
<Match>
<Bug pattern="MS_FINAL_PKGPROTECT,MS_PKGPROTECT,NM_METHOD_NAMING_CONVENTION,SF_SWITCH_NO_DEFAULT,DC_DOUBLECHECK,IS2_INCONSISTENT_SYNC"/>
<Bug pattern="MS_FINAL_PKGPROTECT,MS_PKGPROTECT,NM_METHOD_NAMING_CONVENTION,SF_SWITCH_NO_DEFAULT,DC_DOUBLECHECK,IS2_INCONSISTENT_SYNC,CT_CONSTRUCTOR_THROW"/>
</Match>

<Match>
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR"/>
<Class name="~ai\.djl\.Device"/>
</Match>
<Match>
<Class name="~ai\.djl\.mxnet\.jna\..*"/>
</Match>
</FindBugsFilter>
Loading