You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/03/30 11:22:13 UTC

[GitHub] [netbeans] dbalek opened a new pull request #3897: Support for Micronaut configuration enhanced.

dbalek opened a new pull request #3897:
URL: https://github.com/apache/netbeans/pull/3897


   - Navigation to custom properties declared via @Property annotation added.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] lbownik commented on a change in pull request #3897: Support for Micronaut configuration enhanced.

Posted by GitBox <gi...@apache.org>.
lbownik commented on a change in pull request #3897:
URL: https://github.com/apache/netbeans/pull/3897#discussion_r838783556



##########
File path: enterprise/micronaut/src/org/netbeans/modules/micronaut/MicronautConfigProperties.java
##########
@@ -60,6 +94,16 @@ public static boolean hasConfigMetadata(Project project) {
                     Exceptions.printStackTrace(ex);

Review comment:
       shouldn't exception's propagete instead of being swallowed?

##########
File path: enterprise/micronaut/src/org/netbeans/modules/micronaut/MicronautConfigProperties.java
##########
@@ -60,6 +94,16 @@ public static boolean hasConfigMetadata(Project project) {
                     Exceptions.printStackTrace(ex);
                 }
             }
+            String customRepository = getCustomRepository(project);
+            if (customRepository != null) {
+                try {
+                    InputStream stream = new ByteArrayInputStream(customRepository.getBytes(StandardCharsets.UTF_8));
+                    ConfigurationMetadataRepository repository = ConfigurationMetadataRepositoryJsonBuilder.create().withJsonResource(stream).build();
+                    props.putAll(repository.getAllProperties());
+                } catch (Exception ex) {
+                    Exceptions.printStackTrace(ex);

Review comment:
       shouldn't exception's propagete instead of being swallowed?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] dbalek commented on a change in pull request #3897: Support for Micronaut configuration enhanced.

Posted by GitBox <gi...@apache.org>.
dbalek commented on a change in pull request #3897:
URL: https://github.com/apache/netbeans/pull/3897#discussion_r839262478



##########
File path: enterprise/micronaut/src/org/netbeans/modules/micronaut/MicronautConfigProperties.java
##########
@@ -60,6 +94,16 @@ public static boolean hasConfigMetadata(Project project) {
                     Exceptions.printStackTrace(ex);
                 }
             }
+            String customRepository = getCustomRepository(project);
+            if (customRepository != null) {
+                try {
+                    InputStream stream = new ByteArrayInputStream(customRepository.getBytes(StandardCharsets.UTF_8));
+                    ConfigurationMetadataRepository repository = ConfigurationMetadataRepositoryJsonBuilder.create().withJsonResource(stream).build();
+                    props.putAll(repository.getAllProperties());
+                } catch (Exception ex) {
+                    Exceptions.printStackTrace(ex);

Review comment:
       The same as above.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] dbalek commented on a change in pull request #3897: Support for Micronaut configuration enhanced.

Posted by GitBox <gi...@apache.org>.
dbalek commented on a change in pull request #3897:
URL: https://github.com/apache/netbeans/pull/3897#discussion_r839264554



##########
File path: enterprise/micronaut/src/org/netbeans/modules/micronaut/MicronautConfigProperties.java
##########
@@ -60,6 +94,16 @@ public static boolean hasConfigMetadata(Project project) {
                     Exceptions.printStackTrace(ex);
                 }
             }
+            String customRepository = getCustomRepository(project);
+            if (customRepository != null) {
+                try {
+                    InputStream stream = new ByteArrayInputStream(customRepository.getBytes(StandardCharsets.UTF_8));
+                    ConfigurationMetadataRepository repository = ConfigurationMetadataRepositoryJsonBuilder.create().withJsonResource(stream).build();
+                    props.putAll(repository.getAllProperties());
+                } catch (Exception ex) {
+                    Exceptions.printStackTrace(ex);

Review comment:
       The same as above.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] dbalek commented on a change in pull request #3897: Support for Micronaut configuration enhanced.

Posted by GitBox <gi...@apache.org>.
dbalek commented on a change in pull request #3897:
URL: https://github.com/apache/netbeans/pull/3897#discussion_r839261827



##########
File path: enterprise/micronaut/src/org/netbeans/modules/micronaut/MicronautConfigProperties.java
##########
@@ -60,6 +94,16 @@ public static boolean hasConfigMetadata(Project project) {
                     Exceptions.printStackTrace(ex);

Review comment:
       Why? This way, the exception is printed to log, user gets immediately notified that something was wrong at the particular place, while the upper level functionality could stay (at least partially) working.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists