diff --git a/build.gradle b/build.gradle
index 97f0a33829..7eecb5588f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -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 {
diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xslf/BarChartDemo.java b/poi-examples/src/main/java/org/apache/poi/examples/xslf/BarChartDemo.java
index 3a54f75ced..5ddcd19d4a 100644
--- a/poi-examples/src/main/java/org/apache/poi/examples/xslf/BarChartDemo.java
+++ b/poi-examples/src/main/java/org/apache/poi/examples/xslf/BarChartDemo.java
@@ -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
diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BarAndLineChart.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BarAndLineChart.java
index 32329f2c29..b49871c32a 100644
--- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BarAndLineChart.java
+++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BarAndLineChart.java
@@ -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;
diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BarChart.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BarChart.java
index 8c68fe87a7..7f1f1c5ec6 100644
--- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BarChart.java
+++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BarChart.java
@@ -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);
diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/ExcelChartWithTargetLine.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/ExcelChartWithTargetLine.java
index a80916148a..83b8653297 100644
--- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/ExcelChartWithTargetLine.java
+++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/ExcelChartWithTargetLine.java
@@ -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
*
* Note from original author:
* This only works for Excel since OpenOffice or LibreOffice Calc is not able having series having literal numeric values set.
- *
- * @see Create target marker in a bar chart with openxmlformats
- * @see Change axis color and font of the chart in openxmlformats
- * @see Change colors of line chart Apache POI
*/
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
diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/LineChart.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/LineChart.java
index 724d3e2608..d0cf568e6a 100644
--- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/LineChart.java
+++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/LineChart.java
@@ -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);
diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/ScatterChart.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/ScatterChart.java
index a5ce3c84ae..c74de7f840 100644
--- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/ScatterChart.java
+++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/ScatterChart.java
@@ -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);
diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xwpf/usermodel/BarChartExample.java b/poi-examples/src/main/java/org/apache/poi/examples/xwpf/usermodel/BarChartExample.java
index df79c5199b..d96aaeef61 100644
--- a/poi-examples/src/main/java/org/apache/poi/examples/xwpf/usermodel/BarChartExample.java
+++ b/poi-examples/src/main/java/org/apache/poi/examples/xwpf/usermodel/BarChartExample.java
@@ -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);
}
diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/StreamHelper.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/StreamHelper.java
index c40cef3b2f..39eee4d1d3 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/StreamHelper.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/StreamHelper.java
@@ -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);
diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/DigestOutputStream.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/DigestOutputStream.java
index 077d487bcc..baf8e0a215 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/DigestOutputStream.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/DigestOutputStream.java
@@ -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.");
diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/OOXMLURIDereferencer.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/OOXMLURIDereferencer.java
index cc450fc8ec..c4c988b4de 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/OOXMLURIDereferencer.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/OOXMLURIDereferencer.java
@@ -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;
diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/RelationshipTransformService.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/RelationshipTransformService.java
index d8fc9d4ceb..2bb1c6a4d0 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/RelationshipTransformService.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/RelationshipTransformService.java
@@ -184,7 +184,6 @@ public class RelationshipTransformService extends TransformService {
* and converts it to another XML document.
*
* @see 13.2.4.24 Relationships Transform Algorithm
- * @see XML Relationship Transform Algorithm
*/
public Data transform(Data data, XMLCryptoContext context) throws TransformException {
LOG.atDebug().log("transform(data,context)");
diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/draw/SVGRenderExtension.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/draw/SVGRenderExtension.java
index 8dba51f77e..8e2bb21aed 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/xslf/draw/SVGRenderExtension.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/draw/SVGRenderExtension.java
@@ -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 Gradient paints not working in Apache Batik's svggen
* @see BATIK-1032
*/
@Internal
diff --git a/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/dsig/DummyKeystore.java b/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/dsig/DummyKeystore.java
index a7fbcb6f1d..f3293b845d 100644
--- a/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/dsig/DummyKeystore.java
+++ b/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/dsig/DummyKeystore.java
@@ -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;
diff --git a/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/tests/TestEncryptor.java b/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/tests/TestEncryptor.java
index 4cd6e0e1fd..54c4681150 100644
--- a/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/tests/TestEncryptor.java
+++ b/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/tests/TestEncryptor.java
@@ -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";
diff --git a/poi-ooxml/src/test/java/org/apache/poi/sl/tests/TestFonts.java b/poi-ooxml/src/test/java/org/apache/poi/sl/tests/TestFonts.java
index bd5d190d69..70764a3f6c 100644
--- a/poi-ooxml/src/test/java/org/apache/poi/sl/tests/TestFonts.java
+++ b/poi-ooxml/src/test/java/org/apache/poi/sl/tests/TestFonts.java
@@ -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);
diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFTable.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFTable.java
index e7e52e1c9e..c09849d2f3 100644
--- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFTable.java
+++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFTable.java
@@ -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()) {
diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusBrush.java b/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusBrush.java
index 0e02d12e8e..e713254e9e 100644
--- a/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusBrush.java
+++ b/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusBrush.java
@@ -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 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 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. */
diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/draw/HwmfGraphics.java b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/draw/HwmfGraphics.java
index 701ab2d54e..ecfe21f544 100644
--- a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/draw/HwmfGraphics.java
+++ b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/draw/HwmfGraphics.java
@@ -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;
}
}
diff --git a/poi/src/main/java/org/apache/poi/poifs/crypt/CipherAlgorithm.java b/poi/src/main/java/org/apache/poi/poifs/crypt/CipherAlgorithm.java
index 5ec778617c..58e183aa6f 100644
--- a/poi/src/main/java/org/apache/poi/poifs/crypt/CipherAlgorithm.java
+++ b/poi/src/main/java/org/apache/poi/poifs/crypt/CipherAlgorithm.java
@@ -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;
diff --git a/poi/src/main/java/org/apache/poi/poifs/crypt/standard/StandardDecryptor.java b/poi/src/main/java/org/apache/poi/poifs/crypt/standard/StandardDecryptor.java
index 1624fa97e2..145f9b8bb1 100644
--- a/poi/src/main/java/org/apache/poi/poifs/crypt/standard/StandardDecryptor.java
+++ b/poi/src/main/java/org/apache/poi/poifs/crypt/standard/StandardDecryptor.java
@@ -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());
diff --git a/poi/src/main/java/org/apache/poi/poifs/nio/FileBackedDataSource.java b/poi/src/main/java/org/apache/poi/poifs/nio/FileBackedDataSource.java
index 31e439fb5d..59e8ab6cee 100644
--- a/poi/src/main/java/org/apache/poi/poifs/nio/FileBackedDataSource.java
+++ b/poi/src/main/java/org/apache/poi/poifs/nio/FileBackedDataSource.java
@@ -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 buffersToClean = new IdentityHashMap<>();
public FileBackedDataSource(File file) throws FileNotFoundException {
diff --git a/poi/src/main/java/org/apache/poi/sl/draw/DrawFontManager.java b/poi/src/main/java/org/apache/poi/sl/draw/DrawFontManager.java
index 72216b36bd..136f2bdbc2 100644
--- a/poi/src/main/java/org/apache/poi/sl/draw/DrawFontManager.java
+++ b/poi/src/main/java/org/apache/poi/sl/draw/DrawFontManager.java
@@ -69,7 +69,6 @@ public interface DrawFontManager {
*
* @return String with mapped codepoints
*
- * @see Drawing exotic fonts in a java applet
* @see StringUtil#mapMsCodepointString(String)
*/
String mapFontCharset(Graphics2D graphics, FontInfo fontInfo, String text);
diff --git a/poi/src/main/java/org/apache/poi/sl/draw/DrawPaint.java b/poi/src/main/java/org/apache/poi/sl/draw/DrawPaint.java
index 01064dd8a4..78a24335a3 100644
--- a/poi/src/main/java/org/apache/poi/sl/draw/DrawPaint.java
+++ b/poi/src/main/java/org/apache/poi/sl/draw/DrawPaint.java
@@ -410,7 +410,6 @@ public class DrawPaint {
*
* @see Using Office Open XML to Customize Document Formatting in the 2007 Office System
* @see saturation modulation (satMod)
- * @see Office Open XML satMod results in more than 100% saturation
*/
public static Color applyColorTransform(ColorStyle color){
// TODO: The colors don't match 100% the results of Powerpoint, maybe because we still
diff --git a/poi/src/main/java/org/apache/poi/sl/draw/DrawTextFragment.java b/poi/src/main/java/org/apache/poi/sl/draw/DrawTextFragment.java
index 7bc23cfa7c..e0e3bfe7d5 100644
--- a/poi/src/main/java/org/apache/poi/sl/draw/DrawTextFragment.java
+++ b/poi/src/main/java/org/apache/poi/sl/draw/DrawTextFragment.java
@@ -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;
}
diff --git a/poi/src/main/java/org/apache/poi/util/XMLHelper.java b/poi/src/main/java/org/apache/poi/util/XMLHelper.java
index 58917e25d4..c9a68716cd 100644
--- a/poi/src/main/java/org/apache/poi/util/XMLHelper.java
+++ b/poi/src/main/java/org/apache/poi/util/XMLHelper.java
@@ -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();
diff --git a/poi/src/test/java/org/apache/poi/util/MemoryLeakVerifier.java b/poi/src/test/java/org/apache/poi/util/MemoryLeakVerifier.java
index d4f228b706..0b9b599b3c 100644
--- a/poi/src/test/java/org/apache/poi/util/MemoryLeakVerifier.java
+++ b/poi/src/test/java/org/apache/poi/util/MemoryLeakVerifier.java
@@ -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;