pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1861725 - /pdfbox/branches/issue45/debugger/src/main/java/org/apache/pdfbox/debugger/hexviewer/HexPane.java
Date Fri, 21 Jun 2019 03:50:45 GMT
Author: tilman
Date: Fri Jun 21 03:50:45 2019
New Revision: 1861725

URL: http://svn.apache.org/viewvc?rev=1861725&view=rev
Log:
PDFBOX-2941: SonarQube fix + reformat

Modified:
    pdfbox/branches/issue45/debugger/src/main/java/org/apache/pdfbox/debugger/hexviewer/HexPane.java

Modified: pdfbox/branches/issue45/debugger/src/main/java/org/apache/pdfbox/debugger/hexviewer/HexPane.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue45/debugger/src/main/java/org/apache/pdfbox/debugger/hexviewer/HexPane.java?rev=1861725&r1=1861724&r2=1861725&view=diff
==============================================================================
--- pdfbox/branches/issue45/debugger/src/main/java/org/apache/pdfbox/debugger/hexviewer/HexPane.java
(original)
+++ pdfbox/branches/issue45/debugger/src/main/java/org/apache/pdfbox/debugger/hexviewer/HexPane.java
Fri Jun 21 03:50:45 2019
@@ -170,15 +170,15 @@ class HexPane extends JPanel implements
      */
     private int getIndexForPoint(Point point)
     {
-        if (point.x <= 20 || point.x >= (16 * HexView.CHAR_WIDTH)+20 )
+        if (point.x <= 20 || point.x >= (16 * HexView.CHAR_WIDTH) + 20)
         {
             return -1;
         }
         int y = point.y;
-        int lineNumber = (y+ (HexView.CHAR_HEIGHT -(y % HexView.CHAR_HEIGHT)))/ HexView.CHAR_HEIGHT;
+        int lineNumber = (y + (HexView.CHAR_HEIGHT - (y % HexView.CHAR_HEIGHT))) / HexView.CHAR_HEIGHT;
         int x = point.x - 20;
-        int elementNumber = (x / HexView.CHAR_WIDTH);
-        return  (lineNumber-1) * 16 + elementNumber;
+        int elementNumber = x / HexView.CHAR_WIDTH;
+        return (lineNumber - 1) * 16 + elementNumber;
     }
 
     /**



Mime
View raw message