Commit 1d77dd1acaac1438d3a1ed3d47589092904638a2

Authored by Thomas Ziemer
1 parent b6372db8

refactor: einige (nur) von Eclipse gemeldete Probleme entfernt

src/main/java/net/ziemers/swxercise/db/dao/user/RoleDao.java
@@ -2,7 +2,6 @@ package net.ziemers.swxercise.db.dao.user; @@ -2,7 +2,6 @@ package net.ziemers.swxercise.db.dao.user;
2 2
3 import net.ziemers.swxercise.db.dao.GenericDao; 3 import net.ziemers.swxercise.db.dao.GenericDao;
4 import net.ziemers.swxercise.lg.model.user.Role; 4 import net.ziemers.swxercise.lg.model.user.Role;
5 -import net.ziemers.swxercise.lg.model.user.User;  
6 5
7 import javax.ejb.Stateless; 6 import javax.ejb.Stateless;
8 7
src/main/java/net/ziemers/swxercise/lg/model/user/Profile.java
@@ -155,7 +155,8 @@ public class Profile extends BaseEntity { @@ -155,7 +155,8 @@ public class Profile extends BaseEntity {
155 this.passwordHash = cryptString(password); 155 this.passwordHash = cryptString(password);
156 } 156 }
157 157
158 - private void setPasswordHash(String passwordHash) { 158 + @SuppressWarnings("unused")
  159 + private void setPasswordHash(String passwordHash) {
159 this.passwordHash = passwordHash; 160 this.passwordHash = passwordHash;
160 } 161 }
161 162
@@ -176,7 +177,8 @@ public class Profile extends BaseEntity { @@ -176,7 +177,8 @@ public class Profile extends BaseEntity {
176 return hashAlgorithm; 177 return hashAlgorithm;
177 } 178 }
178 179
179 - private void setHashAlgorithm(PasswordHashAlgorithm hashAlgorithm) { 180 + @SuppressWarnings("unused")
  181 + private void setHashAlgorithm(PasswordHashAlgorithm hashAlgorithm) {
180 this.hashAlgorithm = hashAlgorithm; 182 this.hashAlgorithm = hashAlgorithm;
181 } 183 }
182 184
src/main/java/net/ziemers/swxercise/lg/model/user/User.java
1 package net.ziemers.swxercise.lg.model.user; 1 package net.ziemers.swxercise.lg.model.user;
2 2
3 import javax.persistence.*; 3 import javax.persistence.*;
4 -import javax.validation.constraints.NotNull;  
5 4
6 import net.ziemers.swxercise.db.BaseEntity; 5 import net.ziemers.swxercise.db.BaseEntity;
7 6
src/main/java/net/ziemers/swxercise/lg/user/enums/RightState.java
@@ -34,7 +34,8 @@ public enum RightState { @@ -34,7 +34,8 @@ public enum RightState {
34 return name; 34 return name;
35 } 35 }
36 36
37 - private void setName(String name) { 37 + @SuppressWarnings("unused")
  38 + private void setName(String name) {
38 this.name = name; 39 this.name = name;
39 } 40 }
40 41
src/main/java/net/ziemers/swxercise/lg/user/service/SessionContext.java
@@ -10,7 +10,9 @@ import net.ziemers.swxercise.lg.model.user.User; @@ -10,7 +10,9 @@ import net.ziemers.swxercise.lg.model.user.User;
10 @SessionScoped 10 @SessionScoped
11 public class SessionContext implements java.io.Serializable { 11 public class SessionContext implements java.io.Serializable {
12 12
13 - private User user = null; 13 + private static final long serialVersionUID = 8624253586553865146L;
  14 +
  15 + private User user = null;
14 16
15 public User getUser() { 17 public User getUser() {
16 return user; 18 return user;
src/main/resources/META-INF/persistence.xml
@@ -2,6 +2,8 @@ @@ -2,6 +2,8 @@
2 xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 2 xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3 xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> 3 xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
4 4
  5 + <!-- Eclipse warnt hier: Multiple persistence units specified - only the first will be recognized -->
  6 + <!-- Diese Warnung kann ignoriert werden (in "IntelliJ IDEA" tritt sie gar nicht erst auf) -->
5 <persistence-unit name="swXercisePU" transaction-type="JTA"> 7 <persistence-unit name="swXercisePU" transaction-type="JTA">
6 <jta-data-source>java:jboss/datasources/swXerciseDS</jta-data-source> 8 <jta-data-source>java:jboss/datasources/swXerciseDS</jta-data-source>
7 <properties> 9 <properties>
src/test/java/net/ziemers/swxercise/lg/testdatabuilder/user/ProfileTestDataBuilder.java
@@ -5,7 +5,7 @@ import net.ziemers.swxercise.lg.testdatabuilder.AbstractTestDataBuilder; @@ -5,7 +5,7 @@ import net.ziemers.swxercise.lg.testdatabuilder.AbstractTestDataBuilder;
5 5
6 import javax.persistence.EntityManager; 6 import javax.persistence.EntityManager;
7 7
8 -public class ProfileTestDataBuilder extends AbstractTestDataBuilder { 8 +public class ProfileTestDataBuilder extends AbstractTestDataBuilder<Profile> {
9 9
10 private String username = "hbloed"; 10 private String username = "hbloed";
11 11
src/test/java/net/ziemers/swxercise/lg/testdatabuilder/user/UserDtoTestDataBuilder.java
@@ -3,8 +3,6 @@ package net.ziemers.swxercise.lg.testdatabuilder.user; @@ -3,8 +3,6 @@ package net.ziemers.swxercise.lg.testdatabuilder.user;
3 import net.ziemers.swxercise.lg.testdatabuilder.AbstractTestDataBuilder; 3 import net.ziemers.swxercise.lg.testdatabuilder.AbstractTestDataBuilder;
4 import net.ziemers.swxercise.lg.user.dto.UserDto; 4 import net.ziemers.swxercise.lg.user.dto.UserDto;
5 5
6 -import javax.persistence.EntityManager;  
7 -  
8 public class UserDtoTestDataBuilder extends AbstractTestDataBuilder<UserDto> { 6 public class UserDtoTestDataBuilder extends AbstractTestDataBuilder<UserDto> {
9 7
10 private String username = "hein"; 8 private String username = "hein";