Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
JanHolger committed Nov 9, 2023
2 parents b827750 + e3de5aa commit 59aac8e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public AbstractElement toAbstract(MapperContext context, Object value) throws Ma

public Object fromAbstract(MapperContext context, AbstractElement element, Class<?> type) throws MapperException {
try {
DateFormat df = context.getAnnotation(DateFormat.class);
DateFormat df = context.getField().getAnnotation(DateFormat.class);
Date date;
if (df != null && df.epoch()) {
long time = element.number(context.getMapper().isStrict()).longValue();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
package org.javawebstack.abstractdata.mapper.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface DateFormat {

String value() default "";
Expand Down

0 comments on commit 59aac8e

Please sign in to comment.