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

    https://github.com/apache/jena/pull/136#discussion_r60230353
  
    --- Diff: jena-arq/src/main/java/org/apache/jena/riot/system/RiotLib.java 
---
    @@ -73,12 +78,37 @@ public static Node createIRIorBNode(String iri)
             return NodeFactory.createURI(iri) ;
         }
     
    -    /** Test whether  */
    -    public static boolean isBNodeIRI(String iri)
    -    {
    +    /** Test whether a IRI is a ARQ-encoded blank node. */
    +    public static boolean isBNodeIRI(String iri) {
             return skolomizedBNodes && iri.startsWith(bNodeLabelStart) ;
         }
         
    +    // These two must be in-step.
    +    /** Function applied to undefined prefixes to convert to a URI string 
*/  
    +    public static final Function<String,String> fixupPrefixes      = (x) 
-> "::"+x ;
    +
    +    /** Function to test for undefined prefix URIs*/  
    +    public static final Predicate<String> testFixupedPrefixURI     = (x) 
-> x.startsWith("::") ;
    +    
    +    /** Test whether a IRI is a ARQ-encoded blank node. */
    +    public static boolean isPrefixIRI(String iri) {
    +        return testFixupedPrefixURI.test(iri) ;
    --- End diff --
    
    Again, just a style thing, maybe personal, but I would rather read:
    ```
    /** Function to test for undefined prefix URIs*/  
        public static final Predicate<String> testFixupedPrefixURI  = 
RiotLib::isPrefixIRI ;
        
    /** Test whether a IRI is a ARQ-encoded blank node. */
        public static boolean isPrefixIRI(String iri) {
            return iri.startsWith("::") ;
        }
    ```
    or even just factor out `testFixupedPrefixURI` for the method reference 
`RiotLib::isPrefixIRI`.


---
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