Skip to content

Commit

Permalink
Merge pull request #23 from miladbb/1.1-hotfix
Browse files Browse the repository at this point in the history
1.1 hotfix
  • Loading branch information
miladbb authored May 30, 2024
2 parents 75522a0 + 229fe03 commit c5d0f56
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<version>1.1-SNAPSHOT</version>
<name>my-app</name>
<url>http://maven.apache.org</url>
<properties>
Expand All @@ -20,6 +20,12 @@
<version>5.10.2</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.camel/camel-core -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>4.0.5</version>
</dependency>

</dependencies>
</project>
1 change: 1 addition & 0 deletions src/main/java/com/mycompany/app/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ public class App
public static void main( String[] args )
{
System.out.println( "Hello World!" );

}
}
26 changes: 26 additions & 0 deletions src/main/java/com/mycompany/app/CamelConverters.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.mycompany.app;

import java.util.Date;
import org.apache.camel.Converter;

/**
* Custom Camel type converters.
*/
@Converter
public final class CamelConverters {
/**
* Returns a {@link Date} with the given {@link Integer} value (cast as a long) as the underlying timestamp value,
* or {@code null} if the given Integer is {@code null}.
*/
@Converter
public static Date toDate(Integer integer) {
if (integer == null) {
return null;
}
return new Date(integer.longValue());
}

private CamelConverters() throws IllegalAccessException {
throw new IllegalAccessException();
}
}

0 comments on commit c5d0f56

Please sign in to comment.