-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from miladbb/1.1-hotfix
1.1 hotfix
- Loading branch information
Showing
3 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,5 +9,6 @@ public class App | |
public static void main( String[] args ) | ||
{ | ||
System.out.println( "Hello World!" ); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} |