#4255 - Update log4j version and clean project
| .. | .. |
|---|
| 1 | 1 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|---|
| 2 | 2 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|---|
| 3 | | - <modelVersion>4.0.0</modelVersion> |
|---|
| 3 | + |
|---|
| 4 | + <name>SeCuris</name> |
|---|
| 4 | 5 | <groupId>net.curisit</groupId> |
|---|
| 5 | 6 | <artifactId>securis-server</artifactId> |
|---|
| 6 | | - <version>2.0.0</version> |
|---|
| 7 | | - <name>SeCuris</name> |
|---|
| 7 | + <version>2.0.1</version> |
|---|
| 8 | + <modelVersion>4.0.0</modelVersion> |
|---|
| 9 | + |
|---|
| 8 | 10 | <description>CurisTEC Server Licenses</description> |
|---|
| 9 | 11 | <dependencies> |
|---|
| 10 | 12 | <dependency> |
|---|
| .. | .. |
|---|
| 101 | 103 | <dependency> |
|---|
| 102 | 104 | <groupId>org.apache.logging.log4j</groupId> |
|---|
| 103 | 105 | <artifactId>log4j-web</artifactId> |
|---|
| 104 | | - <version>2.1</version> |
|---|
| 106 | + <version>2.17.2</version> |
|---|
| 105 | 107 | </dependency> |
|---|
| 106 | 108 | <dependency> |
|---|
| 107 | 109 | <groupId>javax.enterprise</groupId> |
|---|
| .. | .. |
|---|
| 20 | 20 | @WebFilter(urlPatterns = "/*") |
|---|
| 21 | 21 | public class DevFilter implements Filter { |
|---|
| 22 | 22 | |
|---|
| 23 | | - private static final Logger LOG = LogManager.getLogger(DevFilter.class); |
|---|
| 23 | + @SuppressWarnings("unused") |
|---|
| 24 | + private static final Logger log = LogManager.getLogger(DevFilter.class); |
|---|
| 24 | 25 | |
|---|
| 25 | 26 | @Override |
|---|
| 26 | 27 | public void init(FilterConfig fc) throws ServletException { |
|---|
| .. | .. |
|---|
| 37 | 38 | res.addHeader("Access-Control-Allow-Headers", "X-SECURIS-TOKEN, Content-Type"); |
|---|
| 38 | 39 | res.addHeader("Access-Control-Expose-Headers", "X-SECURIS-ERROR-MSG, X-SECURIS-ERROR-CODE, Content-Type, Content-Disposition"); |
|---|
| 39 | 40 | |
|---|
| 40 | | - // LOG.info("Added header to: " + res.getHeaderNames()); |
|---|
| 41 | + // log.info("Added header to: " + res.getHeaderNames()); |
|---|
| 41 | 42 | if (!req.getMethod().equals("OPTIONS")) { |
|---|
| 42 | 43 | fc.doFilter(sreq, sres); |
|---|
| 43 | 44 | } |
|---|
| .. | .. |
|---|
| 11 | 11 | |
|---|
| 12 | 12 | public class CreationTimestampListener { |
|---|
| 13 | 13 | |
|---|
| 14 | | - @SuppressWarnings("unused") |
|---|
| 15 | | - private static final Logger LOG = LogManager.getLogger(CreationTimestampListener.class); |
|---|
| 14 | + private static final Logger log = LogManager.getLogger(CreationTimestampListener.class); |
|---|
| 16 | 15 | |
|---|
| 17 | 16 | @PrePersist |
|---|
| 18 | 17 | public void updateTimestamp(CreationTimestampEntity p) { |
|---|
| 19 | | - LOG.info("Settings creation timestmap date"); |
|---|
| 18 | + log.info("Settings creation timestmap date"); |
|---|
| 20 | 19 | p.setCreationTimestamp(new Date()); |
|---|
| 21 | 20 | } |
|---|
| 22 | 21 | |
|---|
| .. | .. |
|---|
| 12 | 12 | |
|---|
| 13 | 13 | public class ModificationTimestampListener { |
|---|
| 14 | 14 | |
|---|
| 15 | | - @SuppressWarnings("unused") |
|---|
| 16 | | - private static final Logger LOG = LogManager.getLogger(ModificationTimestampListener.class); |
|---|
| 15 | + private static final Logger log = LogManager.getLogger(ModificationTimestampListener.class); |
|---|
| 17 | 16 | |
|---|
| 18 | 17 | @PreUpdate |
|---|
| 19 | 18 | @PrePersist |
|---|
| 20 | 19 | public void updateTimestamp(ModificationTimestampEntity p) { |
|---|
| 21 | | - LOG.info("Settings modification timestmap date"); |
|---|
| 20 | + log.info("Settings modification timestmap date"); |
|---|
| 22 | 21 | p.setModificationTimestamp(new Date()); |
|---|
| 23 | 22 | } |
|---|
| 24 | 23 | |
|---|
| .. | .. |
|---|
| 10 | 10 | @ApplicationScoped |
|---|
| 11 | 11 | public class EntityManagerProvider { |
|---|
| 12 | 12 | |
|---|
| 13 | | - private static final Logger LOG = LogManager.getLogger(EntityManagerProvider.class); |
|---|
| 13 | + @SuppressWarnings("unused") |
|---|
| 14 | + private static final Logger log = LogManager.getLogger(EntityManagerProvider.class); |
|---|
| 14 | 15 | |
|---|
| 15 | 16 | private final EntityManagerFactory entityManagerFactory = javax.persistence.Persistence.createEntityManagerFactory("localdb"); |
|---|
| 16 | 17 | |
|---|
| .. | .. |
|---|
| 592 | 592 | } |
|---|
| 593 | 593 | |
|---|
| 594 | 594 | private License getCurrentLicense(Integer licId, BasicSecurityContext bsc, EntityManager em) throws SeCurisServiceException { |
|---|
| 595 | | - if (licId == null || "".equals(licId)) { |
|---|
| 595 | + if (licId == null || "".equals(Integer.toString(licId))) { |
|---|
| 596 | 596 | LOG.error("License ID is mandatory"); |
|---|
| 597 | 597 | throw new SeCurisServiceException(Status.NOT_FOUND.getStatusCode(), "Missing license ID"); |
|---|
| 598 | 598 | } |
|---|
| .. | .. |
|---|
| 157 | 157 | @Produces({ MediaType.APPLICATION_JSON }) |
|---|
| 158 | 158 | public Response get(@PathParam("packId") Integer packId, @Context BasicSecurityContext bsc) { |
|---|
| 159 | 159 | LOG.info("Getting pack data for id: {}: ", packId); |
|---|
| 160 | | - if (packId == null || "".equals(packId)) { |
|---|
| 160 | + if (packId == null || "".equals(Integer.toString(packId))) { |
|---|
| 161 | 161 | LOG.error("Pack ID is mandatory"); |
|---|
| 162 | 162 | return Response.status(Status.NOT_FOUND).build(); |
|---|
| 163 | 163 | } |
|---|
| .. | .. |
|---|
| 131 | 131 | this.gzipStream.flush(); |
|---|
| 132 | 132 | } |
|---|
| 133 | 133 | |
|---|
| 134 | + @SuppressWarnings("unused") |
|---|
| 134 | 135 | public void finish() throws IOException { |
|---|
| 135 | 136 | this.gzipStream.finish(); |
|---|
| 136 | 137 | } |
|---|