]> source.dussan.org Git - poi.git/commitdiff
remove and prevent links to stackoverflow
authorAndreas Beeker <kiwiwings@apache.org>
Mon, 10 Jan 2022 22:06:26 +0000 (22:06 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Mon, 10 Jan 2022 22:06:26 +0000 (22:06 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1896899 13f79535-47bb-0310-9956-ffa450edef68

27 files changed:
build.gradle
poi-examples/src/main/java/org/apache/poi/examples/xslf/BarChartDemo.java
poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BarAndLineChart.java
poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BarChart.java
poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/ExcelChartWithTargetLine.java
poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/LineChart.java
poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/ScatterChart.java
poi-examples/src/main/java/org/apache/poi/examples/xwpf/usermodel/BarChartExample.java
poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/StreamHelper.java
poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/DigestOutputStream.java
poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/OOXMLURIDereferencer.java
poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/RelationshipTransformService.java
poi-ooxml/src/main/java/org/apache/poi/xslf/draw/SVGRenderExtension.java
poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/dsig/DummyKeystore.java
poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/tests/TestEncryptor.java
poi-ooxml/src/test/java/org/apache/poi/sl/tests/TestFonts.java
poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFTable.java
poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusBrush.java
poi-scratchpad/src/main/java/org/apache/poi/hwmf/draw/HwmfGraphics.java
poi/src/main/java/org/apache/poi/poifs/crypt/CipherAlgorithm.java
poi/src/main/java/org/apache/poi/poifs/crypt/standard/StandardDecryptor.java
poi/src/main/java/org/apache/poi/poifs/nio/FileBackedDataSource.java
poi/src/main/java/org/apache/poi/sl/draw/DrawFontManager.java
poi/src/main/java/org/apache/poi/sl/draw/DrawPaint.java
poi/src/main/java/org/apache/poi/sl/draw/DrawTextFragment.java
poi/src/main/java/org/apache/poi/util/XMLHelper.java
poi/src/test/java/org/apache/poi/util/MemoryLeakVerifier.java

index 97f0a338296a70b7d5137c3528abc1cb40f0c151..7eecb5588f91b71fef65ed54ef6e46252ac1f929 100644 (file)
@@ -314,7 +314,7 @@ subprojects {
 
         // http://forums.gradle.org/gradle/topics/jacoco_related_failure_in_multiproject_build
         systemProperties['user.dir'] = workingDir
-        systemProperties['java.io.tmpdir'] = 'build' 
+        systemProperties['java.io.tmpdir'] = 'build'
 
         systemProperties['POI.testdata.path'] = '../test-data'
 
@@ -759,6 +759,26 @@ distributions {
 binDistZip.dependsOn 'zipJavadocs', ':poi-ooxml-lite:jar'
 binDistTar.dependsOn 'zipJavadocs', ':poi-ooxml-lite:jar'
 
+task soLinkCheck() {
+    doLast {
+        def path = ant.path {
+            fileset(dir: '.', includes: '**/*.java') {
+                exclude(name: 'build.gradle')
+                contains(text: 'stackoverflow.com')
+            }
+        }
+
+        path.list().each {
+            println it
+        }
+
+        if (path.size() > 0) {
+            // #65796 - minimize notifications about non-asf open source
+            throw new GradleException('License issue found - conceal the link and contradict any findings m(')
+        }
+    }
+}
+
 var srcDep = [
     ':poi:cacheJava9',
     ':poi:cacheTest9',
@@ -778,7 +798,8 @@ var srcDep = [
 
 srcDistTar.dependsOn srcDep
 srcDistZip.dependsOn srcDep
-rat.dependsOn srcDep
+soLinkCheck.dependsOn srcDep
+rat.dependsOn soLinkCheck
 
 task fixDistDir {
     doLast {
index 3a54f75ced534efda037ea61185e8bf9ea5365b2..5ddcd19d4a45a7819313e36252bd2dcad3fd9a37 100644 (file)
@@ -124,7 +124,7 @@ public final class BarChartDemo {
         series2.setTitle(series[1], chart.setSheetTitle(series[1], COLUMN_SPEAKERS));
 
         chart.plot(bar);
-        chart.setTitleText(chartTitle); // https://stackoverflow.com/questions/30532612
+        chart.setTitleText(chartTitle);
         // chart.setTitleOverlay(overlay);
 
         // adjust font size for readability
index 32329f2c297ba58aad615d1fc7f0f879f695601b..b49871c32a5a3b4f94eda17730577f84dd474ae5 100644 (file)
@@ -58,10 +58,6 @@ import org.apache.poi.xssf.usermodel.XSSFRow;
 import org.apache.poi.xssf.usermodel.XSSFSheet;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 
-// original contributions by Axel Richter on https://stackoverflow.com/questions/47065690
-// additional title formatting from https://stackoverflow.com/questions/50418856
-// and legend positioning from https://stackoverflow.com/questions/49615379
-// this would probably be an answer for https://stackoverflow.com/questions/36447925 too
 public final class BarAndLineChart {
 
     private static final int NUM_OF_ROWS = 7;
index 8c68fe87a71e3cca0177ad0cc15b1c0f14c49664..7f1f1c5ec64c08794f2d117791804b20f9ae2abe 100644 (file)
@@ -79,7 +79,7 @@ public final class BarChart {
 
             // Use a category axis for the bottom axis.
             XDDFCategoryAxis bottomAxis = chart.createCategoryAxis(AxisPosition.BOTTOM);
-            bottomAxis.setTitle("x"); // https://stackoverflow.com/questions/32010765
+            bottomAxis.setTitle("x");
             XDDFValueAxis leftAxis = chart.createValueAxis(AxisPosition.LEFT);
             leftAxis.setTitle("f(x)");
             leftAxis.setCrosses(AxisCrosses.AUTO_ZERO);
@@ -90,7 +90,7 @@ public final class BarChart {
 
             XDDFChartData data = chart.createData(ChartTypes.BAR, bottomAxis, leftAxis);
             XDDFChartData.Series series1 = data.addSeries(xs, ys1);
-            series1.setTitle("2x", null); // https://stackoverflow.com/questions/21855842
+            series1.setTitle("2x", null);
             XDDFChartData.Series series2 = data.addSeries(xs, ys2);
             series2.setTitle("3x", null);
             chart.plot(data);
index a80916148a79ccb45503a9723e3eecc8f065c0da..83b8653297321ffaa2354db994abef7942eb7b10 100644 (file)
@@ -53,14 +53,10 @@ import org.apache.poi.xssf.usermodel.XSSFSheet;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 
 /**
- * This example is based on original contributions by Axel Richter on StackOverflow.
+ * This example is based on original contributions by Axel Richter
  *
  * <em>Note from original author</em>:
  * This only works for Excel since OpenOffice or LibreOffice Calc is not able having series having literal numeric values set.
- *
- * @see <a href="https://stackoverflow.com/questions/50772989/">Create target marker in a bar chart with openxmlformats</a>
- * @see <a href="https://stackoverflow.com/questions/50873700/">Change axis color and font of the chart in openxmlformats</a>
- * @see <a href="https://stackoverflow.com/questions/51530552/">Change colors of line chart Apache POI</a>
  */
 public final class ExcelChartWithTargetLine {
     private ExcelChartWithTargetLine() {}
@@ -91,7 +87,6 @@ public final class ExcelChartWithTargetLine {
         leftValues.crossAxis(barCategories);
         barCategories.crossAxis(leftValues);
 
-        // from https://stackoverflow.com/questions/50873700/
         // colored major grid lines
         leftValues.getOrAddMajorGridProperties().setLineProperties(solidTomato);
         //colored axis line
@@ -167,7 +162,6 @@ public final class ExcelChartWithTargetLine {
         }
 
 
-        // from https://stackoverflow.com/questions/51530552/
         // customize the chart
 
         // do not auto delete the title
index 724d3e26089a3f9c5e23a105e933446112d5a4b9..d0cf568e6a829e1b1f9da6d6026448e4fdfb7e87 100644 (file)
@@ -78,7 +78,7 @@ public final class LineChart {
 
             // Use a category axis for the bottom axis.
             XDDFCategoryAxis bottomAxis = chart.createCategoryAxis(AxisPosition.BOTTOM);
-            bottomAxis.setTitle("x"); // https://stackoverflow.com/questions/32010765
+            bottomAxis.setTitle("x");
             XDDFValueAxis leftAxis = chart.createValueAxis(AxisPosition.LEFT);
             leftAxis.setTitle("f(x)");
             leftAxis.setCrosses(AxisCrosses.AUTO_ZERO);
@@ -89,20 +89,19 @@ public final class LineChart {
 
             XDDFLineChartData data = (XDDFLineChartData) chart.createData(ChartTypes.LINE, bottomAxis, leftAxis);
             XDDFLineChartData.Series series1 = (XDDFLineChartData.Series) data.addSeries(xs, ys1);
-            series1.setTitle("2x", null); // https://stackoverflow.com/questions/21855842
-            series1.setSmooth(false); // https://stackoverflow.com/questions/29014848
-            series1.setMarkerStyle(MarkerStyle.STAR); // https://stackoverflow.com/questions/39636138
+            series1.setTitle("2x", null);
+            series1.setSmooth(false);
+            series1.setMarkerStyle(MarkerStyle.STAR);
             XDDFLineChartData.Series series2 = (XDDFLineChartData.Series) data.addSeries(xs, ys2);
             series2.setTitle("3x", null);
             series2.setSmooth(true);
             series2.setMarkerSize((short) 6);
-            series2.setMarkerStyle(MarkerStyle.TRIANGLE); // https://stackoverflow.com/questions/39636138
+            series2.setMarkerStyle(MarkerStyle.TRIANGLE);
             chart.plot(data);
 
-            // if your series have missing values like https://stackoverflow.com/questions/29014848
+            // if your series have missing values
             // chart.displayBlanksAs(DisplayBlanks.GAP);
 
-            // https://stackoverflow.com/questions/24676460
             solidLineSeries(data, 0, PresetColor.CHARTREUSE);
             solidLineSeries(data, 1, PresetColor.TURQUOISE);
 
index a5ce3c84ae9bf58d45dfdfa024c15d4d99a59ad3..c74de7f84022905aea339e7d7bd1815e993b2f74 100644 (file)
@@ -78,7 +78,7 @@ public final class ScatterChart {
             legend.setPosition(LegendPosition.TOP_RIGHT);
 
             XDDFValueAxis bottomAxis = chart.createValueAxis(AxisPosition.BOTTOM);
-            bottomAxis.setTitle("x"); // https://stackoverflow.com/questions/32010765
+            bottomAxis.setTitle("x");
             XDDFValueAxis leftAxis = chart.createValueAxis(AxisPosition.LEFT);
             leftAxis.setTitle("f(x)");
             leftAxis.setCrosses(AxisCrosses.AUTO_ZERO);
@@ -90,8 +90,8 @@ public final class ScatterChart {
 
             XDDFScatterChartData data = (XDDFScatterChartData) chart.createData(ChartTypes.SCATTER, bottomAxis, leftAxis);
             XDDFScatterChartData.Series series1 = (XDDFScatterChartData.Series) data.addSeries(xs, ys1);
-            series1.setTitle("2x", null); // https://stackoverflow.com/questions/21855842
-            series1.setSmooth(false); // https://stackoverflow.com/questions/39636138
+            series1.setTitle("2x", null);
+            series1.setSmooth(false);
             XDDFScatterChartData.Series series2 = (XDDFScatterChartData.Series) data.addSeries(xs, ys2);
             series2.setTitle("3x", null);
             chart.plot(data);
index df79c5199b03a5d1219bfb05ca4106fd5cff4ada..d96aaeef6183436acb82cd8978367981623618d3 100644 (file)
@@ -123,7 +123,7 @@ public final class BarChartExample {
         series2.setTitle(series[1], chart.setSheetTitle(series[1], 1));
 
         chart.plot(bar);
-        chart.setTitleText(chartTitle); // https://stackoverflow.com/questions/30532612
+        chart.setTitleText(chartTitle);
         chart.setTitleOverlay(false);
     }
 
index c40cef3b2f0994abe7a5ca756f38675ee43ff7ea..39eee4d1d3b1bf763509e3d753ee55792556ff37 100644 (file)
@@ -73,7 +73,6 @@ public final class StreamHelper {
             trans.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
             // don't indent xml documents, the indent will cause errors in calculating the xml signature
             // because of different handling of linebreaks in Windows/Unix
-            // see https://stackoverflow.com/questions/36063375
             trans.setOutputProperty(OutputKeys.INDENT, "no");
             trans.setOutputProperty(OutputKeys.STANDALONE, "yes");
             trans.transform(xmlSource, outputTarget);
index 077d487bccb3885887f619ee3150d32f662b09f9..baf8e0a21586a2df4e03385a4e8bf95d60200d89 100644 (file)
@@ -46,8 +46,7 @@ import org.ietf.jgss.Oid;
 
     public void init() throws GeneralSecurityException {
         if (isMSCapi(key)) {
-            // see https://stackoverflow.com/questions/39196145 for problems with SunMSCAPI
-            // and why we can't sign the calculated digest
+            // SunMSCAPI can't be used to sign the calculated digest
             throw new EncryptedDocumentException(
                 "Windows keystore entries can't be signed with the "+algo+" hash. Please "+
                 "use one digest algorithm of sha1 / sha256 / sha384 / sha512.");
index cc450fc8ec67c4f8fe2397229cafa48725bfe6ce..c4c988b4de2ef495cb8ad0b10ab00899a171157c 100644 (file)
@@ -90,7 +90,6 @@ public class OOXMLURIDereferencer implements URIDereferencer {
             if (part.getPartName().toString().endsWith(".rels")) {
                 // although xmlsec has an option to ignore line breaks, currently this
                 // only affects .rels files, so we only modify these
-                // http://stackoverflow.com/questions/4728300
                 try (UnsynchronizedByteArrayOutputStream bos = new UnsynchronizedByteArrayOutputStream()) {
                     for (int ch; (ch = dataStream.read()) != -1; ) {
                         if (ch == 10 || ch == 13) continue;
index d8fc9d4ceb2cb7255986e939846c97b6b1ae4f80..2bb1c6a4d007f640161d2465647b19ff58994a95 100644 (file)
@@ -184,7 +184,6 @@ public class RelationshipTransformService extends TransformService {
      * and converts it to another XML document.
      *
      * @see <a href="https://www.ecma-international.org/activities/Office%20Open%20XML%20Formats/Draft%20ECMA-376%203rd%20edition,%20March%202011/Office%20Open%20XML%20Part%202%20-%20Open%20Packaging%20Conventions.pdf">13.2.4.24 Relationships Transform Algorithm</a>
-     * @see <a href="https://stackoverflow.com/questions/36063375">XML Relationship Transform Algorithm</a>
      */
     public Data transform(Data data, XMLCryptoContext context) throws TransformException {
         LOG.atDebug().log("transform(data,context)");
index 8dba51f77e81ad4b6e11a96aec545ef2c7a0ae89..8e2bb21aed1cc2bc7792e6efeef4701659b93cb2 100644 (file)
@@ -81,7 +81,6 @@ import org.w3c.dom.Element;
  * Taken (with permission) from https://gist.github.com/msteiger/4509119,
  * including the fixes that are discussed in the comments
  *
- * @see <a href="https://stackoverflow.com/questions/14258206/">Gradient paints not working in Apache Batik's svggen</a>
  * @see <a href="https://issues.apache.org/jira/browse/BATIK-1032">BATIK-1032</a>
  */
 @Internal
index a7fbcb6f1d0da71cfd8a046a1aed6d77097f1260..f3293b845db1851492df75a1faa005e48439be6a 100644 (file)
@@ -153,7 +153,6 @@ public class DummyKeystore {
     }
 
     public KeyCertPair addEntryFromPEM(File pemFile, String keyPass) throws IOException, CertificateException, KeyStoreException {
-        // see https://stackoverflow.com/questions/11787571/how-to-read-pem-file-to-get-private-and-public-key
         PrivateKey key = null;
         X509Certificate x509 = null;
 
index 4cd6e0e1fd83cc70c55fe8b1ec7b258476435038..54c468115033057dd634803262f3443c9104afae 100644 (file)
@@ -327,8 +327,7 @@ class TestEncryptor {
     /**
      * Ensure we can encrypt a package that is missing the Core
      *  Properties, eg one from dodgy versions of Jasper Reports
-     * See https://github.com/nestoru/xlsxenc/ and
-     * http://stackoverflow.com/questions/28593223
+     * See https://github.com/nestoru/xlsxenc/
      */
     @Test
     void encryptPackageWithoutCoreProperties() throws Exception {
@@ -513,9 +512,7 @@ class TestEncryptor {
         aehHeader.setHashAlgorithm(HashAlgorithm.sha1);
         AgileEncryptionVerifier aehVerifier = (AgileEncryptionVerifier)eiNew.getVerifier();
 
-        // this cast might look strange - if the setters would be public, it will become obsolete
-        // see http://stackoverflow.com/questions/5637650/overriding-protected-methods-in-java
-        ((EncryptionVerifier)aehVerifier).setCipherAlgorithm(CipherAlgorithm.aes256);
+        aehVerifier.setCipherAlgorithm(CipherAlgorithm.aes256);
         aehVerifier.setHashAlgorithm(HashAlgorithm.sha512);
 
         Encryptor enc = eiNew.getEncryptor();
@@ -590,7 +587,6 @@ class TestEncryptor {
 
     @Test
     void smallFile() throws IOException, GeneralSecurityException {
-        // see https://stackoverflow.com/questions/61463301
         final int tinyFileSize = 80_000_000;
         final String pass = "s3cr3t";
 
index bd5d190d69a68461147fc593bc6e878a6cdbb7f3..70764a3f6cf32334ebe2ecdfa929c2b6ed5f3490 100644 (file)
@@ -128,8 +128,6 @@ class TestFonts {
 
     private void setFont(TextBox<?,?> tb, String fontFamily, FontGroup fontGroup) {
         // TODO: set east asian font family - MS Office uses "MS Mincho" or "MS Gothic" as a fallback
-        // see https://stackoverflow.com/questions/26063828 for good explanation about the font metrics
-        // differences on different environments
         for (TextParagraph<?,?,? extends TextRun> p : tb.getTextParagraphs()) {
             for (TextRun r : p.getTextRuns()) {
                 r.setFontFamily(fontFamily, fontGroup);
index e7e52e1c9eb1c25b62048a93d6d07af538815926..c09849d2f31b25491364209af0b8e545486b5a20 100644 (file)
@@ -487,9 +487,6 @@ public final class TestXSSFTable {
         }
     }
 
-    /**
-     * See https://stackoverflow.com/questions/44407111/apache-poi-cant-format-filled-cells-as-numeric
-     */
     @Test
     void testNumericCellsInTable() throws IOException {
         try (XSSFWorkbook wb = new XSSFWorkbook()) {
index 0e02d12e8eb64d71fdf2dc835c3705f6e252c8e1..e713254e9e53c48387734824cee2910a71c38969 100644 (file)
@@ -677,37 +677,6 @@ public class HemfPlusBrush {
             Color inter = DrawPaint.SCRGB2RGB(r,g,b);
             return new Color(inter.getRed(), inter.getGreen(), inter.getBlue(), a);
         }
-
-        /*
-        private Color interpolateColorsHSL(final double factor) {
-            final double[] hslStart = DrawPaint.RGB2HSL(startColor);
-            final double[] hslStop = DrawPaint.RGB2HSL(endColor);
-
-            BiFunction<Number,Number,Double> linearInter = (start, stop) ->
-                start.doubleValue()+(stop.doubleValue()-start.doubleValue())*factor;
-
-            double alpha = linearInter.apply(startColor.getAlpha(),endColor.getAlpha());
-            double sat = linearInter.apply(hslStart[1],hslStop[1]);
-            double lum = linearInter.apply(hslStart[2],hslStop[2]);
-
-            // find closest match - decide if need to go clockwise or counter-clockwise
-            // https://stackoverflow.com/questions/1416560/hsl-interpolation
-            double hueMidCW = (hslStart[0]+hslStop[0])/2.;
-            double hueMidCCW = (hslStart[0]+hslStop[0]+360.)/2.;
-
-            Function<Double,Double> hueDelta = (hue) ->
-                Math.min(Math.abs(hslStart[0]-hue), Math.abs(hslStop[0]-hue));
-
-            double hslDiff;
-            if (hueDelta.apply(hueMidCW) > hueDelta.apply(hueMidCCW)) {
-                hslDiff = (hslStart[0] < hslStop[0]) ? hslStop[0]-hslStart[0] : (360-hslStart[0])+hslStop[0];
-            } else {
-                hslDiff = (hslStart[0] < hslStop[0]) ? -hslStart[0]-(360-hslStop[0]) : -(hslStart[0]-hslStop[0]);
-            }
-            double hue = (hslStart[0]+hslDiff*factor)%360.;
-
-            return DrawPaint.HSL2RGB(hue, sat, lum, alpha/255.);
-        } */
     }
 
     /** The EmfPlusPathGradientBrushData object specifies a path gradient for a graphics brush. */
index 701ab2d54e6bca4fb6996e7211115143a6a2aa94..ecfe21f544f3376bf1b1fe771bc350d1ae899b89 100644 (file)
@@ -619,8 +619,6 @@ public class HwmfGraphics implements HwmfCharsetAware {
             // TODO: fix font height calculation
             // the height is given as font size + ascent + descent
             // as an approximation we reduce the height by a static factor
-            //
-            // see https://stackoverflow.com/a/26564924/2066598 on to get the font size from the cell height
             return fontHeight*3/4;
         }
     }
index 5ec778617c1ac158ca10b476a79d68341901f10a..58e183aa6f092ba1a46ceef758686b30a96d27ee 100644 (file)
@@ -32,7 +32,6 @@ public enum CipherAlgorithm {
     // desx is not supported. Not sure, if it can be simulated by des3 somehow
     des3(null, "DESede", -1, 192, new int[]{192}, 8, 32, "3DES", false),
     // need bouncycastle provider for this one ...
-    // see http://stackoverflow.com/questions/4436397/3des-des-encryption-using-the-jce-generating-an-acceptable-key
     des3_112(null, "DESede", -1, 128, new int[]{128}, 8, 32, "3DES_112", true),
     // only for digital signatures
     rsa(null, "RSA", -1, 1024, new int[]{1024, 2048, 3072, 4096}, -1, -1, "", false);
@@ -46,7 +45,7 @@ public enum CipherAlgorithm {
     public final int encryptedVerifierHashLength;
     public final String xmlId;
     public final boolean needsBouncyCastle;
-    
+
     CipherAlgorithm(CipherProvider provider, String jceId, int ecmaId, int defaultKeySize, int[] allowedKeySize, int blockSize, int encryptedVerifierHashLength, String xmlId, boolean needsBouncyCastle) {
         this.provider = provider;
         this.jceId = jceId;
@@ -65,7 +64,7 @@ public enum CipherAlgorithm {
         }
         throw new EncryptedDocumentException("cipher algorithm " + ecmaId + " not found");
     }
-    
+
     public static CipherAlgorithm fromXmlId(String xmlId, int keySize) {
         for (CipherAlgorithm ca : CipherAlgorithm.values()) {
             if (!ca.xmlId.equals(xmlId)) continue;
index 1624fa97e28301150fdc7f2e99bd10c60f5662fe..145f9b8bb11f7decd20a6e848f378007fee301c6 100644 (file)
@@ -136,7 +136,6 @@ public class StandardDecryptor extends Decryptor {
         }
         // limit wrong calculated ole entries - (bug #57080)
         // standard encryption always uses aes encoding, so blockSize is always 16
-        // http://stackoverflow.com/questions/3283787/size-of-data-after-aes-encryption
         int blockSize = getEncryptionInfo().getHeader().getCipherAlgorithm().blockSize;
         long cipherLen = (_length/blockSize + 1) * blockSize;
         Cipher cipher = getCipher(getSecretKey());
index 31e439fb5dc6f603367f90cfcecb468a92634e6d..59e8ab6cee11883e45ba26c25acdbdcc82316c8e 100644 (file)
@@ -51,9 +51,6 @@ public class FileBackedDataSource extends DataSource implements Closeable {
     // therefore we need to keep the list of mapped buffers and do some ugly reflection to try to
     // clean the buffer during close().
     // See https://bz.apache.org/bugzilla/show_bug.cgi?id=58480,
-    // http://stackoverflow.com/questions/3602783/file-access-synchronized-on-java-object and
-    // http://bugs.java.com/view_bug.do?bug_id=4724038 for related discussions
-    // https://stackoverflow.com/questions/36077641/java-when-does-direct-buffer-released
     private final IdentityHashMap<ByteBuffer,ByteBuffer> buffersToClean = new IdentityHashMap<>();
 
     public FileBackedDataSource(File file) throws FileNotFoundException {
index 72216b36bdd444647d3b65aa1fc4907a2717147b..136f2bdbc257c48b8c914dca8e7fba46345a7d24 100644 (file)
@@ -69,7 +69,6 @@ public interface DrawFontManager {
      *
      * @return String with mapped codepoints
      *
-     * @see <a href="http://stackoverflow.com/questions/8692095">Drawing exotic fonts in a java applet</a>
      * @see StringUtil#mapMsCodepointString(String)
      */
     String mapFontCharset(Graphics2D graphics, FontInfo fontInfo, String text);
index 01064dd8a4acff46fe0c4c833418cbba9c831c28..78a24335a369ec12dd8493b71c9a92f2de241458 100644 (file)
@@ -410,7 +410,6 @@ public class DrawPaint {
      *
      * @see <a href="https://msdn.microsoft.com/en-us/library/dd560821%28v=office.12%29.aspx">Using Office Open XML to Customize Document Formatting in the 2007 Office System</a>
      * @see <a href="https://social.msdn.microsoft.com/Forums/office/en-US/040e0a1f-dbfe-4ce5-826b-38b4b6f6d3f7/saturation-modulation-satmod">saturation modulation (satMod)</a>
-     * @see <a href="http://stackoverflow.com/questions/6754127/office-open-xml-satmod-results-in-more-than-100-saturation">Office Open XML satMod results in more than 100% saturation</a>
      */
     public static Color applyColorTransform(ColorStyle color){
         // TODO: The colors don't match 100% the results of Powerpoint, maybe because we still
index 7bc23cfa7c5ca399be515dc087ce72a21397a4ed..e0e3bfe7d5c04088b2160c2b9991a90c819fb4f1 100644 (file)
@@ -101,7 +101,6 @@ public class DrawTextFragment implements Drawable  {
         double l = layout.getLeading();
 
         if (l == 0) {
-            // see https://stackoverflow.com/questions/925147
             // we use a 115% value instead of the 120% proposed one, as this seems to be closer to LO/OO
             l = (layout.getAscent()+layout.getDescent())*0.15;
         }
index 58917e25d4a5101fa8ec92d693769c788630f8d9..c9a68716cd362f8cfac3ea882e1e31f817c0c8c5 100644 (file)
@@ -81,7 +81,6 @@ public final class XMLHelper {
     private static long lastLog;
 
     // DocumentBuilderFactory.newDocumentBuilder is thread-safe
-    // see https://stackoverflow.com/questions/12455602/is-documentbuilder-thread-safe
     private static final DocumentBuilderFactory documentBuilderFactory = getDocumentBuilderFactory();
 
     private static final SAXParserFactory saxFactory = getSaxParserFactory();
index d4f228b706e6e6502dcf70948b9429f7703bc642..0b9b599b3cc8cffcfad67894f4071d04f09742e8 100644 (file)
@@ -44,8 +44,6 @@ import java.util.List;
  *
  * This will verify at the end of the test if the object is actually removed by the
  * garbage collector or if it lingers in memory for some reason.
- *
- * Idea taken from http://stackoverflow.com/a/7410460/411846
  */
 public class MemoryLeakVerifier {
     private static final int MAX_GC_ITERATIONS = 50;