[FIX] socme checks
This commit is contained in:
parent
6af6f91166
commit
c43e283b57
@ -25,7 +25,7 @@
|
||||
<attribute name="optional" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
6
.project
6
.project
@ -15,10 +15,16 @@
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
<nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
|
45
pom.xml
45
pom.xml
@ -5,7 +5,7 @@
|
||||
<artifactId>archidata</artifactId>
|
||||
<version>0.10.3</version>
|
||||
<properties>
|
||||
<java.version>21</java.version>
|
||||
<java.version>21</java.version>
|
||||
<maven.compiler.version>3.1</maven.compiler.version>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
@ -120,7 +120,6 @@
|
||||
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||
<version>2.17.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>jakarta.servlet</groupId>
|
||||
<artifactId>jakarta.servlet-api</artifactId>
|
||||
@ -170,20 +169,19 @@
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<version>5.11.0-M2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.revelc.code.formatter</groupId>
|
||||
<artifactId>formatter-maven-plugin</artifactId>
|
||||
<version>2.23.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>3.3.1</version>
|
||||
<groupId>net.revelc.code.formatter</groupId>
|
||||
<artifactId>formatter-maven-plugin</artifactId>
|
||||
<version>2.23.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>3.3.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
<resources>
|
||||
@ -269,7 +267,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>3.3.1</version>
|
||||
<version>3.3.1</version>
|
||||
<configuration>
|
||||
<configLocation>CheckStyle.xml</configLocation>
|
||||
<consoleOutput>true</consoleOutput>
|
||||
@ -281,7 +279,7 @@
|
||||
<plugin>
|
||||
<groupId>net.revelc.code.formatter</groupId>
|
||||
<artifactId>formatter-maven-plugin</artifactId>
|
||||
<version>2.23.0</version>
|
||||
<version>2.23.0</version>
|
||||
<configuration>
|
||||
<encoding>UTF-8</encoding>
|
||||
<lineEnding>LF</lineEnding>
|
||||
@ -305,6 +303,23 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.github.spotbugs</groupId>
|
||||
<artifactId>spotbugs-maven-plugin</artifactId>
|
||||
<version>4.8.5.0</version>
|
||||
<configuration>
|
||||
<includeFilterFile>spotbugs-security-include.xml</includeFilterFile>
|
||||
<excludeFilterFile>spotbugs-security-exclude.xml</excludeFilterFile>
|
||||
<!--<plugins>
|
||||
<plugin>
|
||||
<groupId>com.h3xstream.findsecbugs</groupId>
|
||||
<artifactId>findsecbugs-plugin</artifactId>
|
||||
<version>1.12.0</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
-->
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<!-- Generate Java-docs As Part Of Project Reports -->
|
||||
|
@ -4,7 +4,7 @@ import org.kar.archidata.db.DBConfig;
|
||||
import org.kar.archidata.tools.ConfigBaseVariable;
|
||||
|
||||
public class GlobalConfiguration {
|
||||
public static DBConfig dbConfig = null;
|
||||
public static final DBConfig dbConfig;
|
||||
|
||||
static {
|
||||
dbConfig = new DBConfig(ConfigBaseVariable.getDBType(), ConfigBaseVariable.getDBHost(),
|
||||
|
@ -969,13 +969,12 @@ public class DataAccess {
|
||||
// uniqueSQLUUID = generatedKeys.getObject(1, UUID.class);
|
||||
/* final Object obj = generatedKeys.getObject(1); final BigInteger bigint = (BigInteger) generatedKeys.getObject(1); uniqueSQLUUID = UuidUtils.asUuid(bigint); final UUID
|
||||
* generatedUUID = (UUID) generatedKeys.getObject(1); System.out.println("UUID généré: " + generatedUUID); */
|
||||
final Object obj = generatedKeys.getObject(1);
|
||||
//final Object obj = generatedKeys.getObject(1);
|
||||
final byte[] tmpid = generatedKeys.getBytes(1);
|
||||
uniqueSQLUUID = UuidUtils.asUuid(tmpid);
|
||||
} else {
|
||||
uniqueSQLID = generatedKeys.getLong(1);
|
||||
}
|
||||
|
||||
} else {
|
||||
throw new SQLException("Creating node failed, no ID obtained (1).");
|
||||
}
|
||||
@ -985,6 +984,7 @@ public class DataAccess {
|
||||
throw new SQLException("Creating node failed, no ID obtained (2).");
|
||||
}
|
||||
}
|
||||
ps.close();
|
||||
if (primaryKeyField != null) {
|
||||
if (primaryKeyField.getType() == Long.class) {
|
||||
primaryKeyField.set(data, uniqueSQLID);
|
||||
@ -1228,7 +1228,9 @@ public class DataAccess {
|
||||
}
|
||||
}
|
||||
condition.injectQuery(ps, iii);
|
||||
return ps.executeUpdate();
|
||||
final int out = ps.executeUpdate();
|
||||
ps.close();
|
||||
return out;
|
||||
}
|
||||
} catch (final SQLException ex) {
|
||||
ex.printStackTrace();
|
||||
@ -1574,10 +1576,6 @@ public class DataAccess {
|
||||
return getsWhere(clazz, option);
|
||||
}
|
||||
|
||||
public static <ID_TYPE> int delete(final Class<?> clazz, final ID_TYPE id) throws Exception {
|
||||
return delete(clazz, id, null);
|
||||
}
|
||||
|
||||
/** Delete items with the specific Id (cf @Id) and some options. If the Entity is manage as a softDeleted model, then it is flag as removed (if not already done before).
|
||||
* @param <ID_TYPE> Type of the reference @Id
|
||||
* @param clazz Data model that might remove element
|
||||
|
@ -47,7 +47,7 @@ public class UuidUtils {
|
||||
this.base = startingUUID.until(Instant.now(), ChronoUnit.SECONDS);
|
||||
final String serveurBaseUUID = System.getenv("UUID_SERVER_ID");
|
||||
if (serveurBaseUUID != null) {
|
||||
long serverId = Long.valueOf(serveurBaseUUID);
|
||||
long serverId = Long.parseLong(serveurBaseUUID);
|
||||
serverId %= 0xFFFF;
|
||||
this.base += (serverId << (64 - 16));
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user