Skip to content

Commit

Permalink
Merge pull request #108 from mksbtech/master
Browse files Browse the repository at this point in the history
fix:Updated Java version,Javassist version,added lombok
  • Loading branch information
avurro authored Oct 25, 2023
2 parents df2597b + e4e1328 commit 7da6be6
Show file tree
Hide file tree
Showing 11 changed files with 182 additions and 334 deletions.
36 changes: 27 additions & 9 deletions JMapper Framework/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

<properties>
<project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
<lombok.version>1.18.26</lombok.version>
<javassist.version>3.29.2-GA</javassist.version>
</properties>

<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -30,11 +32,7 @@
<connection>scm:git:git@github.com:someshwar1/jmapper-core.git</connection>
<developerConnection>scm:git:git@github.com:someshwar1/jmapper-core.git</developerConnection>
<url>git@github.com:someshwar1/jmapper-core.git</url>
</scm>
<properties>
<sonar.organization>someshwar1</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
</properties>
</scm>
<developers>
<developer>
<id>alessandro.vurro</id>
Expand All @@ -48,6 +46,12 @@
<email>amireddysomesher@gmail.com</email>
<roles><role>developer</role></roles>
</developer>
<developer>
<id>mksbtech</id>
<name>Milan Sonkar</name>
<email>mksbtech@gmail.com</email>
<roles><role>developer</role></roles>
</developer>
</developers>

<distributionManagement>
Expand Down Expand Up @@ -93,8 +97,15 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>11</source>
<target>11</target>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -173,7 +184,7 @@
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.22.0-CR1</version>
<version>${javassist.version}</version>
</dependency>

<dependency>
Expand All @@ -185,14 +196,21 @@
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.18</version>
<version>1.4.20</version>
</dependency>

<dependency>
<groupId>net.sf.kxml</groupId>
<artifactId>kxml2</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>

</dependencies>

</project>
Expand Down
84 changes: 56 additions & 28 deletions JMapper Framework/src/main/java/com/googlecode/jmapper/IMapper.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ public final class JMapper<D,S> implements IJMapper<D, S>{

/**
* This method returns a new instance of Destination Class with this setting:
* <table summary = "">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td><code>SOURCE</code></td>
* </tr><tr>
Expand All @@ -104,7 +105,8 @@ public D getDestination(final S source){

/**
* This method returns a new instance of Destination Class with this setting:
* <table summary = "">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td><code>NOT_ANY</code></td>
* </tr><tr>
Expand All @@ -130,7 +132,8 @@ public D getDestinationWithoutControl(final S source){
/**
* This Method returns the destination given in input enriched with data contained in source given in input<br>
* with this setting:
* <table summary = "">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td><code>ALL</code></td>
* </tr><tr>
Expand All @@ -157,7 +160,8 @@ public D getDestination(D destination,final S source){
/**
* This Method returns the destination given in input enriched with data contained in source given in input<br>
* with this setting:
* <table summary = "">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td><code>NOT_ANY</code></td>
* </tr><tr>
Expand All @@ -183,7 +187,8 @@ public D getDestinationWithoutControl(D destination,final S source){

/**
* This method returns a new instance of Destination Class with this setting:
* <table summary = "">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td><code>SOURCE</code></td>
* </tr><tr>
Expand All @@ -204,7 +209,8 @@ public D getDestination(final S source,final MappingType mtSource){

/**
* This method returns a new instance of Destination Class with this setting:
* <table summary = "">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td>nullPointerControl</td>
* </tr><tr>
Expand Down Expand Up @@ -244,7 +250,8 @@ public D getDestination(final S source,final NullPointerControl nullPointerContr
/**
* This Method returns the destination given in input enriched with data contained in source given in input<br>
* with this setting:
* <table summary = "">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td><code>ALL</code></td>
* </tr><tr>
Expand All @@ -268,7 +275,8 @@ public D getDestination(D destination,final S source,final MappingType mtDestina
/**
* This Method returns the destination given in input enriched with data contained in source given in input<br>
* with this setting:
* <table summary = "">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td>nullPointerControl</td>
* </tr><tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ private <D,S> JMapper<D,S> getJMapper(HashMap<String,JMapper> map,Object source)

/**
* This method returns a new instance of Configured Class with this setting:
* <table summary ="">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td><code>SOURCE</code></td>
* </tr><tr>
Expand All @@ -354,7 +355,8 @@ public <S> T manyToOne(final S source) {

/**
* This method returns a new instance of Configured Class with this setting:
* <table summary ="">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td><code>NOT_ANY</code></td>
* </tr><tr>
Expand All @@ -376,7 +378,8 @@ public <S> T manyToOneWithoutControl(final S source) {
/**
* This Method returns the configured instance given in input enriched with data contained in source given in input<br>
* with this setting:
* <table summary ="">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td><code>ALL</code></td>
* </tr><tr>
Expand All @@ -399,7 +402,8 @@ public <S> T manyToOne(T destination,final S source) {
/**
* This Method returns the configured instance given in input enriched with data contained in source given in input<br>
* with this setting:
* <table summary ="">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td><code>NOT_ANY</code></td>
* </tr><tr>
Expand All @@ -421,7 +425,8 @@ public <S> T manyToOneWithoutControl(T destination,final S source) {

/**
* This method returns a new instance of Configured Class with this setting:
* <table summary ="">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td><code>SOURCE</code></td>
* </tr><tr>
Expand All @@ -443,7 +448,8 @@ public <S> T manyToOne(final S source,final MappingType mtSource) {

/**
* This method returns a new instance of Configured Class with this setting:
* <table summary ="">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td>nullPointerControl</td>
* </tr><tr>
Expand All @@ -467,7 +473,8 @@ public <S> T manyToOne(final S source,final NullPointerControl nullPointerContro
/**
* This Method returns the configured instance given in input enriched with data contained in source given in input<br>
* with this setting:
* <table summary ="">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td><code>ALL</code></td>
* </tr><tr>
Expand All @@ -492,7 +499,8 @@ public <S> T manyToOne(T destination,final S source,final MappingType mtDestinat
/**
* This Method returns the configured instance given in input enriched with data contained in source given in input<br>
* with this setting:
* <table summary ="">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td>nullPointerControl</td>
* </tr><tr>
Expand All @@ -517,7 +525,8 @@ public <S> T manyToOne(T destination,final S source,final NullPointerControl nul

/**
* This method returns a new instance of Target Class with this setting:
* <table summary ="">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td><code>SOURCE</code></td>
* </tr><tr>
Expand All @@ -540,7 +549,8 @@ public <D> D oneToMany(Class<D> destinationClass, final T source) {

/**
* This method returns a new instance of Target Class with this setting:
* <table summary ="">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td><code>NOT_ANY</code></td>
* </tr><tr>
Expand All @@ -562,7 +572,8 @@ public <D> D oneToManyWithoutControl(Class<D> destinationClass, final T source)
/**
* This Method returns the destination given in input enriched with data contained in source given in input<br>
* with this setting:
* <table summary ="">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td><code>ALL</code></td>
* </tr><tr>
Expand All @@ -585,7 +596,8 @@ public <D> D oneToMany(D destination,final T source) {
/**
* This Method returns the destination given in input enriched with data contained in source given in input<br>
* with this setting:
* <table summary ="">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td><code>NOT_ANY</code></td>
* </tr><tr>
Expand All @@ -607,7 +619,8 @@ public <D> D oneToManyWithoutControl(D destination,final T source) {

/**
* This method returns a new instance of Target Class with this setting:
* <table summary ="">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td><code>SOURCE</code></td>
* </tr><tr>
Expand All @@ -630,7 +643,8 @@ public <D> D oneToMany(Class<D> destinationClass, final T source,final MappingTy

/**
* This method returns a new instance of Target Class with this setting:
* <table summary ="">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td>nullPointerControl</td>
* </tr><tr>
Expand All @@ -654,7 +668,8 @@ public <D> D oneToMany(Class<D> destinationClass, final T source,final NullPoint
/**
* This Method returns the destination given in input enriched with data contained in source given in input<br>
* with this setting:
* <table summary ="">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td><code>ALL</code></td>
* </tr><tr>
Expand All @@ -679,7 +694,8 @@ public <D> D oneToMany(D destination,final T source,final MappingType mtDestinat
/**
* This Method returns the destination given in input enriched with data contained in source given in input<br>
* with this setting:
* <table summary ="">
* <table>
* <caption>Summary</caption>
* <tr>
* <td><code>NullPointerControl</code></td><td>nullPointerControl</td>
* </tr><tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,18 @@
package com.googlecode.jmapper.config;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.googlecode.jmapper.JMapper;
import com.googlecode.jmapper.exceptions.JMapperException;

import lombok.extern.slf4j.Slf4j;

/**
* Custom logger to semplify exceptions handling.
*
* @author Alessandro Vurro
*
*/
@Slf4j
public class JmapperLog {

/** logger */
private static final Logger logger = LoggerFactory.getLogger(JMapper.class);

private JmapperLog(){}

Expand All @@ -42,7 +38,7 @@ private JmapperLog(){}
* @param e exception to handle
*/
public static void error(Throwable e) throws JMapperException{
logger.error("{}: {}",e.getClass().getSimpleName(),e.getMessage());
log.error("{}: {}",e.getClass().getSimpleName(),e.getMessage());
throw new JMapperException(e);
}
}
Loading

0 comments on commit 7da6be6

Please sign in to comment.