Skip to content

Commit

Permalink
cleanup for release
Browse files Browse the repository at this point in the history
  • Loading branch information
mprins committed Sep 27, 2019
1 parent 5400fb6 commit 5370de4
Show file tree
Hide file tree
Showing 3 changed files with 237 additions and 248 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ gds2_key.jks
*.pem
*.crt
*.log
*.csv
notes
!private.key
!public.key
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/nl/b3p/gds2/GDS2Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ public class GDS2Util {
private static final String PEM_CERT_START = "-----BEGIN CERTIFICATE-----";
private static final String PEM_CERT_END = "-----END CERTIFICATE-----";

private GDS2Util() {
}

public static Certificate getCertificateFromPEM(String pem) throws CertificateException, UnsupportedEncodingException {
if (!pem.startsWith(PEM_CERT_START)) {
throw new IllegalArgumentException("Certificaat moet beginnen met " + PEM_CERT_START);
Expand Down Expand Up @@ -243,12 +240,15 @@ public static XMLGregorianCalendar getXMLDatumTijd(Date date) {
* @param date datum
* @return xml datum (of null ingeval van een DatatypeConfigurationException)
*/
public static XMLGregorianCalendar getXMLDatumTijd(GregorianCalendar date) throws DatatypeConfigurationException {
public static XMLGregorianCalendar getXMLDatumTijd(GregorianCalendar date) {
try {
return DatatypeFactory.newInstance().newXMLGregorianCalendar(date);
} catch (DatatypeConfigurationException e) {
LOG.error(e);
return null;
}
}

private GDS2Util() {
}
}
Loading

0 comments on commit 5370de4

Please sign in to comment.