diff --git a/checkstyle.xml b/checkstyle.xml index 151fb73465ae52112d248f130d1dd45b1377161a..ce622a22a93ebe6fa0bbb6d6f4e5f988c05cf973 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -278,5 +278,7 @@ <property name="tokens" value="VARIABLE_DEF,PARAMETER_DEF"/> <property name="validateEnhancedForLoopVariable" value="true"/> </module> + <module name="RedundantImport"/> + <module name="UnusedImports"/> </module> </module> diff --git a/src/main/java/de/thm/arsnova/config/PersistenceConfig.java b/src/main/java/de/thm/arsnova/config/PersistenceConfig.java index f8e6bdf5501ada9a641c2700ca3bf5e1865fe5cf..f377e90b4adfdb95ae3bc2d4f27f99e297b6017a 100644 --- a/src/main/java/de/thm/arsnova/config/PersistenceConfig.java +++ b/src/main/java/de/thm/arsnova/config/PersistenceConfig.java @@ -20,7 +20,6 @@ package de.thm.arsnova.config; import org.ektorp.impl.StdCouchDbInstance; import org.ektorp.spring.HttpClientFactoryBean; -import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; diff --git a/src/main/java/de/thm/arsnova/config/SecurityConfig.java b/src/main/java/de/thm/arsnova/config/SecurityConfig.java index de5b311ae4605901db4bffd93468de5f87708ac4..624a628b9ff54974d673dec58a5eb08f9aa83a47 100644 --- a/src/main/java/de/thm/arsnova/config/SecurityConfig.java +++ b/src/main/java/de/thm/arsnova/config/SecurityConfig.java @@ -41,11 +41,8 @@ import org.springframework.context.annotation.AdviceMode; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; -import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.core.Ordered; import org.springframework.core.annotation.Order; -import org.springframework.core.io.ClassPathResource; -import org.springframework.core.io.FileSystemResource; import org.springframework.http.MediaType; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; import org.springframework.ldap.core.support.LdapContextSource; diff --git a/src/main/java/de/thm/arsnova/controller/ConfigurationController.java b/src/main/java/de/thm/arsnova/controller/ConfigurationController.java index 5b956ef0bec1b9312a8c5f6afa60a7eab8420e3e..ccf58ad86927d0cc937bdf4d324b3bbb647612d0 100644 --- a/src/main/java/de/thm/arsnova/controller/ConfigurationController.java +++ b/src/main/java/de/thm/arsnova/controller/ConfigurationController.java @@ -27,7 +27,6 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import de.thm.arsnova.config.properties.SystemProperties; diff --git a/src/main/java/de/thm/arsnova/controller/UserController.java b/src/main/java/de/thm/arsnova/controller/UserController.java index f2e19777b1cfdd6bd4eb108b13a785b98d444b3d..15a32c55fe6679b6c839be4ef024819a40194004 100644 --- a/src/main/java/de/thm/arsnova/controller/UserController.java +++ b/src/main/java/de/thm/arsnova/controller/UserController.java @@ -24,7 +24,6 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; diff --git a/src/main/java/de/thm/arsnova/controller/v2/CommentController.java b/src/main/java/de/thm/arsnova/controller/v2/CommentController.java index 088f70362982c799d307a52716135e0238cecef9..cd90642560828c4d3c483c7ab27997345c7cb9a5 100644 --- a/src/main/java/de/thm/arsnova/controller/v2/CommentController.java +++ b/src/main/java/de/thm/arsnova/controller/v2/CommentController.java @@ -35,7 +35,6 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; diff --git a/src/main/java/de/thm/arsnova/controller/v2/FeedbackController.java b/src/main/java/de/thm/arsnova/controller/v2/FeedbackController.java index 679355fded78a119961637209fdcdf1dfaafb254..9b2f6387f8d0888a2c69944bd8252a31889e9197 100644 --- a/src/main/java/de/thm/arsnova/controller/v2/FeedbackController.java +++ b/src/main/java/de/thm/arsnova/controller/v2/FeedbackController.java @@ -26,7 +26,6 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; diff --git a/src/main/java/de/thm/arsnova/controller/v2/LegacyController.java b/src/main/java/de/thm/arsnova/controller/v2/LegacyController.java index 8e10a70723b87ceef9f27bae8e637a76d637f4ef..5ee38a5632eb5339ffbe18c590d84cb40506e5c3 100644 --- a/src/main/java/de/thm/arsnova/controller/v2/LegacyController.java +++ b/src/main/java/de/thm/arsnova/controller/v2/LegacyController.java @@ -25,7 +25,6 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import de.thm.arsnova.controller.AbstractController; diff --git a/src/main/java/de/thm/arsnova/controller/v2/MotdController.java b/src/main/java/de/thm/arsnova/controller/v2/MotdController.java index 6d752d72132e6f48a4596121f4f2d3db03d35cb7..986968660a3ab96c265b1487f348f8c6e2f04476 100644 --- a/src/main/java/de/thm/arsnova/controller/v2/MotdController.java +++ b/src/main/java/de/thm/arsnova/controller/v2/MotdController.java @@ -37,7 +37,6 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; diff --git a/src/main/java/de/thm/arsnova/controller/v2/SocketController.java b/src/main/java/de/thm/arsnova/controller/v2/SocketController.java index 7ea9f917f065c5f429f487d3f680f2b2fbe428ca..b8efb6746af8e58ab09285be89e104ff3ddafa56 100644 --- a/src/main/java/de/thm/arsnova/controller/v2/SocketController.java +++ b/src/main/java/de/thm/arsnova/controller/v2/SocketController.java @@ -36,7 +36,6 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import de.thm.arsnova.controller.AbstractController; diff --git a/src/main/java/de/thm/arsnova/controller/v2/StatisticsController.java b/src/main/java/de/thm/arsnova/controller/v2/StatisticsController.java index 8f26c7e7bcf8cdda61378c483b42aaa5badddcd0..69af6348c1ce9ffdd66e28b690e8012d2a40f662 100644 --- a/src/main/java/de/thm/arsnova/controller/v2/StatisticsController.java +++ b/src/main/java/de/thm/arsnova/controller/v2/StatisticsController.java @@ -24,7 +24,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import de.thm.arsnova.controller.AbstractController; diff --git a/src/main/java/de/thm/arsnova/controller/v2/UserController.java b/src/main/java/de/thm/arsnova/controller/v2/UserController.java index b1836860dbdc79f649886a0872ed21fc9cf32eb5..c043d1cdb7f26b2b2b6b4c61ed56869eec5fbe36 100644 --- a/src/main/java/de/thm/arsnova/controller/v2/UserController.java +++ b/src/main/java/de/thm/arsnova/controller/v2/UserController.java @@ -27,7 +27,6 @@ import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import de.thm.arsnova.controller.AbstractController; diff --git a/src/main/java/de/thm/arsnova/model/Comment.java b/src/main/java/de/thm/arsnova/model/Comment.java index c116f4e7239535fca0a74d1f8cf9a42cfd554d71..097315f6f889d2d6aa81429d923e8a381ee005ca 100644 --- a/src/main/java/de/thm/arsnova/model/Comment.java +++ b/src/main/java/de/thm/arsnova/model/Comment.java @@ -25,7 +25,6 @@ import java.util.Objects; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; - import org.springframework.core.style.ToStringCreator; import de.thm.arsnova.model.serialization.View; diff --git a/src/main/java/de/thm/arsnova/model/ServiceDescription.java b/src/main/java/de/thm/arsnova/model/ServiceDescription.java index d31ebf46cbd27dd40ee8154087fd8631e5539f3e..673a1510d3b7ba4889f7c22b60643b11439050fc 100644 --- a/src/main/java/de/thm/arsnova/model/ServiceDescription.java +++ b/src/main/java/de/thm/arsnova/model/ServiceDescription.java @@ -20,7 +20,6 @@ package de.thm.arsnova.model; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonView; -import java.util.List; import java.util.Set; import java.util.stream.Collectors; diff --git a/src/main/java/de/thm/arsnova/model/TextAnswer.java b/src/main/java/de/thm/arsnova/model/TextAnswer.java index d6ed249e507153a412990861973034ab3ef340d3..70af6bfcf5921840fdd6281a1a257e066bdbd08a 100644 --- a/src/main/java/de/thm/arsnova/model/TextAnswer.java +++ b/src/main/java/de/thm/arsnova/model/TextAnswer.java @@ -21,7 +21,6 @@ package de.thm.arsnova.model; import com.fasterxml.jackson.annotation.JsonView; import java.util.Date; import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotEmpty; import org.springframework.core.style.ToStringCreator; import de.thm.arsnova.model.serialization.View; diff --git a/src/main/java/de/thm/arsnova/persistence/couchdb/CouchDbContentRepository.java b/src/main/java/de/thm/arsnova/persistence/couchdb/CouchDbContentRepository.java index 3a356afdf9edbcad83db92f167d910e48d4ad85c..db2cb352289229206853f1720449befa276000ea 100644 --- a/src/main/java/de/thm/arsnova/persistence/couchdb/CouchDbContentRepository.java +++ b/src/main/java/de/thm/arsnova/persistence/couchdb/CouchDbContentRepository.java @@ -23,7 +23,6 @@ import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.Set; -import java.util.function.Function; import org.ektorp.ComplexKey; import org.ektorp.CouchDbConnector; import org.ektorp.ViewResult; diff --git a/src/main/java/de/thm/arsnova/security/ApplicationPermissionEvaluator.java b/src/main/java/de/thm/arsnova/security/ApplicationPermissionEvaluator.java index 66a50e5bef1b31e8f5b13aced1695b98e12eb08c..79bd411493e34fd1847bf09b36eeb095a0c5d5b2 100644 --- a/src/main/java/de/thm/arsnova/security/ApplicationPermissionEvaluator.java +++ b/src/main/java/de/thm/arsnova/security/ApplicationPermissionEvaluator.java @@ -19,12 +19,10 @@ package de.thm.arsnova.security; import java.io.Serializable; -import java.util.Arrays; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; import org.springframework.security.access.PermissionEvaluator; import org.springframework.security.access.intercept.RunAsUserToken; import org.springframework.security.authentication.AnonymousAuthenticationToken; diff --git a/src/main/java/de/thm/arsnova/security/jwt/JwtService.java b/src/main/java/de/thm/arsnova/security/jwt/JwtService.java index 0edce1c512141aaa434e8cb796007d12130399c9..0c47697a6f7aef1d32187ab953456939848e96b6 100644 --- a/src/main/java/de/thm/arsnova/security/jwt/JwtService.java +++ b/src/main/java/de/thm/arsnova/security/jwt/JwtService.java @@ -22,7 +22,6 @@ import com.auth0.jwt.JWT; import com.auth0.jwt.JWTVerifier; import com.auth0.jwt.algorithms.Algorithm; import com.auth0.jwt.interfaces.DecodedJWT; -import java.io.UnsupportedEncodingException; import java.time.Duration; import java.time.LocalDateTime; import java.time.ZoneOffset; @@ -30,7 +29,6 @@ import java.time.temporal.TemporalAmount; import java.util.Collection; import java.util.Date; import java.util.stream.Collectors; -import org.springframework.beans.factory.annotation.Value; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.stereotype.Service; diff --git a/src/main/java/de/thm/arsnova/service/ContentServiceImpl.java b/src/main/java/de/thm/arsnova/service/ContentServiceImpl.java index 6d10774703c7b7099e90e287c4aaa502b25a76c2..e6e9670f203c607e2eb0c4877dab2f29fcae29d8 100644 --- a/src/main/java/de/thm/arsnova/service/ContentServiceImpl.java +++ b/src/main/java/de/thm/arsnova/service/ContentServiceImpl.java @@ -26,7 +26,6 @@ import java.util.List; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; -import java.util.stream.StreamSupport; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/main/java/de/thm/arsnova/service/UserServiceImpl.java b/src/main/java/de/thm/arsnova/service/UserServiceImpl.java index 2a93a39bf406966a400a7fd74656b2674f6d36fb..00342fd3bbb03590af5fc93327aee1ebb7c36fd7 100644 --- a/src/main/java/de/thm/arsnova/service/UserServiceImpl.java +++ b/src/main/java/de/thm/arsnova/service/UserServiceImpl.java @@ -65,7 +65,6 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Isolation; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.Validator; -import org.springframework.web.util.UriUtils; import de.thm.arsnova.config.properties.AuthenticationProviderProperties; import de.thm.arsnova.config.properties.SecurityProperties; diff --git a/src/main/java/de/thm/arsnova/websocket/ArsnovaSocketioServerImpl.java b/src/main/java/de/thm/arsnova/websocket/ArsnovaSocketioServerImpl.java index ace674a81c2bc1a46ec13bcda4511991861e0436..d3b2ba2c539efb58b36b0c71c3520d150adda72a 100644 --- a/src/main/java/de/thm/arsnova/websocket/ArsnovaSocketioServerImpl.java +++ b/src/main/java/de/thm/arsnova/websocket/ArsnovaSocketioServerImpl.java @@ -23,7 +23,6 @@ import com.corundumstudio.socketio.Configuration; import com.corundumstudio.socketio.SocketConfig; import com.corundumstudio.socketio.SocketIOClient; import com.corundumstudio.socketio.SocketIOServer; -import com.corundumstudio.socketio.listener.ConnectListener; import com.corundumstudio.socketio.listener.DataListener; import com.corundumstudio.socketio.listener.DisconnectListener; import com.corundumstudio.socketio.protocol.Packet;