3 Commits
v0.1 ... master

Author SHA1 Message Date
04bf8ffdc6 Fix Jackson reflection errors in GraalVM native image
Some checks failed
Build and Push Docker Image on Tag / Build and Push Docker Image (push) Has been cancelled
2025-02-12 13:46:33 +01:00
1093c0ef56 Remove sentence in README since I fixed the manual workaround 2025-02-07 19:32:42 +01:00
d21a730b2d Fix ugly TODO :) 2025-02-07 19:29:45 +01:00
4 changed files with 35 additions and 6 deletions

View File

@ -99,5 +99,5 @@ the operation (`op`), the path (`path`) to apply it to and the new value
A lot more tests. Integration tests, fuzz tests and benchmarks are those that come A lot more tests. Integration tests, fuzz tests and benchmarks are those that come
to mind. to mind.
I would also spend a lot more time understanding cyclic dependencies when (de)serializing ~~I would also spend a lot more time understanding cyclic dependencies when (de)serializing
JSON. For now there's a manual workaround in `SigningRequestDocumentServiceImpl.java`. JSON. For now there's a manual workaround in `SigningRequestDocumentServiceImpl.java`~~.

View File

@ -1,6 +1,7 @@
package ch.dlmw.swisssignchallenge.entities; package ch.dlmw.swisssignchallenge.entities;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
import jakarta.persistence.*; import jakarta.persistence.*;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
@ -11,6 +12,7 @@ import java.util.UUID;
@Table(name = "signing_request_document") @Table(name = "signing_request_document")
@Getter @Getter
@Setter @Setter
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "id")
public class SigningRequestDocument { public class SigningRequestDocument {
@Id @Id
@GeneratedValue(generator = "UUID") @GeneratedValue(generator = "UUID")
@ -19,7 +21,6 @@ public class SigningRequestDocument {
@ManyToOne(fetch = FetchType.EAGER) @ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "signing_request_id", nullable = false) @JoinColumn(name = "signing_request_id", nullable = false)
@JsonIgnore
private SigningRequest signingRequest; private SigningRequest signingRequest;
@Column(name = "name", nullable = false) @Column(name = "name", nullable = false)

View File

@ -15,8 +15,6 @@ public class SigningRequestDocumentServiceImpl implements SigningRequestDocument
@Override @Override
public void updateSigningRequestDocument(SigningRequestDocument signingRequestDocument) { public void updateSigningRequestDocument(SigningRequestDocument signingRequestDocument) {
var document = signingRequestDocumentRepository.findById(signingRequestDocument.getId()).orElseThrow();
signingRequestDocument.setSigningRequest(document.getSigningRequest()); // todo: this is a bit ugly.. due to recursion the relationship is ignored so I set it manually
signingRequestDocumentRepository.save(signingRequestDocument); signingRequestDocumentRepository.save(signingRequestDocument);
} }

View File

@ -18,5 +18,35 @@
"allDeclaredConstructors": true, "allDeclaredConstructors": true,
"allPublicConstructors": true, "allPublicConstructors": true,
"unsafeAllocated": true "unsafeAllocated": true
},
{
"name": "com.github.fge.jsonpatch.JsonPatchMessages",
"allDeclaredConstructors": true
},
{
"name": "com.github.fge.jsonpatch.JsonPatch",
"allDeclaredMethods": true,
"allDeclaredConstructors": true
},
{
"name": "com.github.fge.msgsimple.load.MessageBundles",
"allDeclaredMethods": true,
"allDeclaredConstructors": true
},
{
"name": "com.github.fge.jsonpatch.ReplaceOperation",
"allDeclaredConstructors": true,
"allDeclaredMethods": true,
"allDeclaredFields": true
},
{
"name": "com.github.fge.jackson.jsonpointer.JsonPointer",
"allDeclaredConstructors": true,
"allDeclaredMethods": true,
"allDeclaredFields": true
},
{
"name": "com.github.fge.jackson.jsonpointer.JsonPointerMessages",
"allDeclaredConstructors": true
} }
] ]