profile
viewpoint
JHipster jhipster Worldwide https://www.jhipster.tech/ An Open Source application platform for creating Spring Boot + Angular/React projects in seconds!

pull request commentjhipster/prettier-java

Sort modifiers

Glad I could help a tiny bit with this awesome project 😄

jhaber

comment created time in 11 minutes

created tagjhipster/prettier-java

tagv0.5.0

Prettier Java Plugin

created time in 29 minutes

release jhipster/prettier-java

v0.5.0

released time in 29 minutes

push eventjhipster/prettier-java

Clement Dessoude

commit sha 1502d8a1df4807911b57d0524a1018b7b3aa9916

update CHANGELOG.md

view details

Clement Dessoude

commit sha 20466d6edf6e0ef459c467961f342dc28fc7eccd

v0.5.0

view details

push time in 32 minutes

PR merged jhipster/prettier-java

0.5.0 release
+47 -9

0 comment

5 changed files

clementdessoude

pr closed time in 32 minutes

PR opened jhipster/prettier-java

0.5.0 release
+47 -9

0 comment

5 changed files

pr created time in 32 minutes

issue openedjhipster/prettier-java

Enums end up on the same line squashing git diffs and changing formatting as values are added

Similar to https://github.com/jhipster/prettier-java/issues/264 and https://github.com/jhipster/prettier-java/issues/313

Enums will get collapsed onto a single line, and then later as more are added, spread back to a single line per enum. Eg. if I have

enum ChangeType { 
  MIGRATION,
  CREATED,
}

Initially this will get turned into:

enum ChangeType { 
  MIGRATION, CREATED,
}

But later if I add more values over time, at some point it will get turned back into something like

enum ChangeType { 
  MIGRATION,
  CREATED,
  MORE,
  ENUM,
  VALUES,
  OVER,
  TIME,
  AS,
  THIS,
  GROWS,
}

This means that all the VCS history for why those enum values were added linewise is lost over time, but if we had just maintained the one-per-line formatting over time this would not be an issue, and the formatting would remain consistent as values are added.

Are there strong arguments against having enums always be one-per-line? IMO it helps with VCS history and provides a more consistent format everywhere enums are used.

created time in 34 minutes

issue openedjhipster/prettier-java

Enum trailing commas get included on the same line as the semicolon ending the line

Enums that get split across multiple lines can lead to the last enum in the series having a , ; on the last line. If a , is specified after the last enum value that should be used as an indicator to create another newline and to place the ; on that newline, or the , should be dropped entirely and it should just become a ; after the last enum value.

I could see arguments for either option, but I'd prefer placing the ; on a newline as this preserves version control history for the line with the previous enum value when a new value is eventually added.

Input:

enum MyEnum {
  AAAAAAAA("aaaaaa"),
  BBBBBBBBBBB("bbbbbbbbbb"),
  CCCCCCCCCC("ccccccccc"),
  DDDDDDDDD("ddddddddddddddddddddddddd"),
  EEEEEEE("eeeeeeeeee"), 
  ;
}

Output:

enum MyEnum {
  AAAAAAAA("aaaaaa"),
  BBBBBBBBBBB("bbbbbbbbbb"),
  CCCCCCCCCC("ccccccccc"),
  DDDDDDDDD("ddddddddddddddddddddddddd"),
  EEEEEEE("eeeeeeeeee"), ;
}

Expected Output:

enum MyEnum {
  AAAAAAAA("aaaaaa"),
  BBBBBBBBBBB("bbbbbbbbbb"),
  CCCCCCCCCC("ccccccccc"),
  DDDDDDDDD("ddddddddddddddddddddddddd"),
  EEEEEEE("eeeeeeeeee"),
  ;
}

created time in an hour

issue closedjhipster/prettier-java

Enforce modifier order

I think it would be in-scope for prettier-java to rewrite class, field, and method modifiers to match the order specified in the Java Language Specification. Here's the order that checkstyle uses: https://checkstyle.sourceforge.io/config_modifier.html#ModifierOrder

I was testing with this code:

public class Test {

  static public void main(String... args) {}
}

So the desired output would be:

public class Test {

  public static void main(String... args) {}
}

closed time in an hour

jhaber

issue commentjhipster/prettier-java

Enforce modifier order

Closed with #302

jhaber

comment created time in an hour

Pull request review commentjhipster/generator-jhipster

Refactor Kafka generated code

 -%> package <%= packageName %>.web.rest; -import <%= packageName %>.<%= mainClass %>;-<%_ if (cacheProvider === 'redis') { _%>-import <%=packageName%>.RedisTestContainerExtension;-<%_ } _%>-<%_ if (authenticationType === 'uaa') { _%>-import <%=packageName%>.config.SecurityBeanOverrideConfiguration;-<%_ } _%>-<%_ if (authenticationType === 'oauth2') { _%>-import <%=packageName%>.config.TestSecurityConfiguration;-<%_ } _%>-import <%= packageName %>.service.<%= upperFirstCamelCase(baseName) %>KafkaProducer;-import <%= packageName %>.service.<%= upperFirstCamelCase(baseName) %>KafkaConsumer;-import org.apache.kafka.common.Metric;-import org.apache.kafka.common.MetricName;-import org.assertj.core.api.Assertions;+import <%= packageName %>.config.KafkaProperties;+import <%= packageName %>.web.rest.<%= upperFirstCamelCase(baseName) %>KafkaResource.SafeKafkaConsumer;+import org.apache.kafka.clients.consumer.ConsumerRecord;+import org.apache.kafka.clients.consumer.ConsumerRecords;+import org.apache.kafka.clients.consumer.KafkaConsumer;+import org.apache.kafka.clients.producer.KafkaProducer;+import org.apache.kafka.clients.producer.ProducerRecord; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test;-<%_ if (cacheProvider === 'redis') { _%>-import org.junit.jupiter.api.extension.ExtendWith;-<%_ } _%>-import org.springframework.beans.factory.annotation.Autowired;-import org.springframework.boot.test.context.SpringBootTest;-import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders;+import org.springframework.util.ReflectionUtils; import org.testcontainers.containers.KafkaContainer; +import java.lang.reflect.Field;+import java.time.Duration;+import java.util.Collections;+import java.util.HashMap; import java.util.Map;+import java.util.Set; +import static org.assertj.core.api.Assertions.assertThat;+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -<%_ if (authenticationType === 'oauth2') { _%>-@SpringBootTest(classes = {<%= mainClass %>.class, TestSecurityConfiguration.class})-<%_ } else if (authenticationType === 'uaa' && applicationType !== 'uaa') { _%>-@SpringBootTest(classes = {SecurityBeanOverrideConfiguration.class, <%= mainClass %>.class})-<%_ } else { _%>-@SpringBootTest(classes = <%= mainClass %>.class)-<%_ } _%>-@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)-<%_ if (cacheProvider === 'redis') { _%>-@ExtendWith(RedisTestContainerExtension.class)-<%_ } _%>-public class <%= upperFirstCamelCase(baseName) %>KafkaResourceIT {--    private MockMvc restMockMvc;+class <%= upperFirstCamelCase(baseName) %>KafkaResourceIT {

About whether it's a UT or IT, that's a good question. It doesn't spawn the Spring context but it spawns a real Kafka with testcontainer.

cbornet

comment created time in an hour

Pull request review commentjhipster/generator-jhipster

Refactor Kafka generated code

 -%> package <%= packageName %>.web.rest; -import <%= packageName %>.<%= mainClass %>;-<%_ if (cacheProvider === 'redis') { _%>-import <%=packageName%>.RedisTestContainerExtension;-<%_ } _%>-<%_ if (authenticationType === 'uaa') { _%>-import <%=packageName%>.config.SecurityBeanOverrideConfiguration;-<%_ } _%>-<%_ if (authenticationType === 'oauth2') { _%>-import <%=packageName%>.config.TestSecurityConfiguration;-<%_ } _%>-import <%= packageName %>.service.<%= upperFirstCamelCase(baseName) %>KafkaProducer;-import <%= packageName %>.service.<%= upperFirstCamelCase(baseName) %>KafkaConsumer;-import org.apache.kafka.common.Metric;-import org.apache.kafka.common.MetricName;-import org.assertj.core.api.Assertions;+import <%= packageName %>.config.KafkaProperties;+import <%= packageName %>.web.rest.<%= upperFirstCamelCase(baseName) %>KafkaResource.SafeKafkaConsumer;+import org.apache.kafka.clients.consumer.ConsumerRecord;+import org.apache.kafka.clients.consumer.ConsumerRecords;+import org.apache.kafka.clients.consumer.KafkaConsumer;+import org.apache.kafka.clients.producer.KafkaProducer;+import org.apache.kafka.clients.producer.ProducerRecord; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test;-<%_ if (cacheProvider === 'redis') { _%>-import org.junit.jupiter.api.extension.ExtendWith;-<%_ } _%>-import org.springframework.beans.factory.annotation.Autowired;-import org.springframework.boot.test.context.SpringBootTest;-import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders;+import org.springframework.util.ReflectionUtils; import org.testcontainers.containers.KafkaContainer; +import java.lang.reflect.Field;+import java.time.Duration;+import java.util.Collections;+import java.util.HashMap; import java.util.Map;+import java.util.Set; +import static org.assertj.core.api.Assertions.assertThat;+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -<%_ if (authenticationType === 'oauth2') { _%>-@SpringBootTest(classes = {<%= mainClass %>.class, TestSecurityConfiguration.class})-<%_ } else if (authenticationType === 'uaa' && applicationType !== 'uaa') { _%>-@SpringBootTest(classes = {SecurityBeanOverrideConfiguration.class, <%= mainClass %>.class})-<%_ } else { _%>-@SpringBootTest(classes = <%= mainClass %>.class)-<%_ } _%>-@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)-<%_ if (cacheProvider === 'redis') { _%>-@ExtendWith(RedisTestContainerExtension.class)-<%_ } _%>-public class <%= upperFirstCamelCase(baseName) %>KafkaResourceIT {--    private MockMvc restMockMvc;+class <%= upperFirstCamelCase(baseName) %>KafkaResourceIT {

to be consistent with our other class, but it's fine for me here

cbornet

comment created time in an hour

Pull request review commentjhipster/generator-jhipster

Refactor Kafka generated code

 -%> package <%= packageName %>.web.rest; -import <%= packageName %>.<%= mainClass %>;-<%_ if (cacheProvider === 'redis') { _%>-import <%=packageName%>.RedisTestContainerExtension;-<%_ } _%>-<%_ if (authenticationType === 'uaa') { _%>-import <%=packageName%>.config.SecurityBeanOverrideConfiguration;-<%_ } _%>-<%_ if (authenticationType === 'oauth2') { _%>-import <%=packageName%>.config.TestSecurityConfiguration;-<%_ } _%>-import <%= packageName %>.service.<%= upperFirstCamelCase(baseName) %>KafkaProducer;-import <%= packageName %>.service.<%= upperFirstCamelCase(baseName) %>KafkaConsumer;-import org.apache.kafka.common.Metric;-import org.apache.kafka.common.MetricName;-import org.assertj.core.api.Assertions;+import <%= packageName %>.config.KafkaProperties;+import <%= packageName %>.web.rest.<%= upperFirstCamelCase(baseName) %>KafkaResource.SafeKafkaConsumer;+import org.apache.kafka.clients.consumer.ConsumerRecord;+import org.apache.kafka.clients.consumer.ConsumerRecords;+import org.apache.kafka.clients.consumer.KafkaConsumer;+import org.apache.kafka.clients.producer.KafkaProducer;+import org.apache.kafka.clients.producer.ProducerRecord; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test;-<%_ if (cacheProvider === 'redis') { _%>-import org.junit.jupiter.api.extension.ExtendWith;-<%_ } _%>-import org.springframework.beans.factory.annotation.Autowired;-import org.springframework.boot.test.context.SpringBootTest;-import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders;+import org.springframework.util.ReflectionUtils; import org.testcontainers.containers.KafkaContainer; +import java.lang.reflect.Field;+import java.time.Duration;+import java.util.Collections;+import java.util.HashMap; import java.util.Map;+import java.util.Set; +import static org.assertj.core.api.Assertions.assertThat;+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -<%_ if (authenticationType === 'oauth2') { _%>-@SpringBootTest(classes = {<%= mainClass %>.class, TestSecurityConfiguration.class})-<%_ } else if (authenticationType === 'uaa' && applicationType !== 'uaa') { _%>-@SpringBootTest(classes = {SecurityBeanOverrideConfiguration.class, <%= mainClass %>.class})-<%_ } else { _%>-@SpringBootTest(classes = <%= mainClass %>.class)-<%_ } _%>-@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)-<%_ if (cacheProvider === 'redis') { _%>-@ExtendWith(RedisTestContainerExtension.class)-<%_ } _%>-public class <%= upperFirstCamelCase(baseName) %>KafkaResourceIT {--    private MockMvc restMockMvc;+class <%= upperFirstCamelCase(baseName) %>KafkaResourceIT {

Why should it be public ? It was a proposition by IDEA to remove the public

cbornet

comment created time in an hour

pull request commentjhipster/prettier-java

Sort modifiers

Thank you again @jhaber !

jhaber

comment created time in an hour

push eventjhipster/prettier-java

Jonathan Haber

commit sha 0767022f20e99dffdaf957192d84b161422dafbf

Sort modifiers (#302) * Sort modifiers * Fix formatting * Handle annotations * Add annotations to test * Add docs on modifier sorting * Fix example * Special-case method annotations * Add more tests, update documentation * Update output to match new formatting * Update example * Include ellipsis to maintain formatting

view details

push time in an hour

PR merged jhipster/prettier-java

Sort modifiers

Related to #291

I had some trouble getting access to the actual modifier name ("public", "static", "private", etc.) and I don't write much javascript so any feedback on the code is welcome.

There is an existing sortModifiers function that everything goes through, however it seems to just separate leading annotations from all other annotations/modifiers. I tried to preserve the behavior of this function, however it conflicts a bit with the new modifier sorting behavior.

For example, if you have this code: final @Annotation private String field;

Currently, prettier-java leaves this code alone. However, we want to swap the order of the final and private modifiers, but it's not clear what should happen to @Annotation when we do this. As currently written, this PR moves all such annotations to the end, and would output: private final @Annotation String field;

Some other options that come to mind:

  • unconditionally move annotations ahead of modifiers, which means you can't write a method signature like public @Nullable String myMethod()
  • move annotations to the front unless they come after all modifiers, which still allows method signatures like public @Nullable String myMethod()
+281 -10

8 comments

6 changed files

jhaber

pr closed time in an hour

pull request commentjhipster/generator-jhipster

Refactor Kafka generated code

Just tested your last change to 10000 and it works well Good job @cbornet. Added some minor comments

cbornet

comment created time in 2 hours

Pull request review commentjhipster/generator-jhipster

Refactor Kafka generated code

 -%> package <%= packageName %>.web.rest; -import <%= packageName %>.<%= mainClass %>;-<%_ if (cacheProvider === 'redis') { _%>-import <%=packageName%>.RedisTestContainerExtension;-<%_ } _%>-<%_ if (authenticationType === 'uaa') { _%>-import <%=packageName%>.config.SecurityBeanOverrideConfiguration;-<%_ } _%>-<%_ if (authenticationType === 'oauth2') { _%>-import <%=packageName%>.config.TestSecurityConfiguration;-<%_ } _%>-import <%= packageName %>.service.<%= upperFirstCamelCase(baseName) %>KafkaProducer;-import <%= packageName %>.service.<%= upperFirstCamelCase(baseName) %>KafkaConsumer;-import org.apache.kafka.common.Metric;-import org.apache.kafka.common.MetricName;-import org.assertj.core.api.Assertions;+import <%= packageName %>.config.KafkaProperties;+import <%= packageName %>.web.rest.<%= upperFirstCamelCase(baseName) %>KafkaResource.SafeKafkaConsumer;+import org.apache.kafka.clients.consumer.ConsumerRecord;+import org.apache.kafka.clients.consumer.ConsumerRecords;+import org.apache.kafka.clients.consumer.KafkaConsumer;+import org.apache.kafka.clients.producer.KafkaProducer;+import org.apache.kafka.clients.producer.ProducerRecord; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test;-<%_ if (cacheProvider === 'redis') { _%>-import org.junit.jupiter.api.extension.ExtendWith;-<%_ } _%>-import org.springframework.beans.factory.annotation.Autowired;-import org.springframework.boot.test.context.SpringBootTest;-import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders;+import org.springframework.util.ReflectionUtils; import org.testcontainers.containers.KafkaContainer; +import java.lang.reflect.Field;+import java.time.Duration;+import java.util.Collections;+import java.util.HashMap; import java.util.Map;+import java.util.Set; +import static org.assertj.core.api.Assertions.assertThat;+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -<%_ if (authenticationType === 'oauth2') { _%>-@SpringBootTest(classes = {<%= mainClass %>.class, TestSecurityConfiguration.class})-<%_ } else if (authenticationType === 'uaa' && applicationType !== 'uaa') { _%>-@SpringBootTest(classes = {SecurityBeanOverrideConfiguration.class, <%= mainClass %>.class})-<%_ } else { _%>-@SpringBootTest(classes = <%= mainClass %>.class)-<%_ } _%>-@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)-<%_ if (cacheProvider === 'redis') { _%>-@ExtendWith(RedisTestContainerExtension.class)-<%_ } _%>-public class <%= upperFirstCamelCase(baseName) %>KafkaResourceIT {--    private MockMvc restMockMvc;+class <%= upperFirstCamelCase(baseName) %>KafkaResourceIT {
  • can we add public class ?
  • then, is it a real IT test ? Otherwise, maybe Test instead
cbornet

comment created time in 2 hours

Pull request review commentjhipster/generator-jhipster

Refactor Kafka generated code

 public class <%= upperFirstCamelCase(baseName) %>KafkaResourceIT {     private static void startTestcontainer() {         kafkaContainer = new KafkaContainer("<%= KAFKA_VERSION %>");         kafkaContainer.start();-        System.setProperty("kafkaBootstrapServers", kafkaContainer.getBootstrapServers());     }      @BeforeEach-    public void setup() {-        <%= upperFirstCamelCase(baseName) %>KafkaResource kafkaResource = new <%= upperFirstCamelCase(baseName) %>KafkaResource(producer);+    void setup() {+        KafkaProperties kafkaProperties = new KafkaProperties();+        Map<String, String> producerProps = getProducerProps();+        kafkaProperties.setProducer(new HashMap<>(producerProps));++        Map<String, String> consumerProps = getConsumerProps("default-group");+        consumerProps.put("client.id", "default-client");+        kafkaProperties.setConsumer(consumerProps);++        kafkaResource = new <%= upperFirstCamelCase(baseName) %>KafkaResource(kafkaProperties); -        this.restMockMvc = MockMvcBuilders.standaloneSetup(kafkaResource)+        restMockMvc = MockMvcBuilders.standaloneSetup(kafkaResource)             .build();+    }++    @Test+    void producesMessages() throws Exception {+        restMockMvc.perform(post("/api/<%= dasherizedBaseName %>-kafka/publish/topic-produce?message=value-produce"))+            .andExpect(status().isOk());++        Map<String, Object> consumerProps = new HashMap<>(getConsumerProps("group-produce"));+        KafkaConsumer<String, String> consumer = new KafkaConsumer<>(consumerProps);+        consumer.subscribe(Collections.singletonList("topic-produce"));+        ConsumerRecords<String, String> records = consumer.poll(Duration.ofSeconds(1)); -        producer.init();-        consumer.start();+        assertThat(records.count()).isEqualTo(1);+        ConsumerRecord<String, String> record = records.iterator().next();+        assertThat(record.value()).isEqualTo("value-produce");     }      @Test-    public void producedMessageHasBeenConsumed() throws Exception {-        restMockMvc.perform(post("/api/<%= dasherizedBaseName %>-kafka/publish?message=test"))+    void createsConsumer() throws Exception {+        restMockMvc.perform(post("/api/<%= dasherizedBaseName %>-kafka/consumers?name=consumer-create&topic=topic-create&topic=topic-create2&group.id=group-create"))             .andExpect(status().isOk()); -        Map<MetricName, ? extends Metric> metrics = consumer.getKafkaConsumer().metrics();+        Field consumersField = ReflectionUtils.findField(<%= upperFirstCamelCase(baseName) %>KafkaResource.class, "consumers");+        ReflectionUtils.makeAccessible(consumersField);+        Map<String, SafeKafkaConsumer> consumers = (Map<String, SafeKafkaConsumer>)consumersField.get(kafkaResource);+        assertThat(consumers).containsKey("consumer-create");+        SafeKafkaConsumer consumer = consumers.get("consumer-create");+        Field clientField = ReflectionUtils.findField(KafkaConsumer.class, "clientId");+        ReflectionUtils.makeAccessible(clientField);+        String client = (String)clientField.get(consumer);+        assertThat(client).isEqualTo("default-client");+        Field groupField = ReflectionUtils.findField(KafkaConsumer.class, "groupId");+        ReflectionUtils.makeAccessible(groupField);+        String group = (String)groupField.get(consumer);+        assertThat(group).isEqualTo("group-create");+        Set<String> subscription = consumer.subscription();+        assertThat(subscription).containsExactlyInAnyOrder("topic-create", "topic-create2");+    }++    @Test+    void consumesMessages() throws Exception {

public ?

cbornet

comment created time in 2 hours

Pull request review commentjhipster/generator-jhipster

Refactor Kafka generated code

 public class <%= upperFirstCamelCase(baseName) %>KafkaResourceIT {     private static void startTestcontainer() {         kafkaContainer = new KafkaContainer("<%= KAFKA_VERSION %>");         kafkaContainer.start();-        System.setProperty("kafkaBootstrapServers", kafkaContainer.getBootstrapServers());     }      @BeforeEach-    public void setup() {-        <%= upperFirstCamelCase(baseName) %>KafkaResource kafkaResource = new <%= upperFirstCamelCase(baseName) %>KafkaResource(producer);+    void setup() {+        KafkaProperties kafkaProperties = new KafkaProperties();+        Map<String, String> producerProps = getProducerProps();+        kafkaProperties.setProducer(new HashMap<>(producerProps));++        Map<String, String> consumerProps = getConsumerProps("default-group");+        consumerProps.put("client.id", "default-client");+        kafkaProperties.setConsumer(consumerProps);++        kafkaResource = new <%= upperFirstCamelCase(baseName) %>KafkaResource(kafkaProperties); -        this.restMockMvc = MockMvcBuilders.standaloneSetup(kafkaResource)+        restMockMvc = MockMvcBuilders.standaloneSetup(kafkaResource)             .build();+    }++    @Test+    void producesMessages() throws Exception {

public ?

cbornet

comment created time in 2 hours

Pull request review commentjhipster/generator-jhipster

Refactor Kafka generated code

 public class <%= upperFirstCamelCase(baseName) %>KafkaResourceIT {     private static void startTestcontainer() {         kafkaContainer = new KafkaContainer("<%= KAFKA_VERSION %>");         kafkaContainer.start();-        System.setProperty("kafkaBootstrapServers", kafkaContainer.getBootstrapServers());     }      @BeforeEach-    public void setup() {-        <%= upperFirstCamelCase(baseName) %>KafkaResource kafkaResource = new <%= upperFirstCamelCase(baseName) %>KafkaResource(producer);+    void setup() {

public ?

cbornet

comment created time in 2 hours

Pull request review commentjhipster/generator-jhipster

Refactor Kafka generated code

 -%> package <%= packageName %>.web.rest; -import <%= packageName %>.<%= mainClass %>;-<%_ if (cacheProvider === 'redis') { _%>-import <%=packageName%>.RedisTestContainerExtension;-<%_ } _%>-<%_ if (authenticationType === 'uaa') { _%>-import <%=packageName%>.config.SecurityBeanOverrideConfiguration;-<%_ } _%>-<%_ if (authenticationType === 'oauth2') { _%>-import <%=packageName%>.config.TestSecurityConfiguration;-<%_ } _%>-import <%= packageName %>.service.<%= upperFirstCamelCase(baseName) %>KafkaProducer;-import <%= packageName %>.service.<%= upperFirstCamelCase(baseName) %>KafkaConsumer;-import org.apache.kafka.common.Metric;-import org.apache.kafka.common.MetricName;-import org.assertj.core.api.Assertions;+import <%= packageName %>.config.KafkaProperties;+import <%= packageName %>.web.rest.<%= upperFirstCamelCase(baseName) %>KafkaResource.SafeKafkaConsumer;+import org.apache.kafka.clients.consumer.ConsumerRecord;+import org.apache.kafka.clients.consumer.ConsumerRecords;+import org.apache.kafka.clients.consumer.KafkaConsumer;+import org.apache.kafka.clients.producer.KafkaProducer;+import org.apache.kafka.clients.producer.ProducerRecord; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test;-<%_ if (cacheProvider === 'redis') { _%>-import org.junit.jupiter.api.extension.ExtendWith;-<%_ } _%>-import org.springframework.beans.factory.annotation.Autowired;-import org.springframework.boot.test.context.SpringBootTest;-import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders;+import org.springframework.util.ReflectionUtils; import org.testcontainers.containers.KafkaContainer; +import java.lang.reflect.Field;+import java.time.Duration;+import java.util.Collections;+import java.util.HashMap; import java.util.Map;+import java.util.Set; +import static org.assertj.core.api.Assertions.assertThat;+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -<%_ if (authenticationType === 'oauth2') { _%>-@SpringBootTest(classes = {<%= mainClass %>.class, TestSecurityConfiguration.class})-<%_ } else if (authenticationType === 'uaa' && applicationType !== 'uaa') { _%>-@SpringBootTest(classes = {SecurityBeanOverrideConfiguration.class, <%= mainClass %>.class})-<%_ } else { _%>-@SpringBootTest(classes = <%= mainClass %>.class)-<%_ } _%>-@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)-<%_ if (cacheProvider === 'redis') { _%>-@ExtendWith(RedisTestContainerExtension.class)-<%_ } _%>-public class <%= upperFirstCamelCase(baseName) %>KafkaResourceIT {--    private MockMvc restMockMvc;+class <%= upperFirstCamelCase(baseName) %>KafkaResourceIT {      private static boolean started = false;-     private static KafkaContainer kafkaContainer; -    @Autowired-    private <%= upperFirstCamelCase(baseName) %>KafkaProducer producer;--    @Autowired-    private <%= upperFirstCamelCase(baseName) %>KafkaConsumer consumer;--    private static final int MAX_ATTEMPT = 5;+    private <%= upperFirstCamelCase(baseName) %>KafkaResource kafkaResource;+    private MockMvc restMockMvc;      @BeforeAll-    public static void startServer() {+    static void startServer() {

public ?

cbornet

comment created time in 2 hours

Pull request review commentjhipster/generator-jhipster

Refactor Kafka generated code

  See the License for the specific language governing permissions and  limitations under the License. -%>-package <%=packageName%>.web.rest;+package <%= packageName %>.web.rest; -import <%= packageName %>.service.<%= upperFirstCamelCase(baseName) %>KafkaProducer;+import <%= packageName %>.config.KafkaProperties;+import org.apache.kafka.clients.consumer.ConsumerRecords;+import org.apache.kafka.clients.consumer.KafkaConsumer;+import org.apache.kafka.clients.producer.KafkaProducer;+import org.apache.kafka.clients.producer.ProducerRecord;+import org.apache.kafka.clients.producer.RecordMetadata;+import org.apache.kafka.common.errors.WakeupException; import org.slf4j.Logger; import org.slf4j.LoggerFactory;-import org.springframework.web.bind.annotation.PostMapping;-import org.springframework.web.bind.annotation.RequestMapping;-import org.springframework.web.bind.annotation.RequestParam;-import org.springframework.web.bind.annotation.RestController;+import org.springframework.http.HttpStatus;+import org.springframework.web.bind.annotation.*;+import org.springframework.web.server.ResponseStatusException;++import java.time.Duration;+import java.time.Instant;+import java.util.*;+import java.util.concurrent.ConcurrentHashMap;+import java.util.concurrent.ExecutionException;  @RestController @RequestMapping("/api/<%= dasherizedBaseName %>-kafka") public class <%= upperFirstCamelCase(baseName) %>KafkaResource {      private final Logger log = LoggerFactory.getLogger(<%= upperFirstCamelCase(baseName) %>KafkaResource.class); -    private <%= upperFirstCamelCase(baseName) %>KafkaProducer kafkaProducer;+    private final KafkaProperties kafkaProperties;+    private KafkaProducer<String, String> producer;+    private Map<String, SafeKafkaConsumer> consumers = new ConcurrentHashMap<>();++    public <%= upperFirstCamelCase(baseName) %>KafkaResource(KafkaProperties kafkaProperties) {+        this.kafkaProperties = kafkaProperties;+        this.producer = new KafkaProducer<>(kafkaProperties.getProducerProps());+    }++    @PostMapping(value = "/publish/{topic}")+    public PublishResult publish(@PathVariable String topic, @RequestParam String message, @RequestParam(required = false) String key) throws ExecutionException, InterruptedException {+        log.debug("REST request to send to Kafka topic {} with key {} the message : {}", topic, key, message);+        RecordMetadata metadata = producer.send(new ProducerRecord<>(topic, key, message)).get();+        return new PublishResult(metadata.topic(), metadata.partition(), metadata.offset(), Instant.ofEpochMilli(metadata.timestamp()));+    }++    @PostMapping("/consumers")+    public void createConsumer(@RequestParam String name, @RequestParam("topic") List<String> topics, @RequestParam Map<String, String> params) {

Maybe Map<String, String> params can be required = false

cbornet

comment created time in 2 hours

Pull request review commentjhipster/generator-jhipster

Refactor Kafka generated code

 public class <%= upperFirstCamelCase(baseName) %>KafkaResourceIT {     private static void startTestcontainer() {         kafkaContainer = new KafkaContainer("<%= KAFKA_VERSION %>");         kafkaContainer.start();-        System.setProperty("kafkaBootstrapServers", kafkaContainer.getBootstrapServers());     }      @BeforeEach-    public void setup() {-        <%= upperFirstCamelCase(baseName) %>KafkaResource kafkaResource = new <%= upperFirstCamelCase(baseName) %>KafkaResource(producer);+    void setup() {+        KafkaProperties kafkaProperties = new KafkaProperties();+        Map<String, String> producerProps = getProducerProps();+        kafkaProperties.setProducer(new HashMap<>(producerProps));++        Map<String, String> consumerProps = getConsumerProps("default-group");+        consumerProps.put("client.id", "default-client");+        kafkaProperties.setConsumer(consumerProps);++        kafkaResource = new <%= upperFirstCamelCase(baseName) %>KafkaResource(kafkaProperties); -        this.restMockMvc = MockMvcBuilders.standaloneSetup(kafkaResource)+        restMockMvc = MockMvcBuilders.standaloneSetup(kafkaResource)             .build();+    }++    @Test+    void producesMessages() throws Exception {+        restMockMvc.perform(post("/api/<%= dasherizedBaseName %>-kafka/publish/topic-produce?message=value-produce"))+            .andExpect(status().isOk());++        Map<String, Object> consumerProps = new HashMap<>(getConsumerProps("group-produce"));+        KafkaConsumer<String, String> consumer = new KafkaConsumer<>(consumerProps);+        consumer.subscribe(Collections.singletonList("topic-produce"));+        ConsumerRecords<String, String> records = consumer.poll(Duration.ofSeconds(1)); -        producer.init();-        consumer.start();+        assertThat(records.count()).isEqualTo(1);+        ConsumerRecord<String, String> record = records.iterator().next();+        assertThat(record.value()).isEqualTo("value-produce");     }      @Test-    public void producedMessageHasBeenConsumed() throws Exception {-        restMockMvc.perform(post("/api/<%= dasherizedBaseName %>-kafka/publish?message=test"))+    void createsConsumer() throws Exception {

public ?

cbornet

comment created time in 2 hours

PR opened jhipster/generator-jhipster

Update spring-boot to 2.1.11 and other dependencies
  • Please make sure the below checklist is followed for Pull Requests.

  • [x] All continuous integration tests are green

  • [x] Tests are added where necessary

  • [x] Documentation is added/updated where necessary

  • [x] Coding Rules & Commit Guidelines as per our CONTRIBUTING.md document are followed

<!-- Please also reference the issue number in a commit message to automatically close the related Github issue

-->

+9 -9

0 comment

2 changed files

pr created time in 2 hours

issue openedjhipster/prettier-java

Mutli-line ternary expression indentation seems inconsistent with if/else formatting

Multi-line/wrapped ternary expressions are currently formatted like:

String wasExpectedToDropString = expectedToDrop ? "was expected to drop"
  : "was NOT expected to drop";

If else expressions are formatted like:

if (expectedToDrop) {
  wasExpectedToDropString = "was expected to drop";
} else {	
  myString = "was NOT expected to drop";
}

In my opinion it would make sense to have multi-line ternary expressions similarly formatted like:

String wasExpectedToDropString = expectedToDrop 
  ? "was expected to drop"
  : "was NOT expected to drop";

This feels consistent to me with the if/else formatting, other boolean formatting, etc.

Apologies if this was already addressed somewhere, but I couldn't find any issue explicitly making a decision on this, or raising this question previously.

created time in 2 hours

issue openedjhipster/prettier-java

Boolean expression assignment over multiple lines not indented

This seems similar to https://github.com/jhipster/prettier-java/issues/251

I recently enabled this for my project and noticed that the second line of a boolean expression being assigned to a variable is not being indented, eg:

        boolean willDrop = predictDropResponse.getSendResult().isIgnorableFailure() ||
        predictDropResponse.getSendResult().isFatalError();

I would expect this to be something like:

        boolean willDrop = predictDropResponse.getSendResult().isIgnorableFailure() ||
          predictDropResponse.getSendResult().isFatalError();

Indenting the second line of the boolean expression seems more consistent with how other multi-line assignments are handled.

created time in 2 hours

fork DanielFran/generator-jhipster

Open Source application platform for creating Spring Boot + Angular/React projects in seconds!

https://www.jhipster.tech

fork in 3 hours

pull request commentjhipster/generator-jhipster

Refactor Kafka generated code

ok, I will

cbornet

comment created time in 3 hours

pull request commentjhipster/generator-jhipster

Refactor Kafka generated code

@pascalgrimaud done. Can you test with the longer timeout ?

cbornet

comment created time in 3 hours

Pull request review commentjhipster/prettier-java

Fix/parser variable arity

 function defineRules($, t) {     });     $.CONSUME(t.LSquare);     $.CONSUME(t.RSquare);-    $.MANY2(() => {-      $.MANY3(() => {-        $.SUBRULE2($.annotation);-      });-      $.CONSUME2(t.LSquare);-      $.CONSUME2(t.RSquare);+    $.MANY2({+      GATE: () => $.BACKTRACK_LOOKAHEAD($.isDims),

I don't really understand: if it start with annotations, the Gate will be OK, as the isDims rule start with MANY(annotation). Or am I missing something? The name isDims is maybe a bit misleading

clementdessoude

comment created time in 3 hours

Pull request review commentjhipster/prettier-java

Fix/parser variable arity

 function defineRules($, t) {     });     $.CONSUME(t.LSquare);     $.CONSUME(t.RSquare);-    $.MANY2(() => {-      $.MANY3(() => {-        $.SUBRULE2($.annotation);-      });-      $.CONSUME2(t.LSquare);-      $.CONSUME2(t.RSquare);+    $.MANY2({+      GATE: () => $.BACKTRACK_LOOKAHEAD($.isDims),

I don't really understand: if it start with annotations, the Gate will be OK, as the isDims rule start with MANY(annotation). Or am I missing something? The name isDims is maybe a bit misleading

clementdessoude

comment created time in 3 hours

Pull request review commentjhipster/generator-jhipster

Refactor Kafka generated code

 -%> package <%= packageName %>.web.rest; -import <%= packageName %>.<%= mainClass %>;-<%_ if (cacheProvider === 'redis') { _%>-import <%=packageName%>.RedisTestContainerExtension;-<%_ } _%>-<%_ if (authenticationType === 'uaa') { _%>-import <%=packageName%>.config.SecurityBeanOverrideConfiguration;-<%_ } _%>-<%_ if (authenticationType === 'oauth2') { _%>-import <%=packageName%>.config.TestSecurityConfiguration;-<%_ } _%>-import <%= packageName %>.service.<%= upperFirstCamelCase(baseName) %>KafkaProducer;-import <%= packageName %>.service.<%= upperFirstCamelCase(baseName) %>KafkaConsumer;-import org.apache.kafka.common.Metric;-import org.apache.kafka.common.MetricName;-import org.assertj.core.api.Assertions;+import <%= packageName %>.config.KafkaProperties;+import <%= packageName %>.web.rest.<%= upperFirstCamelCase(baseName) %>KafkaResource.SafeKafkaConsumer;+import org.apache.kafka.clients.consumer.ConsumerRecord;+import org.apache.kafka.clients.consumer.ConsumerRecords;+import org.apache.kafka.clients.consumer.KafkaConsumer;+import org.apache.kafka.clients.producer.KafkaProducer;+import org.apache.kafka.clients.producer.ProducerRecord; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test;-<%_ if (cacheProvider === 'redis') { _%>-import org.junit.jupiter.api.extension.ExtendWith;-<%_ } _%>-import org.springframework.beans.factory.annotation.Autowired;-import org.springframework.boot.test.context.SpringBootTest;-import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders;+import org.springframework.util.ReflectionUtils; import org.testcontainers.containers.KafkaContainer; +import java.lang.reflect.Field;+import java.time.Duration;+import java.util.Collections;+import java.util.HashMap; import java.util.Map;+import java.util.Set; +import static org.assertj.core.api.Assertions.assertThat;+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -<%_ if (authenticationType === 'oauth2') { _%>-@SpringBootTest(classes = {<%= mainClass %>.class, TestSecurityConfiguration.class})-<%_ } else if (authenticationType === 'uaa' && applicationType !== 'uaa') { _%>-@SpringBootTest(classes = {SecurityBeanOverrideConfiguration.class, <%= mainClass %>.class})-<%_ } else { _%>-@SpringBootTest(classes = <%= mainClass %>.class)-<%_ } _%>-@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)-<%_ if (cacheProvider === 'redis') { _%>-@ExtendWith(RedisTestContainerExtension.class)-<%_ } _%>-public class <%= upperFirstCamelCase(baseName) %>KafkaResourceIT {--    private MockMvc restMockMvc;+class <%= upperFirstCamelCase(baseName) %>KafkaResourceIT {      private static boolean started = false;-     private static KafkaContainer kafkaContainer; -    @Autowired-    private <%= upperFirstCamelCase(baseName) %>KafkaProducer producer;--    @Autowired-    private <%= upperFirstCamelCase(baseName) %>KafkaConsumer consumer;--    private static final int MAX_ATTEMPT = 5;+    private <%= upperFirstCamelCase(baseName) %>KafkaResource kafkaResource;+    private MockMvc restMockMvc;      @BeforeAll-    public static void startServer() {+    static void startServer() {         if (!started) {             startTestcontainer();             started = true;         }     }      private static void startTestcontainer() {-        kafkaContainer = new KafkaContainer("<%= KAFKA_VERSION %>");+        kafkaContainer = new KafkaContainer("5.3.1");

done

cbornet

comment created time in 4 hours

issue commentjhipster/generator-jhipster-nodejs

Support okta oauth2 security feature

I don't have time to test this right now. I trust your judgment. If you say it works, I believe you.

amanganiello90

comment created time in 5 hours

issue openedjhipster/generator-jhipster

Release 6.5.1 clean setup will generate liquibase change log

Release 6.5.1 clean setup will generate liquibase change log

A clean setup of JHipster will cause the first 'mvn liquibase:diff' to generate a change log

Motivation for or Use Case

After a clean stand up of JHipster - and prior to importing a jdl no database changes should be expected for the core application

Reproduce the error

(windows commands) mkdir newapplication cd newapplication jhipster (take defaults) mvnw cntl-C after application starts mvn liquibase:diff

You will observe that a change set is generated for liquibase [INFO] SELECT SEQUENCE_NAME FROM INFORMATION_SCHEMA.SEQUENCES WHERE SEQUENCE_SCHEMA = 'PUBLIC' AND IS_GENERATED=FALSE [INFO] select CONSTRAINT_NAME, COLUMN_LIST as COLUMN_NAME from information_schema.constraints where constraint_type='UNIQUE' and constraint_catalog='NEWPROJECT' and constraint_schema='PUBLIC' and table_name='JHI_USER' and constraint_name='UX_USER_LOGIN' [INFO] select CONSTRAINT_NAME, COLUMN_LIST as COLUMN_NAME from information_schema.constraints where constraint_type='UNIQUE' and constraint_catalog='NEWPROJECT' and constraint_schema='PUBLIC' and table_name='JHI_USER' and constraint_name='UX_USER_EMAIL' [INFO] C:\Blazent\Source\newproject\src\main\resources\config\liquibase\changelog\20191205131604_changelog.xml does not exist, creating [INFO] Differences written to Change Log File, C:\Blazent\Source\newproject/src/main/resources/config/liquibase/changelog/20191205131604_changelog.xml [INFO] ------------------------------------------------------------------------ [

Related issues

I saw a previous issue but it was closed - now I can't find it

Suggest a Fix

unsure of the core issue

JHipster Version(s)

6.5.1

JHipster configuration

INFO! Using JHipster version installed locally in current project's node_modules INFO! Executing jhipster:info INFO! Options: from-cli: true Welcome to the JHipster Information Sub-Generator

JHipster Version(s)
newproject@0.0.1-SNAPSHOT C:\Blazent\Source\newproject
`-- generator-jhipster@6.5.1

JHipster configuration, a .yo-rc.json file generated in the root folder

<details> <summary>.yo-rc.json file</summary> <pre> { "generator-jhipster": { "promptValues": { "packageName": "com.blazent.newproject", "nativeLanguage": "en" }, "jhipsterVersion": "6.5.1", "applicationType": "monolith", "baseName": "newproject", "packageName": "com.blazent.newproject", "packageFolder": "com/blazent/newproject", "serverPort": "8080", "authenticationType": "session", "cacheProvider": "ehcache", "enableHibernateCache": true, "websocket": false, "databaseType": "sql", "devDatabaseType": "h2Disk", "prodDatabaseType": "mysql", "searchEngine": false, "messageBroker": false, "serviceDiscoveryType": false, "buildTool": "maven", "enableSwaggerCodegen": false, "rememberMeKey": "YourJWTSecretKeyWasReplacedByThisMeaninglessTextByTheJHipsterInfoCommandForObviousSecurityReasons", "embeddableLaunchScript": false, "useSass": true, "clientPackageManager": "npm", "clientFramework": "angularX", "clientTheme": "spacelab", "clientThemeVariant": "primary", "testFrameworks": ["protractor"], "jhiPrefix": "jhi", "entitySuffix": "", "dtoSuffix": "DTO", "otherModules": [], "enableTranslation": true, "nativeLanguage": "en", "languages": ["en"], "blueprints": [] } }

</pre> </details><summary>JDL entity definitions</summary>

<pre>

</pre> </details>

Environment and Tools

git version 2.24.0.windows.2

node: v12.13.1

npm: 6.13.1

yeoman: 3.1.0

INFO! Congratulations, JHipster execution is complete!

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory

None

Entity configuration(s) entityName.json files generated in the .jhipster directory

None

Browsers and Operating System

WIndows server 2016, Chrome

  • [X] Checking this box is mandatory (this is just to show you read everything)

The <date>_changelog.xml generated is:

<changeSet author="Administrator (generated)" id="1575551790121-1">
    <dropUniqueConstraint constraintName="UC_JHI_USEREMAIL_COL" tableName="jhi_user"/>
    <addUniqueConstraint columnNames="email" constraintName="UC_JHI_USEREMAIL_COL" tableName="jhi_user"/>
</changeSet>
<changeSet author="Administrator (generated)" id="1575551790121-2">
    <dropUniqueConstraint constraintName="UC_JHI_USERLOGIN_COL" tableName="jhi_user"/>
    <addUniqueConstraint columnNames="login" constraintName="UC_JHI_USERLOGIN_COL" tableName="jhi_user"/>
</changeSet>

created time in 6 hours

pull request commentjhipster/generator-jhipster

Refactor Kafka generated code

Thanks for the analyze. Yes, we should have something which works immediatly the first time. So if increasing to 10s works, let's do it

cbornet

comment created time in 6 hours

startedjhipster/generator-jhipster

started time in 6 hours

issue openedjhipster/generator-jhipster

No default value one-to-many selectbox

<!--

  • Please follow the issue template below for bug reports.
  • If you have a support request rather than a bug, please use Stack Overflow with the JHipster tag.
  • For bug reports it is mandatory to run the command jhipster info in your project's root folder, and paste the result here.
  • Tickets opened without any of these pieces of information will be closed without any explanation. -->
Overview of the issue

<!-- Explain the bug, if an error is being thrown a stack trace helps --> When you create an entity with a one-to-many relationship and then creating an entity, it looks like there is a value selected for the required relation, but when submitting you get an exception. You have to select a value yourself.

Motivation for or Use Case

<!-- Explain why this is a bug for you --> It should be clear to the user that you have to select a value instead of showing the first one in the list but not setting is as default value.

Reproduce the error

Create entity with one-to-many relation Create an entity on the owning side It will look like the first value is selected in the selectbox, but value is nog actually set. <!-- For bug reports, an unambiguous set of steps to reproduce the error -->

Related issues

<!-- Has a similar issue been reported before? Please search both closed & open issues -->

Suggest a Fix

Show an empty selectbox instead of first element.

<!-- If you can't fix the bug yourself, perhaps you can point to what might be causing the problem (line of code or commit) -->

JHipster Version(s)

jhipster info INFO! Using JHipster version installed locally in current project's node_modules INFO! Executing jhipster:info INFO! Options: from-cli: true Welcome to the JHipster Information Sub-Generator

JHipster Version(s)
xg-edfu-admin-website@0.0.1-SNAPSHOT /Users/calvinswinnen/Documents/projects/Qarad/xg_edfu_admin_website
└── generator-jhipster@6.4.1

JHipster configuration, a .yo-rc.json file generated in the root folder

<details> <summary>.yo-rc.json file</summary> <pre> { "generator-jhipster": { "promptValues": { "packageName": "com.qarad.edfu", "nativeLanguage": "en" }, "jhipsterVersion": "6.4.1", "applicationType": "monolith", "baseName": "xg_edfu_admin_website", "packageName": "com.qarad.edfu", "packageFolder": "com/qarad/edfu", "serverPort": "8080", "authenticationType": "jwt", "cacheProvider": "no", "websocket": false, "databaseType": "sql", "devDatabaseType": "mysql", "prodDatabaseType": "mysql", "searchEngine": false, "messageBroker": false, "serviceDiscoveryType": false, "buildTool": "maven", "enableSwaggerCodegen": false, "jwtSecretKey": "bXktc2VjcmV0LXRva2VuLXRvLWNoYW5nZS1pbi1wcm9kdWN0aW9uLWFuZC10by1rZWVwLWluLWEtc2VjdXJlLXBsYWNl", "embeddableLaunchScript": false, "useSass": true, "clientPackageManager": "npm", "clientFramework": "react", "clientTheme": "none", "clientThemeVariant": "", "testFrameworks": [], "jhiPrefix": "jhi", "entitySuffix": "", "dtoSuffix": "DTO", "otherModules": [], "enableTranslation": true, "nativeLanguage": "en", "languages": ["en"], "blueprints": [] } }

</pre> </details>

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory

<details> <summary>JDL entity definitions</summary>

<pre> entity AccessRight { name String required unique minlength(1) maxlength(30), displayName String required maxlength(50) } entity BusinessUnit { displayName String required minlength(1) maxlength(50), slug String required unique minlength(1) maxlength(20) pattern(/[A-Za-z0-9]+/) } entity Manufacturer { analyticsProperty String maxlength(255), creationDate Instant, deleted String maxlength(1), lastUpdate Instant, name String required unique minlength(1) maxlength(50), baseUrl String required maxlength(255), opsVersion String required maxlength(8), customUrl String maxlength(255) } entity Continent { isoCode String required unique minlength(2) maxlength(2), name String required unique minlength(1) maxlength(30) } entity Country { isoCode String required unique minlength(2) maxlength(2), name String required unique minlength(1) maxlength(50), fullName String required unique minlength(1) maxlength(50), iso3 String required unique minlength(3) maxlength(3), number String required unique minlength(3) maxlength(3), displayOrder Integer } entity InterfaceRegion { name String required unique minlength(1) maxlength(50) } entity InterfaceLanguage { name String required unique minlength(1) maxlength(20), isoCode String required unique minlength(2) maxlength(2) } entity UserGroup { name String required unique minlength(1) maxlength(30) } entity DocumentRegion { name String required unique minlength(1) maxlength(50) } entity DocumentLanguage { name String required unique minlength(1) maxlength(20), isoCode String required unique minlength(2) maxlength(2) } entity ProductType { name String required unique minlength(1) maxlength(30), slug String required unique minlength(1) maxlength(20) pattern(/[A-Za-z0-9]+/), active Boolean required } entity Product { keyCode String required unique minlength(1) maxlength(50) } entity ProductGroup { name String required unique minlength(1) maxlength(30) } entity Role { name String required unique minlength(1) maxlength(30), description String maxlength(255), predefined Boolean required } entity DocumentType { name String required minlength(1) maxlength(30), active Boolean required } entity Audience { name String required unique minlength(1) maxlength(30) } entity Document { name String required minlength(1) maxlength(100), number String maxlength(30) } entity File { name String required minlength(1) maxlength(255), s3objectKey String required minlength(1) maxlength(1024), version String required minlength(1) maxlength(20), date LocalDate required, validUntil LocalDate required, remarksActive Boolean required, remarks String maxlength(4000) } relationship OneToMany { Continent{countries} to Country{continent(name) required}, BusinessUnit{interfaceRegions} to InterfaceRegion{businessUnit(displayName) required}, Role{userGroups} to UserGroup{role(description)}, BusinessUnit{documentRegions} to DocumentRegion{businessUnit(displayName) required}, BusinessUnit{productTypes} to ProductType{businessUnit(displayName) required}, ProductType{products} to Product{productType(name)}, DocumentType{documents} to Document{documentType(name)} } relationship ManyToMany { BusinessUnit{interfaceLanguages(name)} to InterfaceLanguage{businessUnits(displayName)}, BusinessUnit{documentLanguages(name)} to DocumentLanguage{businessUnits(displayName)}, InterfaceRegion{interfaceCountries(name) required} to Country{interfaceRegions}, UserGroup{businessUnits(displayName)} to BusinessUnit{userGroup(name)}, UserGroup{users(email)} to User, DocumentRegion{documentCountries(name) required} to Country{documentRegions}, Product{productGroups(name)} to ProductGroup{products}, Role{accessRights(displayName)} to AccessRight{roles(name)}, DocumentType{audience(name)} to Audience{documentType(name)}, Document{productGroups(name)} to ProductGroup{documents(name)}, Document{files(name)} to File{documents(name)}, File{countries(name)} to Country{files(name)}, File{documentLanguages(name)} to DocumentLanguage{files(name)} }

dto AccessRight, BusinessUnit, Manufacturer, Continent, Country, InterfaceRegion, InterfaceLanguage, UserGroup, DocumentRegion, DocumentLanguage, ProductType, Product, ProductGroup, Role, DocumentType, Audience, Document, File with mapstruct service AccessRight, BusinessUnit, Manufacturer, Continent, Country, InterfaceRegion, InterfaceLanguage, UserGroup, DocumentRegion, DocumentLanguage, ProductType, Product, ProductGroup, Role, DocumentType, Audience, Document, File with serviceImpl readOnly AccessRight, Manufacturer, Continent, Country, InterfaceLanguage, DocumentLanguage

</pre> </details>

Environment and Tools

openjdk version "1.8.0_232" OpenJDK Runtime Environment (build 1.8.0_232-b09) Eclipse OpenJ9 VM (build openj9-0.17.0, JRE 1.8.0 Mac OS X amd64-64-Bit Compressed References 20191017_369 (JIT enabled, AOT enabled) OpenJ9 - 77c1cf708 OMR - 20db4fbc JCL - 97b5ec8f383 based on jdk8u232-b09)

git version 2.21.0 (Apple Git-122)

node: v12.1.0

npm: 6.13.0

yeoman: 3.1.1

yarn: 1.16.0

Docker version 19.03.4, build 9013bf5

docker-compose version 1.24.1, build 4667896b

created time in 6 hours

startedjhipster/generator-jhipster

started time in 6 hours

Pull request review commentjhipster/prettier-java

Fix/parser variable arity

 function defineRules($, t) {     });     $.CONSUME(t.LSquare);     $.CONSUME(t.RSquare);-    $.MANY2(() => {-      $.MANY3(() => {-        $.SUBRULE2($.annotation);-      });-      $.CONSUME2(t.LSquare);-      $.CONSUME2(t.RSquare);+    $.MANY2({+      GATE: () => $.BACKTRACK_LOOKAHEAD($.isDims),

this GATE seems too restrictive, what if it starts with annotation?

clementdessoude

comment created time in 6 hours

pull request commentjhipster/generator-jhipster

Refactor Kafka generated code

it doesn't' work the first time, I need to call several times the API to get the result

This is because at the first poll, the consumer starts the operations to join the group. The current default of 1s of polling is insufficient to join the group and get the messages. So it takes several poll attempts to do the whole process. Kafka also uses a heartbeat mechanism to detect dead consumers. The heartbeats are sent from a thread and if Kafka doesn't receive one in session.timeout.ms (10s by default), the consumer is considered dead. The sending of heartbeats only starts when the consumer has joined the group (https://chrzaszcz.dev/2019/06/kafka-heartbeat-thread/) so if there is more than 10s between 2 polls when the consumer is joining the group, then the process fails and has to restart from the beginning.

So the simplest solution I see is to increase the default poll timeout (eg. to 10s) to ensure the consumer has enough time to join the group. WDYT?

cbornet

comment created time in 7 hours

pull request commentjhipster/jhipster.github.io

Add Correct Paperowls Image

@jdubois : I've sent them a support email explaining the matter and asking clarification about the correct logo. Will see what they say. :smile:

SudharakaP

comment created time in 7 hours

fork borisp-qm/jhipster-sample-app

This is a sample application created with JHipster

fork in 7 hours

issue commentjhipster/jhipster-kotlin

Convert usages of Optional to Kotlin built-in null safety features

Is there a way I can help with this?

pvliss

comment created time in 7 hours

delete branch jhipster/jhipster

delete branch : dependabot/maven/micrometer.version-1.3.2

delete time in 7 hours

pull request commentjhipster/jhipster

Bump micrometer.version from 1.3.1 to 1.3.2

OK, I won't notify you again about this release, but will get in touch when a new version is available.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

dependabot-preview[bot]

comment created time in 7 hours

PR closed jhipster/jhipster

Bump micrometer.version from 1.3.1 to 1.3.2 dependencies

Bumps micrometer.version from 1.3.1 to 1.3.2.

Updates micrometer-core from 1.3.1 to 1.3.2 <details> <summary>Release notes</summary>

Sourced from micrometer-core's releases.

v1.3.2

This patch release includes changes from the 1.1.9 milestone in addition to the 1.3.2 milestone. </details> <details> <summary>Commits</summary>

  • 9373815 Merge branch '1.1.x' into 1.3.x
  • 18831df Add compiler arguments for compile warnings (#1730)
  • 003dc29 Clean up compile warnings in 1.3.x branch (#1729)
  • 346bfd4 Merge branch '1.1.x' into 1.3.x
  • c6a99f1 Clean up compile warnings (#1728)
  • f559b6e Merge branch '1.1.x' into 1.3.x
  • 10c37d8 Add tests for HibernateMetrics.monitor() with SessionFactory (#1727)
  • 4eec042 Merge branch '1.1.x' into 1.3.x
  • e302e95 Replace deprecated DoubleFormat.decimalOrWhole() usages (#1726)
  • 87f2d12 Merge branch '1.1.x' into 1.3.x
  • Additional commits viewable in compare view </details> <br />

Updates micrometer-registry-prometheus from 1.3.1 to 1.3.2 <details> <summary>Release notes</summary>

Sourced from micrometer-registry-prometheus's releases.

v1.3.2

This patch release includes changes from the 1.1.9 milestone in addition to the 1.3.2 milestone. </details> <details> <summary>Commits</summary>

  • 9373815 Merge branch '1.1.x' into 1.3.x
  • 18831df Add compiler arguments for compile warnings (#1730)
  • 003dc29 Clean up compile warnings in 1.3.x branch (#1729)
  • 346bfd4 Merge branch '1.1.x' into 1.3.x
  • c6a99f1 Clean up compile warnings (#1728)
  • f559b6e Merge branch '1.1.x' into 1.3.x
  • 10c37d8 Add tests for HibernateMetrics.monitor() with SessionFactory (#1727)
  • 4eec042 Merge branch '1.1.x' into 1.3.x
  • e302e95 Replace deprecated DoubleFormat.decimalOrWhole() usages (#1726)
  • 87f2d12 Merge branch '1.1.x' into 1.3.x
  • Additional commits viewable in compare view </details> <br />

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

</details>

+1 -1

0 comment

1 changed file

dependabot-preview[bot]

pr closed time in 7 hours

startedjhipster/generator-jhipster

started time in 8 hours

pull request commentjhipster/jhipster.github.io

Add Correct Paperowls Image

Or there's a bug with Opencollective?

SudharakaP

comment created time in 8 hours

pull request commentjhipster/jhipster.github.io

Add Correct Paperowls Image

Yes but that's what they put: https://opencollective.com/papersowl-com

SudharakaP

comment created time in 8 hours

push eventjhipster/generator-jhipster

Kaido Hallik

commit sha 4ea2a4d0c7abb4771296d7a59bfd2eb795bdd87f

Strict option in home module in Angular

view details

Kaido Hallik

commit sha cda3f601e03529cfda4919a6f664fb2b659498d6

Merge pull request #10836 from kaidohallik/strict-home Strict option in home module in Angular

view details

push time in 9 hours

PR merged jhipster/generator-jhipster

Strict option in home module in Angular area: enhancement :wrench: theme: angular

This is the next piece for the #10631 - home module.

One note about changes: AccountService.identity() must be called in HomeComponent only if authentication type is oauth2, for other authentication types this is already called in LoginService.login(): https://github.com/jhipster/generator-jhipster/blob/master/generators/client/templates/angular/src/main/webapp/app/core/login/login.service.ts.ejs#L60-L62

  • Please make sure the below checklist is followed for Pull Requests.

  • [x] All continuous integration tests are green

  • [ ] Tests are added where necessary

  • [ ] Documentation is added/updated where necessary

  • [ ] Coding Rules & Commit Guidelines as per our CONTRIBUTING.md document are followed

<!-- Please also reference the issue number in a commit message to automatically close the related Github issue

Note: It is also possible to add [skip ci] to your commit message to skip Travis tests -->

+19 -47

1 comment

4 changed files

kaidohallik

pr closed time in 9 hours

pull request commentjhipster/generator-jhipster

Strict option in home module in Angular

As I need this in the next PR then I'm merging this.

kaidohallik

comment created time in 9 hours

delete branch jhipster/jhipster

delete branch : dependabot/maven/com.amazonaws-aws-java-sdk-bom-1.11.688

delete time in 9 hours

pull request commentjhipster/jhipster

Bump aws-java-sdk-bom from 1.11.687 to 1.11.688

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

dependabot-preview[bot]

comment created time in 9 hours

PR closed jhipster/jhipster

Bump aws-java-sdk-bom from 1.11.687 to 1.11.688 dependencies

Bumps aws-java-sdk-bom from 1.11.687 to 1.11.688. <details> <summary>Changelog</summary>

Sourced from aws-java-sdk-bom's changelog.

1.11.688 2019-12-05

Amazon Kinesis Video Signaling Channels

  • Features

    • Announcing support for WebRTC in Kinesis Video Streams, as fully managed capability. You can now use simple APIs to enable your connected devices, web, and mobile apps with real-time two-way media streaming capabilities.

Amazon Kinesis Video Streams

  • Features

    • Introduces management of signaling channels for Kinesis Video Streams.

AmazonApiGatewayV2

  • Features

    • Amazon API Gateway now supports HTTP APIs (beta), enabling customers to quickly build high performance RESTful APIs that are up to 71% cheaper than REST APIs also available from API Gateway. HTTP APIs are optimized for building APIs that proxy to AWS Lambda functions or HTTP backends, making them ideal for serverless workloads. Using HTTP APIs, you can secure your APIs using OIDC and OAuth 2 out of box, quickly build web applications using a simple CORS experience, and get started immediately with automatic deployment and simple create workflows. </details> <details> <summary>Commits</summary>
  • ac18527 AWS SDK for Java 1.11.688
  • 3067b54 Update GitHub version number to 1.11.688-SNAPSHOT
  • See full diff in compare view </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

</details>

+1 -1

0 comment

1 changed file

dependabot-preview[bot]

pr closed time in 9 hours

delete branch jhipster/jhipster

delete branch : dependabot/maven/com.couchbase.client-java-client-2.7.11

delete time in 10 hours

pull request commentjhipster/jhipster

Bump java-client from 2.7.10 to 2.7.11

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

dependabot-preview[bot]

comment created time in 10 hours

PR closed jhipster/jhipster

Bump java-client from 2.7.10 to 2.7.11 dependencies

Bumps java-client from 2.7.10 to 2.7.11. <details> <summary>Commits</summary>

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

</details>

+1 -1

0 comment

1 changed file

dependabot-preview[bot]

pr closed time in 10 hours

pull request commentjhipster/jhipster.github.io

Add modelio-jdl-studio documentation

Hello @deepu105 @pascalgrimaud, Thank you for your reply.

We add a new section for third party tools which are not supported directly by the core team and we add this there

By the option 2, would you mean that we have to create a new section Third-Party Tools alongside to the Tools section or it's already exist somewhere? Could you please precise a bit more the this point?

ambpro

comment created time in 10 hours

PR opened jhipster/jhipster

Bump aws-java-sdk-bom from 1.11.687 to 1.11.688

Bumps aws-java-sdk-bom from 1.11.687 to 1.11.688. <details> <summary>Changelog</summary>

Sourced from aws-java-sdk-bom's changelog.

1.11.688 2019-12-05

Amazon Kinesis Video Signaling Channels

  • Features

    • Announcing support for WebRTC in Kinesis Video Streams, as fully managed capability. You can now use simple APIs to enable your connected devices, web, and mobile apps with real-time two-way media streaming capabilities.

Amazon Kinesis Video Streams

  • Features

    • Introduces management of signaling channels for Kinesis Video Streams.

AmazonApiGatewayV2

  • Features

    • Amazon API Gateway now supports HTTP APIs (beta), enabling customers to quickly build high performance RESTful APIs that are up to 71% cheaper than REST APIs also available from API Gateway. HTTP APIs are optimized for building APIs that proxy to AWS Lambda functions or HTTP backends, making them ideal for serverless workloads. Using HTTP APIs, you can secure your APIs using OIDC and OAuth 2 out of box, quickly build web applications using a simple CORS experience, and get started immediately with automatic deployment and simple create workflows. </details> <details> <summary>Commits</summary>
  • ac18527 AWS SDK for Java 1.11.688
  • 3067b54 Update GitHub version number to 1.11.688-SNAPSHOT
  • See full diff in compare view </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

</details>

+1 -1

0 comment

1 changed file

pr created time in 10 hours

PR opened jhipster/jhipster

Bump micrometer.version from 1.3.1 to 1.3.2

Bumps micrometer.version from 1.3.1 to 1.3.2.

Updates micrometer-core from 1.3.1 to 1.3.2 <details> <summary>Release notes</summary>

Sourced from micrometer-core's releases.

v1.3.2

This patch release includes changes from the 1.1.9 milestone in addition to the 1.3.2 milestone. </details> <details> <summary>Commits</summary>

  • 9373815 Merge branch '1.1.x' into 1.3.x
  • 18831df Add compiler arguments for compile warnings (#1730)
  • 003dc29 Clean up compile warnings in 1.3.x branch (#1729)
  • 346bfd4 Merge branch '1.1.x' into 1.3.x
  • c6a99f1 Clean up compile warnings (#1728)
  • f559b6e Merge branch '1.1.x' into 1.3.x
  • 10c37d8 Add tests for HibernateMetrics.monitor() with SessionFactory (#1727)
  • 4eec042 Merge branch '1.1.x' into 1.3.x
  • e302e95 Replace deprecated DoubleFormat.decimalOrWhole() usages (#1726)
  • 87f2d12 Merge branch '1.1.x' into 1.3.x
  • Additional commits viewable in compare view </details> <br />

Updates micrometer-registry-prometheus from 1.3.1 to 1.3.2 <details> <summary>Release notes</summary>

Sourced from micrometer-registry-prometheus's releases.

v1.3.2

This patch release includes changes from the 1.1.9 milestone in addition to the 1.3.2 milestone. </details> <details> <summary>Commits</summary>

  • 9373815 Merge branch '1.1.x' into 1.3.x
  • 18831df Add compiler arguments for compile warnings (#1730)
  • 003dc29 Clean up compile warnings in 1.3.x branch (#1729)
  • 346bfd4 Merge branch '1.1.x' into 1.3.x
  • c6a99f1 Clean up compile warnings (#1728)
  • f559b6e Merge branch '1.1.x' into 1.3.x
  • 10c37d8 Add tests for HibernateMetrics.monitor() with SessionFactory (#1727)
  • 4eec042 Merge branch '1.1.x' into 1.3.x
  • e302e95 Replace deprecated DoubleFormat.decimalOrWhole() usages (#1726)
  • 87f2d12 Merge branch '1.1.x' into 1.3.x
  • Additional commits viewable in compare view </details> <br />

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

</details>

+1 -1

0 comment

1 changed file

pr created time in 10 hours

create barnchjhipster/jhipster

branch : dependabot/maven/micrometer.version-1.3.2

created branch time in 10 hours

pull request commentjhipster/jhipster.github.io

Add Correct Paperowls Image

I think @SudharakaP is right. Current image seems copy of another sponsor Edusson

SudharakaP

comment created time in 10 hours

PR opened jhipster/jhipster

Bump java-client from 2.7.10 to 2.7.11

Bumps java-client from 2.7.10 to 2.7.11. <details> <summary>Commits</summary>

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

</details>

+1 -1

0 comment

1 changed file

pr created time in 11 hours

pull request commentjhipster/jhipster.github.io

Add Correct Paperowls Image

Thanks! But I put the one from Opencollective so I'm not sure

SudharakaP

comment created time in 11 hours

startedjhipster/jhipster-dotnetcore

started time in 11 hours

fork kacetal/jhipster-registry

JHipster Registry, based on Spring Cloud Netflix Eureka and Spring Cloud Config

fork in 11 hours

fork kacetal/jhipster-registry

JHipster Registry, based on Spring Cloud Netflix Eureka and Spring Cloud Config

fork in 11 hours

PR opened jhipster/generator-jhipster

[Feature Request] Enable autoprefixer for component specific styles

Treat component specific SASS styles the same way as vendor and global styles using the autoprefixer.

+2 -2

0 comment

2 changed files

pr created time in 12 hours

fork andreasfranz/generator-jhipster

Open Source application platform for creating Spring Boot + Angular/React projects in seconds!

https://www.jhipster.tech

fork in 12 hours

pull request commentjhipster/jhipster.github.io

Add modelio-jdl-studio documentation

Same as you @deepu105, I'd prefer the option 2. Thanks a lot for all this work

ambpro

comment created time in 12 hours

issue commentjhipster/generator-jhipster-nodejs

Support okta oauth2 security feature

I think you should proceed to merge and release

amanganiello90

comment created time in 13 hours

issue commentjhipster/generator-jhipster-nodejs

Support okta oauth2 security feature

I think @mraible is the best person to review

amanganiello90

comment created time in 13 hours

pull request commentjhipster/jhipster.github.io

Add modelio-jdl-studio documentation

Btw, I would prefer option 2, where we clearly state that this is third party and hence supported by the author of the tool

ambpro

comment created time in 13 hours

pull request commentjhipster/jhipster.github.io

Add modelio-jdl-studio documentation

Hi @ambpro first of all great work and thanks for your interest, but unfortunately we cannot have documentation for third party tools within our official docs unless its a module. The only place where we can list third party modules are here https://www.jhipster.tech/modules/marketplace/#/list

The concern is that we have no control over this module and making it part of official docs would mean we endorse it and we cannot take responsibility for something that is not within our control.

Now we have few options here

  1. Make a dummy npm module with this doc as the readme and publish it as JHipster module so that it gets automatically listed in https://www.jhipster.tech/modules/marketplace/#/list
  2. We add a new section for third party tools which are not supported directly by the core team and we add this there

Again thanks for submitting this but let us discuss and find a solution and I hope you understand our concern.

@jhipster/developers @jdubois @pascalgrimaud WDYT?

ambpro

comment created time in 13 hours

PR closed jhipster/prettier-java

WIP fix(parser): fix VariableArityParameter parsing pr: on-hold

Fix parsing of @Nullable Object @Nullable... errorMessageArgs in https://github.com/google/guava/blob/838560034dfaa1afdf51a126afe6b8b8e6cce3dd/guava/src/com/google/common/base/Verify.java#L122

The parser try to parse the second @Nullable... as dims, which is incorrect

Should be the last bug in the parser for the guava repo with #137 and #138.

WIP : There is probably a better way than using backtracking here.

+3 -2

1 comment

1 changed file

clement26695

pr closed time in 13 hours

fork andhikaallam2/generator-jhipster

Open Source application platform for creating Spring Boot + Angular/React projects in seconds!

https://www.jhipster.tech

fork in 13 hours

issue commentjhipster/generator-jhipster-nodejs

Support okta oauth2 security feature

@mraible, @deepu105, @jdubois , any news?

amanganiello90

comment created time in 14 hours

issue commentjhipster/prettier-java

Indent after comment line

Don't be sorry, it is really helpful to have your feedbacks! And we should improve our docs :)

benjavalero

comment created time in 14 hours

PR opened jhipster/prettier-java

Fix/parser variable arity

Fix last parser identified bugs with variable Arity parameters (see #139)

+78 -77

0 comment

7 changed files

pr created time in 14 hours

push eventjhipster/prettier-java

Clément Dessoude

commit sha 0d611e0b434f90dde6e25064c073583416b83c88

fix: fix formating for variable arity parameters with variable modifier

view details

push time in 14 hours

PR merged jhipster/prettier-java

fix: fix formating for variable arity parameters with variable modifier

Fix #303

Related to #139: I ignored one test case as there is a known bug in the parser we didn't solve yet about variableArityParameters. This test case should be uncommented when this bug is solved.

+25 -5

0 comment

3 changed files

clement26695

pr closed time in 14 hours

issue closedjhipster/prettier-java

Formatting a method with final varargs break the compilation

I came across a case where after using prettier the code is broken.

├─ prettier-plugin-java@0.4.0
└─ prettier@1.19.1

Initial code :

public class App {

  public void invoke(final String... strings) {}
}

After prettier :

public class App {

  public void invoke(finalString... strings) {}
}

Of course the code does not compile anymore.

closed time in 14 hours

ekans

fork ayimdomnic/generator-jhipster

Open Source application platform for creating Spring Boot + Angular/React projects in seconds!

https://www.jhipster.tech

fork in 15 hours

push eventjhipster/generator-jhipster

Kaido Hallik

commit sha f700ba1805c57c16b367556f8f73841c981794f9

Fix config server key in health check

view details

Pascal Grimaud

commit sha ee51cf4a1a140ac71f4f6c40f72598c1fda6f27f

Merge pull request #10882 from kaidohallik/fix-10870-health-config-server Fix config server key in health check

view details

push time in 15 hours

PR merged jhipster/generator-jhipster

Fix config server key in health check pr: bug-fix theme: i18n

fixes #10870

  • Please make sure the below checklist is followed for Pull Requests.

  • [ ] All continuous integration tests are green

  • [ ] Tests are added where necessary

  • [ ] Documentation is added/updated where necessary

  • [ ] Coding Rules & Commit Guidelines as per our CONTRIBUTING.md document are followed

<!-- Please also reference the issue number in a commit message to automatically close the related Github issue

-->

+44 -44

0 comment

44 changed files

kaidohallik

pr closed time in 15 hours

issue closedjhipster/generator-jhipster

Config Server service name is not translated in Health Checks

Overview of the issue

If you create a microservices architecture with i18n and JHipster Registry, the "Cloud Config" service is not translated properly in the health checks screen.

Screen Shot 2019-12-03 at 3 27 39 PM

Motivation for or Use Case

All the other keys are translated.

Reproduce the error

Create a microservices architecture with the following JDL. Start all services and navigate to http://localhost:8080/admin/health in the gateway.

application {
  config {
    baseName gateway,
    packageName com.okta.developer.gateway,
    applicationType gateway,
    authenticationType oauth2,
    prodDatabaseType postgresql,
    serviceDiscoveryType eureka,
    testFrameworks [protractor]
  }
  entities Blog, Post, Tag, Product
}

application {
  config {
    baseName blog,
    packageName com.okta.developer.blog,
    applicationType microservice,
    authenticationType oauth2,
    prodDatabaseType postgresql,
    serverPort 8081,
    serviceDiscoveryType eureka
  }
  entities Blog, Post, Tag
}

application {
  config {
    baseName store,
    packageName com.okta.developer.store,
    applicationType microservice,
    authenticationType oauth2,
    databaseType mongodb,
    devDatabaseType mongodb,
    prodDatabaseType mongodb,
    enableHibernateCache false,
    serverPort 8082,
    serviceDiscoveryType eureka
  }
  entities Product
}

entity Blog {
  name String required minlength(3),
  handle String required minlength(2)
}

entity Post {
  title String required,
  content TextBlob required,
  date Instant required
}

entity Tag {
  name String required minlength(2)
}

entity Product {
  title String required,
  price BigDecimal required min(0),
  image ImageBlob
}

relationship ManyToOne {
  Blog{user(login)} to User,
  Post{blog(name)} to Blog
}

relationship ManyToMany {
  Post{tag(name)} to Tag{post}
}

paginate Post, Tag with infinite-scroll
paginate Product with pagination

microservice Product with store
microservice Blog, Post, Tag with blog

// will be created under 'docker-compose' folder
deployment {
  deploymentType docker-compose
  appsFolders [gateway, blog, store]
  dockerRepositoryName "jmicro"
  consoleOptions [zipkin]
}
Suggest a Fix

The client is looking for health.indicator.clientConfigServer while the i18n key is health.indicator.configServer.

JHipster Version(s)
gateway@0.0.1-SNAPSHOT /Users/mraible/dev/ultimate-jhipster-workshop/lab-microservices/gateway
└── generator-jhipster@6.5.1 

JHipster configuration, a .yo-rc.json file generated in the root folder

<details> <summary>.yo-rc.json file</summary> <pre> { "generator-jhipster": { "databaseType": "sql", "devDatabaseType": "h2Disk", "enableHibernateCache": true, "enableSwaggerCodegen": false, "enableTranslation": true, "jhiPrefix": "jhi", "languages": ["en", "fr"], "messageBroker": false, "nativeLanguage": "en", "packageName": "com.okta.developer.gateway", "packageFolder": "com/okta/developer/gateway", "prodDatabaseType": "postgresql", "searchEngine": false, "serviceDiscoveryType": "eureka", "skipClient": false, "skipServer": false, "testFrameworks": ["protractor"], "websocket": false, "baseName": "gateway", "applicationType": "gateway", "authenticationType": "oauth2", "jhipsterVersion": "6.5.1", "buildTool": "maven", "skipUserManagement": true, "clientPackageManager": "npm", "cacheProvider": "ehcache", "serverPort": "8080", "clientFramework": "angularX", "clientTheme": "none", "clientThemeVariant": "", "useSass": true, "embeddableLaunchScript": false, "entitySuffix": "", "dtoSuffix": "DTO", "otherModules": [], "blueprints": [] }, "entities": ["Blog", "Post", "Tag", "Product"] }

</pre> </details>

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory

<details> <summary>JDL entity definitions</summary>

<pre> entity Blog { name String required minlength(3), handle String required minlength(2) } entity Post { title String required, content TextBlob required, date Instant required } entity Tag { name String required minlength(2) } entity Product { title String required, price BigDecimal required min(0), image ImageBlob } relationship ManyToOne { Blog{user(login)} to User, Post{blog(name)} to Blog } relationship ManyToMany { Post{tag(name)} to Tag{post} }

microservice Blog, Post, Tag with blog microservice Product with store paginate Post, Tag with infinite-scroll paginate Product with pagination

</pre> </details>

Environment and Tools

openjdk version "12.0.2" 2019-07-16 OpenJDK Runtime Environment (build 12.0.2+10) OpenJDK 64-Bit Server VM (build 12.0.2+10, mixed mode, sharing)

git version 2.21.0 (Apple Git-122.2)

node: v12.13.0

npm: 6.13.1

yeoman: 3.1.1

yarn: 1.19.1

Docker version 19.03.5, build 633a0ea

docker-compose version 1.24.1, build 4667896b

INFO! Congratulations, JHipster execution is complete!

closed time in 15 hours

mraible

PR opened jhipster/generator-jhipster

Fix config server key in health check

fixes #10870

  • Please make sure the below checklist is followed for Pull Requests.

  • [ ] All continuous integration tests are green

  • [ ] Tests are added where necessary

  • [ ] Documentation is added/updated where necessary

  • [ ] Coding Rules & Commit Guidelines as per our CONTRIBUTING.md document are followed

<!-- Please also reference the issue number in a commit message to automatically close the related Github issue

-->

+44 -44

0 comment

44 changed files

pr created time in 16 hours

startedjhipster/generator-jhipster

started time in 16 hours

issue commentjhipster/generator-jhipster

Config Server service name is not translated in Health Checks

I debugged and found out that indeed health keys are coming from bean names and suffix HealthIndicator is removed from final key, call stack:

  1. org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration.healthIndicatorRegistry

  2. org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorRegistryBeans.get:

  • gets all beans by type HealthIndicator.class with this method: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/beans/factory/ListableBeanFactory.html#getBeansOfType-java.lang.Class- which states "Returns: a Map with the matching beans, containing the bean names as keys and the corresponding bean instances as values"
  1. org.springframework.boot.actuate.health.HealthIndicatorRegistryFactory.createHealthIndicatorRegistry

  2. org.springframework.boot.actuate.health.HealthIndicatorRegistryFactory.initialize registers health indicators, names are coming from:

  • in our current master is used this code to remove HealthIndicator suffix: https://github.com/spring-projects/spring-boot/commit/3c535e0de340a718d6cf0d863a6529b314a38f42#diff-506b4201ff26976a856f0bf134ea6542L32-L36
		int index = name.toLowerCase(Locale.ENGLISH).indexOf("healthindicator");
		if (index > 0) {
			return name.substring(0, index);
		}
		return name;
  • if Spring Boot 2.2 will be used then this code will do the same: https://github.com/spring-projects/spring-boot/commit/3c535e0de340a718d6cf0d863a6529b314a38f42#diff-f9849ba01a53085b166edd4c37bc7064R40-R45
		for (String suffix : SUFFIXES) {
			if (name != null && name.toLowerCase(Locale.ENGLISH).endsWith(suffix)) {
				return name.substring(0, name.length() - suffix.length());
			}
		}
		return name;

where SUFFIXES is:

	private static final String[] SUFFIXES = { "healthindicator", "healthcontributor" };

So conclusion: key change from configServer to clientConfigServer is coming from spring boot version 2.1.0 and we should change this translation key in health.json files.

mraible

comment created time in 17 hours

startedjhipster/prettier-java

started time in 17 hours

issue commentjhipster/generator-jhipster

Config Server service name is not translated in Health Checks

This can be caused by this change in spring-cloud-config project: https://github.com/spring-cloud/spring-cloud-config/commit/513353b8e7580df1ca6f24eccdd2cf4c126855a1#diff-ec84b704fc84b98ce1e406eaf1130212L68-R68

mraible

comment created time in 18 hours

push eventjhipster/generator-jhipster

Daniel Franco

commit sha 6a6d0e8ba1bb2cb6f78792d7c3084bc2c4ca4b78

Update mariadb docker image version to 10.4.10

view details

Daniel Franco

commit sha 94990b57b1ae6b6d291e46b50a4f4bfc1897b950

Update postgres docker image version to 11.6

view details

Daniel Franco

commit sha f4064bc65d90e5dd2b02cf348bfcd2616cd2d21b

Update hazelcast/management-center docker image version to 3.12.7

view details

Daniel Franco

commit sha f9908de0b9d6c5a99565024bcf648871e84c2768

Update memcached docker image version to 1.5.20-alpine

view details

Daniel Franco

commit sha a04237b9fc52dd552cb68e42fec22cc6beb7c2c8

Update redis docker image version to 5.0.7

view details

Daniel Franco

commit sha d8bde5dddf32e9440d28488b93ad2c750a12e6f3

Update consul docker image version to 1.6.2

view details

Daniel Franco

commit sha 00b320bcb5e241d43abbfcbd685a9330ed7d0609

Update prom/prometheus docker image version to v2.14.0

view details

Daniel Franco

commit sha 63f141725e43044a8fbe7c276b557870d7797c03

Update grafana/grafana docker image version to 6.5.1

view details

Daniel Franco

commit sha 810a40251650ccdf1c883646a7730a1642c75830

Merge pull request #10881 from DanielFran/SB_2.1.11 Update docker image version

view details

push time in 19 hours

PR merged jhipster/generator-jhipster

Update docker image version area: enhancement :wrench: theme: docker :whale:
  • Please make sure the below checklist is followed for Pull Requests.

  • [x] All continuous integration tests are green

  • [x] Tests are added where necessary

  • [x] Documentation is added/updated where necessary

  • [x] Coding Rules & Commit Guidelines as per our CONTRIBUTING.md document are followed

<!-- Please also reference the issue number in a commit message to automatically close the related Github issue

-->

+8 -8

0 comment

1 changed file

DanielFran

pr closed time in 19 hours

PR opened jhipster/jhipster.github.io

Add Correct Paperowls Image

@jdubois : I think the recent Paperowl image addition somehow put a wrong logo. So I've corrected it here. :smile:

+0 -0

0 comment

1 changed file

pr created time in 19 hours

startedjhipster/generator-jhipster

started time in 19 hours

startedjhipster/generator-jhipster

started time in 20 hours

more