You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by GitBox <gi...@apache.org> on 2021/12/14 18:51:40 UTC

[GitHub] [lucenenet] NightOwl888 opened a new pull request #578: Lucene.Net.Facet: Added culture-sensitve ToString() overload on FacetResult and LabelAndValue

NightOwl888 opened a new pull request #578:
URL: https://github.com/apache/lucenenet/pull/578


   Added overload of `ToString()` that accepts `IFormatProvider` to `FacetResult` and `LabelAndValue` classes. Also implemented `IFormattable` on both classes.
   
   The default format has changed from invariant culture to current culture to match .NET.


-- 
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: dev-unsubscribe@lucenenet.apache.org

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



[GitHub] [lucenenet] NightOwl888 merged pull request #578: Lucene.Net.Facet: Added culture-sensitve ToString() overload on FacetResult and LabelAndValue

Posted by GitBox <gi...@apache.org>.
NightOwl888 merged pull request #578:
URL: https://github.com/apache/lucenenet/pull/578


   


-- 
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: dev-unsubscribe@lucenenet.apache.org

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



[GitHub] [lucenenet] eladmarg commented on a change in pull request #578: Lucene.Net.Facet: Added culture-sensitve ToString() overload on FacetResult and LabelAndValue

Posted by GitBox <gi...@apache.org>.
eladmarg commented on a change in pull request #578:
URL: https://github.com/apache/lucenenet/pull/578#discussion_r768975140



##########
File path: src/Lucene.Net.Facet/FacetResult.cs
##########
@@ -4,6 +4,7 @@
 using System.Diagnostics.CodeAnalysis;
 using System.Globalization;
 using System.Text;
+#nullable enable

Review comment:
       why this is needed?




-- 
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: dev-unsubscribe@lucenenet.apache.org

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



[GitHub] [lucenenet] NightOwl888 commented on a change in pull request #578: Lucene.Net.Facet: Added culture-sensitve ToString() overload on FacetResult and LabelAndValue

Posted by GitBox <gi...@apache.org>.
NightOwl888 commented on a change in pull request #578:
URL: https://github.com/apache/lucenenet/pull/578#discussion_r768982748



##########
File path: src/Lucene.Net.Facet/FacetResult.cs
##########
@@ -4,6 +4,7 @@
 using System.Diagnostics.CodeAnalysis;
 using System.Globalization;
 using System.Text;
+#nullable enable

Review comment:
       This is just to enabled the [nullable reference type](https://docs.microsoft.com/en-us/dotnet/csharp/nullable-references) feature. It allows us to make it explicit that `IFormatProvider` accepts a `null` value (which causes it to use the current culture).
   
   I am slowly going through and adding this (rather inconsistently) instead of making a separate task. Since the project is large, enabling this feature at the project level isn't practical. While this doesn't seem to make a lot of sense on small files, enabling this on larger files does help to identify potential `null` reference bugs so they can be avoided. The whole `J2N` library was converted to use this and it turned out to be helpful.




-- 
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: dev-unsubscribe@lucenenet.apache.org

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