Skip to content

Commit

Permalink
resolve PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mjechow committed Dec 4, 2023
1 parent 1389d7d commit 457904f
Show file tree
Hide file tree
Showing 7 changed files with 286 additions and 276 deletions.
3 changes: 0 additions & 3 deletions src/main/java/xades4j/production/DataObjectReference.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ public DataObjectReference(String uri)
{
throw new NullPointerException("Reference URI cannot be null");
}

uri = uri.trim();

this.uri = URI.create(uri.trim()).toString();
}

Expand Down
6 changes: 5 additions & 1 deletion src/main/java/xades4j/properties/IdentifierType.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,12 @@ public enum IdentifierType
* The identifier is an Object Identifier encoded as a URI
*/
OID_AS_URI,
@Deprecated(since="2.2.2")
OIDAsURI,
/**
* The identifier is an Object Identifier encoded as a URN
*/
OID_AS_URN
OID_AS_URN,
@Deprecated(since="2.2.2")
OIDAsURN
}
399 changes: 199 additions & 200 deletions src/main/java/xades4j/xml/bind/xades/ObjectFactory.java

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion src/main/java/xades4j/xml/bind/xades/XmlQualifierType.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ public enum XmlQualifierType {
@XmlEnumValue("OIDAsURI")
OID_AS_URI("OIDAsURI"),
@XmlEnumValue("OIDAsURN")
OID_AS_URN("OIDAsURN");
OID_AS_URN("OIDAsURN"),
@Deprecated(since="2.2.2")
@XmlEnumValue("OIDAsURI")
OIDAsURI("OIDAsURI"),
@Deprecated(since="2.2.2")
@XmlEnumValue("OIDAsURN")
OIDAsURN("OIDAsURN");
private final String value;

XmlQualifierType(String v) {
Expand Down
142 changes: 71 additions & 71 deletions src/main/java/xades4j/xml/bind/xmldsig/ObjectFactory.java

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/main/java/xades4j/xml/marshalling/ToXmlUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ class ToXmlUtils
identifierTypeConv = new EnumMap<>(IdentifierType.class);
identifierTypeConv.put(IdentifierType.OID_AS_URI, XmlQualifierType.OID_AS_URI);
identifierTypeConv.put(IdentifierType.OID_AS_URN, XmlQualifierType.OID_AS_URN);
identifierTypeConv.put(IdentifierType.OIDAsURI, XmlQualifierType.OIDAsURI);
identifierTypeConv.put(IdentifierType.OIDAsURN, XmlQualifierType.OIDAsURN);
}

static XmlObjectIdentifierType getXmlObjectId(ObjectIdentifier objId)
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/xades4j/xml/unmarshalling/FromXmlUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ static void createAndCertificateRefs(
identifierTypeConv.put(null, IdentifierType.URI);
identifierTypeConv.put(XmlQualifierType.OID_AS_URI, IdentifierType.OID_AS_URI);
identifierTypeConv.put(XmlQualifierType.OID_AS_URN, IdentifierType.OID_AS_URN);
identifierTypeConv.put(XmlQualifierType.OIDAsURI, IdentifierType.OIDAsURI);
identifierTypeConv.put(XmlQualifierType.OIDAsURN, IdentifierType.OIDAsURN);
}

static ObjectIdentifier getObjectIdentifier(XmlObjectIdentifierType xmlObjId)
Expand Down

0 comments on commit 457904f

Please sign in to comment.