TelicentPaul commented on code in PR #2164:
URL: https://github.com/apache/jena/pull/2164#discussion_r1448542613


##########
jena-tdb2/src/main/java/org/apache/jena/tdb2/store/NodeIdFactory.java:
##########
@@ -102,7 +102,7 @@ private static NodeId create(int v1, long v2) {
         int t = v1 >> 24;
         NodeIdType type = NodeIdType.intToEnum(t);
         if ( type == NodeIdType.SPECIAL )
-            throw new TDBException(String.format("Attempt to create a special 
from a long: 0x%016", v2));
+            throw new TDBException(String.format("Attempt to create a special 
from a long: 0x%016X", v2));

Review Comment:
   It's admittedly an odd one.  Without the X the format method doesn't know 
what it's doing and will throw an UnknownFormatConversionException. With the X 
it knows that it's hexadecimal, and the preceding numbers tell it how many 
characters to . 
   
   I had to plug it into a wee online [java 
compiler](https://www.programiz.com/java-programming/online-compiler/) just to 
be sure.
   
   ```
   
   public static void main(String[] args) {
           System.out.println(String.format("Will print a 16 character hex: 
0x%016X", 13L));
           System.out.println(String.format("Will throw an exception: 0x%016", 
13L));
   }
   
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to