Skip to content

Commit bee0e05

Browse files
authored
Merge pull request #50 from lunasoft/bugfix/maven_checkstyle
Fix maven checkstyle
2 parents b680f56 + 40060a4 commit bee0e05

File tree

67 files changed

+560
-551
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+560
-551
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.annotation.nonnull=javax.annotation.Nonnull
3+
org.eclipse.jdt.core.compiler.annotation.nullable=javax.annotation.Nullable
4+
org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
25
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
36
org.eclipse.jdt.core.compiler.compliance=1.8
47
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
58
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
9+
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
10+
org.eclipse.jdt.core.compiler.problem.nullReference=warning
11+
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=warning
12+
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
613
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
14+
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
715
org.eclipse.jdt.core.compiler.processAnnotations=disabled
816
org.eclipse.jdt.core.compiler.release=disabled
917
org.eclipse.jdt.core.compiler.source=1.8

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
"**/.project": true,
66
"**/.settings": true,
77
"**/.factorypath": true
8-
}
8+
},
9+
"java.compile.nullAnalysis.mode": "automatic"
910
}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>mx.com.sw</groupId>
55
<artifactId>sdk-java18</artifactId>
6-
<version>0.0.12.1</version>
6+
<version>0.0.13.1</version>
77
<packaging>jar</packaging>
88
<properties>
99
<maven.compiler.source>1.8</maven.compiler.source>

resources/pdfresult.pdf

-3.75 KB
Binary file not shown.
Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
package mx.com.sw.helpers;
22

3+
/**
4+
* Representa la operacion a realizar, agregar o remover timbres.
5+
*/
36
public enum EnumAccountBalance {
4-
Add, Remove;
5-
}
7+
/**
8+
* Agregar.
9+
*/
10+
Add,
11+
/**
12+
* Eliminar.
13+
*/
14+
Remove;
15+
}

src/main/java/mx/com/sw/helpers/ResponseHelper.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22

33
import java.io.PrintWriter;
44
import java.io.StringWriter;
5-
65
import mx.com.sw.services.Validate.responses.ValidateResponse;
76
import mx.com.sw.services.acceptreject.responses.AcceptRejectResponse;
87
import mx.com.sw.services.account.balance.responses.AccountBalanceResponse;
9-
import mx.com.sw.services.account.info.responses.AccountInfoActionResponse;
108
import mx.com.sw.services.account.balance.responses.AccountBalanceActionResponse;
9+
import mx.com.sw.services.account.info.responses.AccountInfoActionResponse;
1110
import mx.com.sw.services.account.info.responses.AccountInfoResponse;
1211
import mx.com.sw.services.account.info.responses.AccountListDataResponse;
1312
import mx.com.sw.services.authentication.responses.AuthenticationResponse;
@@ -24,6 +23,7 @@
2423
import mx.com.sw.services.stamp.responses.StampResponseV3;
2524
import mx.com.sw.services.stamp.responses.StampResponseV4;
2625
import mx.com.sw.services.storage.StorageResponse;
26+
2727
/**
2828
* ResponseHelper
2929
* Está clase funciona como un handler de exceptions donde se toma un exception
@@ -141,6 +141,7 @@ public static AccountBalanceResponse toAccountBalanceResponse(Throwable ex) {
141141
public static AccountBalanceActionResponse toAccountActionsData(Throwable ex) {
142142
return new AccountBalanceActionResponse(STATUS_ERROR, ex.getMessage(), getStackError(ex), null);
143143
}
144+
144145
/**
145146
* Este método obtiene una respuesta de tipo PendingsResponse.
146147
* @param ex Throwable a ser tratado
@@ -159,14 +160,15 @@ public static AccountInfoResponse toAccountInfoResponse(Throwable ex) {
159160
return new AccountInfoResponse(STATUS_ERROR, ex.getMessage(), getStackError(ex), null);
160161
}
161162

162-
/**
163+
/**
163164
* Este método obtiene una respuesta de tipo AccountInfoActionResponse.
164165
* @param ex Throwable a ser tratado
165166
* @return {@link AccountInfoResponse}
166167
*/
167168
public static AccountInfoActionResponse toAccountInfoActionResponse(Throwable ex) {
168169
return new AccountInfoActionResponse(STATUS_ERROR, ex.getMessage(), getStackError(ex), null);
169170
}
171+
170172
/**
171173
* Este método obtiene una respuesta de tipo AccountListDataResponse.
172174
* @param ex Throwable a ser tratado
@@ -223,6 +225,7 @@ public static RelationsResponse toRelationsResponse(Throwable ex) {
223225
public static StorageResponse toStorageResponse(Throwable ex) {
224226
return new StorageResponse(STATUS_ERROR, ex.getMessage(), getStackError(ex), null);
225227
}
228+
226229
/**
227230
* Este método obtiene una respuesta de tipo ResendResponse.
228231
* @param ex Throwable a ser tratado
@@ -231,12 +234,14 @@ public static StorageResponse toStorageResponse(Throwable ex) {
231234
public static ResendResponse toResendResponse(Throwable ex) {
232235
return new ResendResponse(STATUS_ERROR, ex.getMessage(), getStackError(ex), null);
233236
}
237+
234238
/**
235239
* Este método obtiene una respuesta de tipo ValidateResponse.
236240
* @param ex Throwable a ser tratado
237241
* @return {@link PdfResponse}
238242
*/
239243
public static ValidateResponse toValidateResponse(Throwable ex) {
240-
return new ValidateResponse(STATUS_ERROR, ex.getMessage(), getStackError(ex), null,null,null,null,null,null);
244+
return new ValidateResponse(STATUS_ERROR, ex.getMessage(),
245+
getStackError(ex), null, null, null, null, null, null);
241246
}
242-
}
247+
}

src/main/java/mx/com/sw/services/ResponseHandler.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import org.apache.http.client.methods.HttpDelete;
2222
import org.apache.http.client.methods.HttpGet;
2323
import org.apache.http.client.methods.HttpPost;
24-
import org.apache.http.client.methods.HttpPut;
2524
import org.apache.http.entity.BufferedHttpEntity;
2625
import org.apache.http.entity.ContentType;
2726
import org.apache.http.entity.StringEntity;
@@ -34,7 +33,6 @@
3433
/**
3534
* ResponseHandler Clase mediante la cual se hacen las peticiones y
3635
* des-serializaciones de respuestas.
37-
*
3836
* @param <T> IResponse subclasses
3937
* @author Juan Gamez
4038
* @version 0.0.0.1
@@ -48,7 +46,6 @@ public abstract class ResponseHandler<T> {
4846

4947
/**
5048
* Este método realiza un HTTP POST con la configuracion enviada.
51-
*
5249
* @param url String url o host.
5350
* @param path String path
5451
* @param headers Map String String con headers.
@@ -122,7 +119,6 @@ public T postHTTPJson(String url, String path, Map<String, String> headers, Stri
122119
/**
123120
* Este método realiza un HTTP POST (modo Multipart form data) con la
124121
* configuracion enviada.
125-
*
126122
* @param url String url o host.
127123
* @param path String path.
128124
* @param headers Map String String con headers.
@@ -202,7 +198,6 @@ public T postHTTPMultipart(String url, String path, Map<String, String> headers,
202198

203199
/**
204200
* Este método realiza un HTTP GET con la configuracion enviada.
205-
*
206201
* @param url String url o host.
207202
* @param path String path.
208203
* @param headers Map String String con headers.
@@ -274,7 +269,6 @@ public T getHTTP(String url, String path, Map<String, String> headers, RequestCo
274269

275270
/**
276271
* Este método realiza un HTTP DELTE con la configuracion enviada.
277-
*
278272
* @param url String url o host.
279273
* @param path String path.
280274
* @param headers Map String String con headers.
@@ -346,7 +340,6 @@ public T deleteHTTP(String url, String path, Map<String, String> headers, Reques
346340

347341
/**
348342
* Este método realiza una deserializacion de un JSON al tipo de clase T.
349-
*
350343
* @param json String json.
351344
* @param contentClass Clase esperada de respuesta.
352345
* @return T

src/main/java/mx/com/sw/services/StatusCfdi/StatusCfdi.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
package mx.com.sw.services.StatusCfdi;
22

3-
import mx.com.sw.exceptions.GeneralException;
4-
import mx.com.sw.services.StatusCfdi.responses.StatusCfdiResponse;
5-
import mx.com.sw.exceptions.ServicesException;
6-
73
import java.io.IOException;
84
import javax.xml.soap.SOAPException;
5+
import mx.com.sw.exceptions.GeneralException;
6+
import mx.com.sw.exceptions.ServicesException;
7+
import mx.com.sw.services.StatusCfdi.responses.StatusCfdiResponse;
98

109
/**
1110
* La clase StatusCfdi proporciona métodos para obtener el estado del CFDI.
@@ -34,7 +33,9 @@ public StatusCfdi() {
3433
* @throws IOException Si ocurre un error de entrada/salida.
3534
* @throws SOAPException Si ocurre un error de SOAP.
3635
*/
37-
public StatusCfdiResponse GetStatusCfdi(String rfcEmisor, String rfcReceptor, String total, String uuid, String sello) throws ServicesException, GeneralException, IOException, SOAPException {
36+
public StatusCfdiResponse GetStatusCfdi(String rfcEmisor, String rfcReceptor, String total,
37+
String uuid, String sello)
38+
throws ServicesException, GeneralException, IOException, SOAPException {
3839
return Service.GetStatusCfdi(rfcEmisor, rfcReceptor, total, uuid, sello);
3940
}
40-
}
41+
}
Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
package mx.com.sw.services.StatusCfdi;
22

3+
import java.io.IOException;
4+
import javax.xml.soap.SOAPException;
35
import mx.com.sw.exceptions.GeneralException;
6+
import mx.com.sw.exceptions.ServicesException;
47
import mx.com.sw.services.StatusCfdi.request.StatusCfdiOptionsRequest;
58
import mx.com.sw.services.StatusCfdi.request.StatusCfdiRequest;
69
import mx.com.sw.services.StatusCfdi.responses.StatusCfdiResponse;
7-
import mx.com.sw.exceptions.ServicesException;
8-
9-
import java.io.IOException;
10-
import javax.xml.soap.SOAPException;
1110

11+
/**
12+
* StatusCfdiService.
13+
*/
1214
class StatusCfdiService {
1315
/**
1416
* Endpoint y Action necesarios a usar.
15-
*
1617
* @param URL La URL del servicio según el entorno.
1718
* @param Action La acción a realizar SOAP predefinida.
1819
*/
@@ -22,13 +23,12 @@ class StatusCfdiService {
2223
/**
2324
* Constructor de la clase StatusCfdiService.
2425
*/
25-
StatusCfdiService(String URL) {
26+
StatusCfdiService(String URL) {
2627
this.URL = URL;
2728
}
2829

2930
/**
3031
* Obtiene el estado del CFDI.
31-
*
3232
* @param rfcEmisor El RFC del emisor.
3333
* @param rfcReceptor El RFC del receptor.
3434
* @param total El total del CFDI.
@@ -40,9 +40,11 @@ class StatusCfdiService {
4040
* @throws IOException Si ocurre un error de entrada/salida.
4141
* @throws SOAPException Si ocurre un error de SOAP.
4242
*/
43-
StatusCfdiResponse GetStatusCfdi(String rfcEmisor, String rfcReceptor, String total, String uuid, String sello) throws ServicesException, GeneralException, IOException, SOAPException {
44-
StatusCfdiOptionsRequest settings = new StatusCfdiOptionsRequest(URL, Action, rfcEmisor, rfcReceptor, total, uuid, sello, null, 0);
43+
StatusCfdiResponse GetStatusCfdi(String rfcEmisor, String rfcReceptor, String total, String uuid, String sello)
44+
throws ServicesException, GeneralException, IOException, SOAPException {
45+
StatusCfdiOptionsRequest settings = new StatusCfdiOptionsRequest(URL, Action, rfcEmisor, rfcReceptor,
46+
total, uuid, sello, null, 0);
4547
StatusCfdiRequest req = new StatusCfdiRequest();
4648
return req.sendRequest(settings);
4749
}
48-
}
50+
}

src/main/java/mx/com/sw/services/StatusCfdi/request/StatusCfdiOptionsRequest.java

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ public class StatusCfdiOptionsRequest implements IRequestor {
1919

2020
/**
2121
* Constructor de la clase StatusCfdiOptionsRequest.
22-
*
2322
* @param URI La URI de la solicitud.
2423
* @param action La acción de la solicitud.
2524
* @param rfcEmisor El RFC del emisor.
@@ -30,7 +29,8 @@ public class StatusCfdiOptionsRequest implements IRequestor {
3029
* @param proxyHost El host del proxy.
3130
* @param proxyPort El puerto del proxy.
3231
*/
33-
public StatusCfdiOptionsRequest(String URI, String action, String rfcEmisor, String rfcReceptor, String total, String uuid, String sello, String proxyHost, int proxyPort) {
32+
public StatusCfdiOptionsRequest(String URI, String action, String rfcEmisor, String rfcReceptor,
33+
String total, String uuid, String sello, String proxyHost, int proxyPort) {
3434
this.URI = URI;
3535
this.rfcEmisor = rfcEmisor;
3636
this.rfcReceptor = rfcReceptor;
@@ -42,7 +42,6 @@ public StatusCfdiOptionsRequest(String URI, String action, String rfcEmisor, Str
4242

4343
/**
4444
* Obtiene la URI de la solicitud.
45-
*
4645
* @return La URI de la solicitud.
4746
*/
4847
public String getURI() {
@@ -51,7 +50,6 @@ public String getURI() {
5150

5251
/**
5352
* Obtiene el RFC del emisor.
54-
*
5553
* @return El RFC del emisor.
5654
*/
5755
public String getRfcEmisor() {
@@ -60,7 +58,6 @@ public String getRfcEmisor() {
6058

6159
/**
6260
* Obtiene el RFC del receptor.
63-
*
6461
* @return El RFC del receptor.
6562
*/
6663
public String getRfcReceptor() {
@@ -69,7 +66,6 @@ public String getRfcReceptor() {
6966

7067
/**
7168
* Obtiene el total del CFDI.
72-
*
7369
* @return El total del CFDI.
7470
*/
7571
public String getTotal() {
@@ -78,7 +74,6 @@ public String getTotal() {
7874

7975
/**
8076
* Obtiene el UUID del CFDI.
81-
*
8277
* @return El UUID del CFDI.
8378
*/
8479
public String getUuid() {
@@ -87,7 +82,6 @@ public String getUuid() {
8782

8883
/**
8984
* Obtiene el sello del CFDI.
90-
*
9185
* @return El sello del CFDI.
9286
*/
9387
public String getSello() {
@@ -96,7 +90,6 @@ public String getSello() {
9690

9791
/**
9892
* Obtiene la acción de la solicitud.
99-
*
10093
* @return La acción de la solicitud.
10194
*/
10295
public String getAction() {
@@ -105,7 +98,6 @@ public String getAction() {
10598

10699
/**
107100
* Método sobreescrito de la interfaz IRequestor.
108-
*
109101
* @param arg0 Los archivos de clase.
110102
* @param arg1 Los caracteres.
111103
* @return Si se aceptan los archivos de clase.
@@ -118,7 +110,6 @@ public boolean acceptClassFiles(ClassFile[] arg0, char[] arg1) {
118110

119111
/**
120112
* Método sobreescrito de la interfaz IRequestor.
121-
*
122113
* @param arg0 El problema categorizado.
123114
* @param arg1 Los caracteres.
124115
* @param arg2 El número.
@@ -128,4 +119,4 @@ public boolean acceptClassFiles(ClassFile[] arg0, char[] arg1) {
128119
public void acceptProblem(CategorizedProblem arg0, char[] arg1, int arg2) {
129120
throw new UnsupportedOperationException("Unimplemented method 'acceptProblem'");
130121
}
131-
}
122+
}

0 commit comments

Comments
 (0)