Skip to content

Commit f5ed004

Browse files
committed
Reformat all code. Remove unneeded source code
1 parent 873c733 commit f5ed004

File tree

24 files changed

+1853
-2611
lines changed

24 files changed

+1853
-2611
lines changed

gxawsserverless/src/main/java/com/genexus/cloud/serverless/aws/handler/LambdaSQSHandler.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@ public LambdaSQSHandler(String className) throws Exception {
2828
super(className);
2929
}
3030

31-
//https://docs.aws.amazon.com/en_gb/lambda/latest/dg/with-sqs.html
3231
@Override
3332
public SQSBatchResponse handleRequest(SQSEvent sqsEvent, Context context) {
34-
int msgCount = (int) sqsEvent.getRecords().stream().count();
35-
36-
logger.debug("handleRequest started with #sqsItems: " + msgCount);
33+
if (logger.isDebugEnabled()) {
34+
logger.debug("handleRequest started with #sqsItems: " + (int) sqsEvent.getRecords().size());
35+
}
3736

3837
EventMessages msgs = new EventMessages();
3938

@@ -76,7 +75,7 @@ public SQSBatchResponse handleRequest(SQSEvent sqsEvent, Context context) {
7675
if (!wasHandled) {
7776
logger.error(String.format("Messages were not handled. Marking all SQS Events as failed: %s", errorMessage));
7877
List<SQSBatchResponse.BatchItemFailure> failures = new ArrayList<>();
79-
//Assume all batch failed
78+
//Assume all batch has failed.
8079
for (SQSMessage sqsItem : sqsEvent.getRecords()) {
8180
failures.add(new SQSBatchResponse.BatchItemFailure(sqsItem.getMessageId()));
8281
}

gxawsserverless/src/test/java/com/amazonaws/serverless/proxy/test/jersey/model/MapResponseModel.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@
1919
* Request/response model
2020
*/
2121
public class MapResponseModel {
22-
private Map<String, String> values;
22+
private Map<String, String> values;
2323

24-
public MapResponseModel() {
25-
this.values = new HashMap<>();
26-
}
24+
public MapResponseModel() {
25+
this.values = new HashMap<>();
26+
}
2727

28-
public void addValue(String key, String value) {
29-
this.values.put(key, value);
30-
}
28+
public void addValue(String key, String value) {
29+
this.values.put(key, value);
30+
}
3131

32-
public Map<String, String> getValues() {
33-
return values;
34-
}
32+
public Map<String, String> getValues() {
33+
return values;
34+
}
3535

36-
public void setValues(Map<String, String> values) {
37-
this.values = values;
38-
}
36+
public void setValues(Map<String, String> values) {
37+
this.values = values;
38+
}
3939
}

gxawsserverless/src/test/java/com/genexus/cloud/aws/events/TestLambdaBaseHandler.java

Lines changed: 0 additions & 4 deletions
This file was deleted.

gxawsserverless/src/test/java/com/genexus/cloud/aws/events/TestLambdaSQSHandler.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
import java.util.*;
1717

18-
1918
public class TestLambdaSQSHandler {
2019
private static String SIMPLE_HANDLER = "com.unittest.eventdriven.queue.handlesimpleuserqueueevent";
2120
private static String SIMPLE_RAW_HANDLER = "com.unittest.eventdriven.queue.handlesimplerawsqsevent";
Lines changed: 102 additions & 208 deletions
Original file line numberDiff line numberDiff line change
@@ -1,218 +1,112 @@
11
package com.genexus.genexusserverlessapi;
2+
23
import com.genexus.*;
34
import com.genexus.*;
45
import com.genexus.xml.*;
56
import com.genexus.search.*;
67
import com.genexus.webpanels.*;
8+
79
import java.util.*;
810

9-
public final class SdtEventCustomPayload_CustomPayloadItem extends GxUserType
10-
{
11-
public SdtEventCustomPayload_CustomPayloadItem( )
12-
{
13-
this( new ModelContext(SdtEventCustomPayload_CustomPayloadItem.class));
14-
}
15-
16-
public SdtEventCustomPayload_CustomPayloadItem( ModelContext context )
17-
{
18-
super( context, "SdtEventCustomPayload_CustomPayloadItem");
19-
}
20-
21-
public SdtEventCustomPayload_CustomPayloadItem( int remoteHandle ,
22-
ModelContext context )
23-
{
24-
super( remoteHandle, context, "SdtEventCustomPayload_CustomPayloadItem");
25-
}
26-
27-
public SdtEventCustomPayload_CustomPayloadItem( StructSdtEventCustomPayload_CustomPayloadItem struct )
28-
{
29-
this();
30-
setStruct(struct);
31-
}
32-
33-
private static java.util.HashMap mapper = new java.util.HashMap();
34-
static
35-
{
36-
}
37-
38-
public String getJsonMap( String value )
39-
{
40-
return (String) mapper.get(value);
41-
}
42-
43-
public short readxml( com.genexus.xml.XMLReader oReader ,
44-
String sName )
45-
{
46-
short GXSoapError = 1;
47-
formatError = false ;
48-
sTagName = oReader.getName() ;
49-
if ( oReader.getIsSimple() == 0 )
50-
{
51-
GXSoapError = oReader.read() ;
52-
nOutParmCount = (short)(0) ;
53-
while ( ( ( GXutil.strcmp(oReader.getName(), sTagName) != 0 ) || ( oReader.getNodeType() == 1 ) ) && ( GXSoapError > 0 ) )
54-
{
55-
readOk = (short)(0) ;
56-
readElement = false ;
57-
if ( GXutil.strcmp2( oReader.getLocalName(), "PropertyId") )
58-
{
59-
gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyid = oReader.getValue() ;
60-
readElement = true ;
61-
if ( GXSoapError > 0 )
62-
{
63-
readOk = (short)(1) ;
64-
}
65-
GXSoapError = oReader.read() ;
66-
}
67-
if ( GXutil.strcmp2( oReader.getLocalName(), "PropertyValue") )
68-
{
69-
gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyvalue = oReader.getValue() ;
70-
readElement = true ;
71-
if ( GXSoapError > 0 )
72-
{
73-
readOk = (short)(1) ;
74-
}
75-
GXSoapError = oReader.read() ;
76-
}
77-
if ( ! readElement )
78-
{
79-
readOk = (short)(1) ;
80-
GXSoapError = oReader.read() ;
81-
}
82-
nOutParmCount = (short)(nOutParmCount+1) ;
83-
if ( ( readOk == 0 ) || formatError )
84-
{
85-
context.globals.sSOAPErrMsg += "Error reading " + sTagName + GXutil.newLine( ) ;
86-
context.globals.sSOAPErrMsg += "Message: " + oReader.readRawXML() ;
87-
GXSoapError = (short)(nOutParmCount*-1) ;
88-
}
89-
}
90-
}
91-
return GXSoapError ;
92-
}
93-
94-
public void writexml( com.genexus.xml.XMLWriter oWriter ,
95-
String sName ,
96-
String sNameSpace )
97-
{
98-
writexml(oWriter, sName, sNameSpace, true);
99-
}
100-
101-
public void writexml( com.genexus.xml.XMLWriter oWriter ,
102-
String sName ,
103-
String sNameSpace ,
104-
boolean sIncludeState )
105-
{
106-
if ( (GXutil.strcmp("", sName)==0) )
107-
{
108-
sName = "EventCustomPayload.CustomPayloadItem" ;
109-
}
110-
oWriter.writeStartElement(sName);
111-
if ( GXutil.strcmp(GXutil.left( sNameSpace, 10), "[*:nosend]") != 0 )
112-
{
113-
oWriter.writeAttribute("xmlns", sNameSpace);
114-
}
115-
else
116-
{
117-
sNameSpace = GXutil.right( sNameSpace, GXutil.len( sNameSpace)-10) ;
118-
}
119-
oWriter.writeElement("PropertyId", gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyid);
120-
if ( GXutil.strcmp(sNameSpace, "ServerlessAPI") != 0 )
121-
{
122-
oWriter.writeAttribute("xmlns", "ServerlessAPI");
123-
}
124-
oWriter.writeElement("PropertyValue", gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyvalue);
125-
if ( GXutil.strcmp(sNameSpace, "ServerlessAPI") != 0 )
126-
{
127-
oWriter.writeAttribute("xmlns", "ServerlessAPI");
128-
}
129-
oWriter.writeEndElement();
130-
}
131-
132-
public void tojson( )
133-
{
134-
tojson( true) ;
135-
}
136-
137-
public void tojson( boolean includeState )
138-
{
139-
tojson( includeState, true) ;
140-
}
141-
142-
public void tojson( boolean includeState ,
143-
boolean includeNonInitialized )
144-
{
145-
AddObjectProperty("PropertyId", gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyid, false, false);
146-
AddObjectProperty("PropertyValue", gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyvalue, false, false);
147-
}
148-
149-
public String getgxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyid( )
150-
{
151-
return gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyid ;
152-
}
153-
154-
public void setgxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyid( String value )
155-
{
156-
gxTv_SdtEventCustomPayload_CustomPayloadItem_N = (byte)(0) ;
157-
gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyid = value ;
158-
}
159-
160-
public String getgxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyvalue( )
161-
{
162-
return gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyvalue ;
163-
}
164-
165-
public void setgxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyvalue( String value )
166-
{
167-
gxTv_SdtEventCustomPayload_CustomPayloadItem_N = (byte)(0) ;
168-
gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyvalue = value ;
169-
}
170-
171-
public void initialize( int remoteHandle )
172-
{
173-
initialize( ) ;
174-
}
175-
176-
public void initialize( )
177-
{
178-
gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyid = "" ;
179-
gxTv_SdtEventCustomPayload_CustomPayloadItem_N = (byte)(1) ;
180-
gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyvalue = "" ;
181-
sTagName = "" ;
182-
}
183-
184-
public byte isNull( )
185-
{
186-
return gxTv_SdtEventCustomPayload_CustomPayloadItem_N ;
187-
}
188-
189-
public com.genexus.genexusserverlessapi.SdtEventCustomPayload_CustomPayloadItem Clone( )
190-
{
191-
return (com.genexus.genexusserverlessapi.SdtEventCustomPayload_CustomPayloadItem)(clone()) ;
192-
}
193-
194-
public void setStruct( com.genexus.genexusserverlessapi.StructSdtEventCustomPayload_CustomPayloadItem struct )
195-
{
196-
setgxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyid(struct.getPropertyid());
197-
setgxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyvalue(struct.getPropertyvalue());
198-
}
199-
200-
@SuppressWarnings("unchecked")
201-
public com.genexus.genexusserverlessapi.StructSdtEventCustomPayload_CustomPayloadItem getStruct( )
202-
{
203-
com.genexus.genexusserverlessapi.StructSdtEventCustomPayload_CustomPayloadItem struct = new com.genexus.genexusserverlessapi.StructSdtEventCustomPayload_CustomPayloadItem ();
204-
struct.setPropertyid(getgxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyid());
205-
struct.setPropertyvalue(getgxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyvalue());
206-
return struct ;
207-
}
208-
209-
protected byte gxTv_SdtEventCustomPayload_CustomPayloadItem_N ;
210-
protected short readOk ;
211-
protected short nOutParmCount ;
212-
protected String gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyvalue ;
213-
protected String sTagName ;
214-
protected boolean readElement ;
215-
protected boolean formatError ;
216-
protected String gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyid ;
11+
public final class SdtEventCustomPayload_CustomPayloadItem extends GxUserType {
12+
public SdtEventCustomPayload_CustomPayloadItem() {
13+
this(new ModelContext(SdtEventCustomPayload_CustomPayloadItem.class));
14+
}
15+
16+
public SdtEventCustomPayload_CustomPayloadItem(ModelContext context) {
17+
super(context, "SdtEventCustomPayload_CustomPayloadItem");
18+
}
19+
20+
public SdtEventCustomPayload_CustomPayloadItem(int remoteHandle,
21+
ModelContext context) {
22+
super(remoteHandle, context, "SdtEventCustomPayload_CustomPayloadItem");
23+
}
24+
25+
public SdtEventCustomPayload_CustomPayloadItem(StructSdtEventCustomPayload_CustomPayloadItem struct) {
26+
this();
27+
setStruct(struct);
28+
}
29+
30+
private static java.util.HashMap mapper = new java.util.HashMap();
31+
32+
static {
33+
}
34+
35+
public String getJsonMap(String value) {
36+
return (String) mapper.get(value);
37+
}
38+
39+
public void tojson() {
40+
tojson(true);
41+
}
42+
43+
public void tojson(boolean includeState) {
44+
tojson(includeState, true);
45+
}
46+
47+
public void tojson(boolean includeState,
48+
boolean includeNonInitialized) {
49+
AddObjectProperty("PropertyId", gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyid, false, false);
50+
AddObjectProperty("PropertyValue", gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyvalue, false, false);
51+
}
52+
53+
public String getgxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyid() {
54+
return gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyid;
55+
}
56+
57+
public void setgxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyid(String value) {
58+
gxTv_SdtEventCustomPayload_CustomPayloadItem_N = (byte) (0);
59+
gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyid = value;
60+
}
61+
62+
public String getgxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyvalue() {
63+
return gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyvalue;
64+
}
65+
66+
public void setgxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyvalue(String value) {
67+
gxTv_SdtEventCustomPayload_CustomPayloadItem_N = (byte) (0);
68+
gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyvalue = value;
69+
}
70+
71+
public void initialize(int remoteHandle) {
72+
initialize();
73+
}
74+
75+
public void initialize() {
76+
gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyid = "";
77+
gxTv_SdtEventCustomPayload_CustomPayloadItem_N = (byte) (1);
78+
gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyvalue = "";
79+
sTagName = "";
80+
}
81+
82+
public byte isNull() {
83+
return gxTv_SdtEventCustomPayload_CustomPayloadItem_N;
84+
}
85+
86+
public com.genexus.genexusserverlessapi.SdtEventCustomPayload_CustomPayloadItem Clone() {
87+
return (com.genexus.genexusserverlessapi.SdtEventCustomPayload_CustomPayloadItem) (clone());
88+
}
89+
90+
public void setStruct(com.genexus.genexusserverlessapi.StructSdtEventCustomPayload_CustomPayloadItem struct) {
91+
setgxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyid(struct.getPropertyid());
92+
setgxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyvalue(struct.getPropertyvalue());
93+
}
94+
95+
@SuppressWarnings("unchecked")
96+
public com.genexus.genexusserverlessapi.StructSdtEventCustomPayload_CustomPayloadItem getStruct() {
97+
com.genexus.genexusserverlessapi.StructSdtEventCustomPayload_CustomPayloadItem struct = new com.genexus.genexusserverlessapi.StructSdtEventCustomPayload_CustomPayloadItem();
98+
struct.setPropertyid(getgxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyid());
99+
struct.setPropertyvalue(getgxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyvalue());
100+
return struct;
101+
}
102+
103+
protected byte gxTv_SdtEventCustomPayload_CustomPayloadItem_N;
104+
protected short readOk;
105+
protected short nOutParmCount;
106+
protected String gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyvalue;
107+
protected String sTagName;
108+
protected boolean readElement;
109+
protected boolean formatError;
110+
protected String gxTv_SdtEventCustomPayload_CustomPayloadItem_Propertyid;
217111
}
218112

0 commit comments

Comments
 (0)