Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/example/micronaut/HelloController.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ public class HelloController {

public static final String aa = "1212";

@Get // <2>
@Get
@Produces(MediaType.TEXT_PLAIN)
public String index() {

// response
return "Hello World";
return "Hello World 123";
}
}
88 changes: 88 additions & 0 deletions src/main/java/example/micronaut/Service.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
package example.micronaut;


import java.util.*;
import example.micronaut.EndpointsController;

public class Service {


public static final String TOKEN = "7cd874b1-6242-4186-a5e3-dbf767595434";

public String mi_token = "Mi password super secreto";

public static final String passowrd = "Mi password super secreto";

public void METODO(){
String A = "";
String b = "123";
String c = "";
String z = A + b;


int zero = 0;
int a = 123;
var b = a / zero;
}

public void calculo(){

int zero = 0;
int a = 123;
var b = a / zero;

System.out.println("tirar los logs a sys out no es muy bueno" + b);
}


//@SuppressWarnings("java:S106")
public void otroMetodo() {
System.out.println("tirar los logs a sys out no es muy bueno");

}

//@SuppressWarnings("java:S106")
public void loop() {
int x = 100;
for (int i = 0; i < x; i++) {
System.out.println("loop");
x = i + 2;
}

}


public boolean ifAnidados() {
int zero = 0;
int a = 123;

if (a > 1) {
if (a > 2 ) {
if (a > 3 ) {
if (a > 4 ) {
if (a > 5 ) {
if (a > 6 ) {
if (a > 7 ) {
if (a > 8 ) {
if (a > 9 ) {
return true;
}
}
}
}
}
}
}
}
}
return false;
}


/*
public void codigoComentado() {
System.out.println("tirar los logs a sys out no es muy bueno");

}
*/
}
51 changes: 51 additions & 0 deletions src/main/java/example/micronaut/ServiceB.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package example.micronaut;

public class ServiceB {

public void METODO(){
String A = "";
String b = "123";
String c = "";
String z = A + b;


int zero = 0;
int a = 123;
var b = a / zero;
}

public void calculo(){

int zero = 0;
int a = 123;
var b = a / zero;

System.out.println("tirar los logs a sys out no es muy bueno" + b);
}


//@SuppressWarnings("java:S106")
public void otroMetodo() {
System.out.println("tirar los logs a sys out no es muy bueno");

}

//@SuppressWarnings("java:S106")
public void loop() {
int x = 100;
for (int i = 0; i < x; i++) {
System.out.println("loop");
x = i + 2;
}

}



/*
public void codigoComentado() {
System.out.println("tirar los logs a sys out no es muy bueno");

}
*/
}
51 changes: 51 additions & 0 deletions src/main/java/example/micronaut/ServiceC.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package example.micronaut;

public class ServiceC {

public void METODO(){
String A = "";
String b = "123";
String c = "";
String z = A + b;


int zero = 0;
int a = 123;
var b = a / zero;
}

public void calculo(){

int zero = 0;
int a = 123;
var b = a / zero;

System.out.println("tirar los logs a sys out no es muy bueno" + b);
}


//@SuppressWarnings("java:S106")
public void otroMetodo() {
System.out.println("tirar los logs a sys out no es muy bueno");

}

//@SuppressWarnings("java:S106")
public void loop() {
int x = 100;
for (int i = 0; i < x; i++) {
System.out.println("loop");
x = i + 2;
}

}



/*
public void codigoComentado() {
System.out.println("tirar los logs a sys out no es muy bueno");

}
*/
}
2 changes: 1 addition & 1 deletion src/test/java/example/micronaut/HelloControllerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ public void testHello() {
String body = client.toBlocking().retrieve(request);

assertNotNull(body);
assertEquals("Hello World", body);
assertEquals("Hello World 123", body);
}
}
Loading