Github user afs commented on a diff in the pull request:

    https://github.com/apache/jena/pull/199#discussion_r93801615
  
    --- Diff: jena-base/src/main/java/org/apache/jena/atlas/lib/StrUtils.java 
---
    @@ -85,17 +89,20 @@ public static int strCompareIgnoreCase(String s1, 
String s2) {
         }
     
         public static byte[] asUTF8bytes(String s) {
    -        try { return s.getBytes("UTF-8") ; }
    -        catch (UnsupportedEncodingException ex)
    -        { throw new InternalErrorException("UTF-8 not supported!") ; } 
    +        return s.getBytes(UTF_8) ; 
         }
     
         public static String fromUTF8bytes(byte[] bytes) {
    -        try { return new String(bytes, "UTF-8") ; }
    -        catch (UnsupportedEncodingException ex)
    -        { throw new InternalErrorException("UTF-8 not supported!") ; } 
    +        return new String(bytes, UTF_8) ; 
         }
         
    +    /**
    +     * @param x
    +     * @return <null> if x == null, otherwise, x.toString()
    +     * 
    +     * @deprecated prefer {@link Objects#toString(Object, String)} with 
"<null>" or just {@link Objects#toString(Object)} 
    +     */
    +    @Deprecated
         public static String str(Object x) {
    --- End diff --
    
    I suggest we leave this, and not `@Deprecated`.  `str()` is supposed to be 
reminiscent of SPARQL `STR`.  `str(...)` is used elsewhere so this is a pattern.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to