Skip to content

Commit

Permalink
Update checkstyle to version 10.3.2 including needed checkstyle fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
henning-gerhardt committed Aug 12, 2022
1 parent a4049a9 commit 348b3dd
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class EditingElement {
*
* @param name
* name of the acquisition stage
* @return
* @return an optional object of type AcquisitionStage
*/
Optional<AcquisitionStage> getAcquisitionStage(String name) {
return acquisitionStages.parallelStream().filter(acquisitionStage -> name.equals(acquisitionStage.getName()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ static final MdSec amdSecTypeOf(Mets mets, MdSecType mdSec) {
* @param mdSec
* metadata section to be read
*
* @return
* @return a collection of type Metadata
*/
static final Collection<Metadata> readMetadata(MdSecType mdSecType, MdSec mdSec) {
Collection<Metadata> metadata = new HashSet<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ private static XMLGregorianCalendar convertDate(GregorianCalendar gregorianCalen
* @param mediaFilesToIDFiles
* In this map, for each physical division, the corresponding XML file
* element is added, so that it can be used for linking later.
* @return
* @return an object of type FileSec
*/
private FileSec generateFileSec(Map<URI, FileType> mediaFilesToIDFiles) {
FileSec fileSec = new FileSec();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class Batch extends BaseIndexedBean {
*/
@ManyToMany(cascade = CascadeType.PERSIST)
@JoinTable(name = "batch_x_process", joinColumns = {
@JoinColumn(name = "batch_id", foreignKey = @ForeignKey(name = "FK_batch_x_process_batch_id")) }, inverseJoinColumns = {
@JoinColumn(name = "batch_id", foreignKey = @ForeignKey(name = "FK_batch_x_process_batch_id")) }, inverseJoinColumns = {
@JoinColumn(name = "process_id", foreignKey = @ForeignKey(name = "FK_batch_x_process_process_id")) })
private List<Process> processes;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,11 @@ public String getMimeType() {
* Returns the path pattern, containing the path to the folder relative to
* the process directory, and maybe an extra file name pattern.
*
* @return path with optional filename pattern
*
* @deprecated This getter is here to be used by Hibernate and JSF to access the
* field value, but should not be used for other purpose, unless you
* know what you are doing. Use {@link #getRelativePath()}.
*
* @return path with optional filename pattern
*/
@Deprecated
public String getPath() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ public class ImportConfiguration extends BaseBean {
@ManyToMany(cascade = CascadeType.PERSIST)
@OrderColumn(name = "sorting")
@JoinTable(name = "importconfiguration_x_mappingfile", joinColumns = {
@JoinColumn(name = "importconfiguration_id",
foreignKey = @ForeignKey(name = "FK_importconfiguration_x_mappingfile_importconfiguration_id")) },
@JoinColumn(name = "importconfiguration_id",
foreignKey = @ForeignKey(name = "FK_importconfiguration_x_mappingfile_importconfiguration_id")) },
inverseJoinColumns = {
@JoinColumn(name = "mappingfile_id",
foreignKey = @ForeignKey(name = "FK_importconfiguration_x_mappingfile_mappingfile_id")) })
@JoinColumn(name = "mappingfile_id",
foreignKey = @ForeignKey(name = "FK_importconfiguration_x_mappingfile_mappingfile_id")) })
private List<MappingFile> mappingFiles;

@ManyToOne
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,21 @@ public class Process extends BaseTemplateBean {

@ManyToMany(cascade = CascadeType.ALL)
@JoinTable(name = "process_x_property", joinColumns = {
@JoinColumn(name = "process_id", foreignKey = @ForeignKey(name = "FK_process_x_property_process_id")) }, inverseJoinColumns = {
@JoinColumn(name = "process_id", foreignKey = @ForeignKey(name = "FK_process_x_property_process_id")) }, inverseJoinColumns = {
@JoinColumn(name = "property_id", foreignKey = @ForeignKey(name = "FK_process_x_property_property_id")) })
private List<Property> properties;

@ManyToMany(cascade = CascadeType.ALL)
@JoinTable(name = "template_x_property", joinColumns = {
@JoinColumn(name = "process_id", foreignKey = @ForeignKey(name = "FK_template_x_property_process_id")) }, inverseJoinColumns = {
@JoinColumn(name = "process_id", foreignKey = @ForeignKey(name = "FK_template_x_property_process_id")) }, inverseJoinColumns = {
@JoinColumn(name = "property_id", foreignKey = @ForeignKey(name = "FK_template_x_property_property_id")) })
private List<Property> templates;

@ManyToMany(cascade = CascadeType.ALL)
@JoinTable(name = "workpiece_x_property", joinColumns = {
@JoinColumn(name = "process_id", foreignKey = @ForeignKey(name = "FK_workpiece_x_property_process_id")) },
inverseJoinColumns = {
@JoinColumn(name = "property_id", foreignKey = @ForeignKey(name = "FK_workpiece_x_property_property_id")) })
@JoinColumn(name = "process_id", foreignKey = @ForeignKey(name = "FK_workpiece_x_property_process_id")) },
inverseJoinColumns = {
@JoinColumn(name = "property_id", foreignKey = @ForeignKey(name = "FK_workpiece_x_property_property_id")) })
private List<Property> workpieces;

@ManyToMany(mappedBy = "processes")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ public class Task extends BaseIndexedBean {
*/
@ManyToMany(cascade = CascadeType.PERSIST)
@JoinTable(name = "task_x_role", joinColumns = {
@JoinColumn(name = "task_id", foreignKey = @ForeignKey(name = "FK_task_x_role_task_id")) }, inverseJoinColumns = {
@JoinColumn(name = "role_id", foreignKey = @ForeignKey(name = "FK_task_x_user_role_id")) })
@JoinColumn(name = "task_id", foreignKey = @ForeignKey(name = "FK_task_x_role_task_id")) }, inverseJoinColumns = {
@JoinColumn(name = "role_id", foreignKey = @ForeignKey(name = "FK_task_x_user_role_id")) })
private List<Role> roles;

@Transient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ public class Template extends BaseTemplateBean {

@ManyToMany(cascade = CascadeType.PERSIST)
@JoinTable(name = "project_x_template", joinColumns = {
@JoinColumn(name = "template_id", foreignKey = @ForeignKey(name = "FK_project_x_template_template_id")) },
@JoinColumn(name = "template_id", foreignKey = @ForeignKey(name = "FK_project_x_template_template_id")) },
inverseJoinColumns = {
@JoinColumn(name = "project_id", foreignKey = @ForeignKey(name = "FK_project_x_template_project_id")) })
@JoinColumn(name = "project_id", foreignKey = @ForeignKey(name = "FK_project_x_template_project_id")) })
private List<Project> projects;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,23 +80,23 @@ public class User extends BaseBean {

@ManyToMany(cascade = CascadeType.PERSIST)
@JoinTable(name = "user_x_role", joinColumns = {@JoinColumn(name = "user_id",
foreignKey = @ForeignKey(name = "FK_user_x_role_user_id")) }, inverseJoinColumns = {@JoinColumn(name = "role_id",
foreignKey = @ForeignKey(name = "FK_user_x_role_role_id")) })
foreignKey = @ForeignKey(name = "FK_user_x_role_user_id")) }, inverseJoinColumns = {@JoinColumn(name = "role_id",
foreignKey = @ForeignKey(name = "FK_user_x_role_role_id")) })
private List<Role> roles;

@OneToMany(mappedBy = "processingUser", cascade = CascadeType.PERSIST)
private List<Task> processingTasks;

@ManyToMany(cascade = CascadeType.PERSIST)
@JoinTable(name = "project_x_user", joinColumns = {@JoinColumn(name = "user_id",
foreignKey = @ForeignKey(name = "FK_project_x_user_user_id")) }, inverseJoinColumns = {@JoinColumn(name = "project_id",
foreignKey = @ForeignKey(name = "FK_project_x_user_project_id")) })
foreignKey = @ForeignKey(name = "FK_project_x_user_user_id")) }, inverseJoinColumns = {@JoinColumn(name = "project_id",
foreignKey = @ForeignKey(name = "FK_project_x_user_project_id")) })
private List<Project> projects;

@ManyToMany(cascade = CascadeType.PERSIST)
@JoinTable(name = "client_x_user", joinColumns = {@JoinColumn(name = "user_id",
foreignKey = @ForeignKey(name = "FK_client_x_user_user_id")) }, inverseJoinColumns = {
@JoinColumn(name = "client_id", foreignKey = @ForeignKey(name = "FK_client_x_user_client_id")) })
@JoinColumn(name = "client_id", foreignKey = @ForeignKey(name = "FK_client_x_user_client_id")) })
private List<Client> clients;

@OneToMany(mappedBy = "user", cascade = CascadeType.PERSIST, orphanRemoval = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ String format(String value, String next, boolean fictitious, String separator) {
*/
private static final Map<Integer, PaginatorMode> codeMap = new HashMap<>(
(int) Math.ceil(values().length / .75));

static {
for (PaginatorMode member : PaginatorMode.values()) {
codeMap.put(member.code, member);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public String format(PaginatorMode mode, String value, boolean fictitious, Strin
*/
private static final Map<Integer, PaginatorType> codeMap = new HashMap<>(
(int) Math.ceil(values().length / .75));

static {
for (PaginatorType member : PaginatorType.values()) {
codeMap.put(member.code, member);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import javax.servlet.annotation.WebInitParam;

@WebFilter(filterName = "EncodingFilter", urlPatterns = "/*", initParams = {
@WebInitParam(name = "requestEncoding", value = "UTF-8") })
@WebInitParam(name = "requestEncoding", value = "UTF-8") })
public class EncodingFilter implements Filter {

private String encoding;
Expand Down
2 changes: 1 addition & 1 deletion config/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
</module>

<module name="JavadocMethod">
<property name="scope" value="public"/>
<property name="accessModifiers" value="public"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
<property name="allowedAnnotations" value="Override, Test"/>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -905,12 +905,12 @@ from system library in Java 11+ -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.0</version>
<version>3.1.2</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.29</version>
<version>10.3.2</version>
</dependency>
</dependencies>
<executions>
Expand Down

0 comments on commit 348b3dd

Please sign in to comment.