svn commit: r1790180 - in /tomcat/trunk: java/org/apache/catalina/util/ExtensionValidator.java java/org/apache/catalina/webresources/JarWarResourceSet.java test/org/apache/catalina/webresources/TestJa

2017-04-05 Thread violetagg
Author: violetagg
Date: Wed Apr  5 07:06:13 2017
New Revision: 1790180

URL: http://svn.apache.org/viewvc?rev=1790180&view=rev
Log:
add missing copyright header
ws police

Modified:
tomcat/trunk/java/org/apache/catalina/util/ExtensionValidator.java
tomcat/trunk/java/org/apache/catalina/webresources/JarWarResourceSet.java

tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java

Modified: tomcat/trunk/java/org/apache/catalina/util/ExtensionValidator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/util/ExtensionValidator.java?rev=1790180&r1=1790179&r2=1790180&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/util/ExtensionValidator.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/util/ExtensionValidator.java Wed Apr  
5 07:06:13 2017
@@ -152,9 +152,9 @@ public final class ExtensionValidator {
 String jarName = manifestResource.getURL().toExternalForm();
 Manifest jmanifest = manifestResource.getManifest();
 if (jmanifest != null) {
-   ManifestResource mre = new ManifestResource(jarName,
-   jmanifest, ManifestResource.APPLICATION);
-   appManifestResources.add(mre);
+ManifestResource mre = new ManifestResource(jarName,
+jmanifest, ManifestResource.APPLICATION);
+appManifestResources.add(mre);
 }
 }
 }

Modified: 
tomcat/trunk/java/org/apache/catalina/webresources/JarWarResourceSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/JarWarResourceSet.java?rev=1790180&r1=1790179&r2=1790180&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/webresources/JarWarResourceSet.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/webresources/JarWarResourceSet.java 
Wed Apr  5 07:06:13 2017
@@ -109,25 +109,25 @@ public class JarWarResourceSet extends A
 JarEntry entry = jarIs.getNextJarEntry();
 boolean hasMetaInf = false;
 while (entry != null) {
-   if (!hasMetaInf && 
entry.getName().startsWith("META-INF/")) {
-   hasMetaInf = true;
-   }
+if (!hasMetaInf && 
entry.getName().startsWith("META-INF/")) {
+hasMetaInf = true;
+}
 archiveEntries.put(entry.getName(), entry);
 entry = jarIs.getNextJarEntry();
 }
 setManifest(jarIs.getManifest());
-   // Hacks to work-around JarInputStream swallowing these
+// Hacks to work-around JarInputStream swallowing these
 // entries. The attributes for these entries will be
 // incomplete. Making the attributes available would
 // require (re-)reading the stream as a ZipInputStream
 // and creating JarEntry objects from the ZipEntries.
 if (hasMetaInf) {
-   JarEntry metaInfDir = new JarEntry("META-INF/");
-   archiveEntries.put(metaInfDir.getName(), 
metaInfDir);
+JarEntry metaInfDir = new JarEntry("META-INF/");
+archiveEntries.put(metaInfDir.getName(), 
metaInfDir);
 }
 if (jarIs.getManifest() != null) {
-   JarEntry manifest = new 
JarEntry("META-INF/MANIFEST.MF");
-   archiveEntries.put(manifest.getName(), 
manifest);
+JarEntry manifest = new 
JarEntry("META-INF/MANIFEST.MF");
+archiveEntries.put(manifest.getName(), manifest);
 }
 }
 } catch (IOException ioe) {

Modified: 
tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java?rev=1790180&r1=1790179&r2=1790180&view=diff
==
--- 
tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java 
(original)
+++ 
tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java 
Wed Apr  5 07:06:13 2017
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this

svn commit: r1790181 - in /tomcat/tc8.5.x/trunk: ./ java/org/apache/catalina/util/ExtensionValidator.java java/org/apache/catalina/webresources/JarWarResourceSet.java test/org/apache/catalina/webresou

2017-04-05 Thread violetagg
Author: violetagg
Date: Wed Apr  5 07:09:25 2017
New Revision: 1790181

URL: http://svn.apache.org/viewvc?rev=1790181&view=rev
Log:
add missing copyright header
ws police

Modified:
tomcat/tc8.5.x/trunk/   (props changed)
tomcat/tc8.5.x/trunk/java/org/apache/catalina/util/ExtensionValidator.java

tomcat/tc8.5.x/trunk/java/org/apache/catalina/webresources/JarWarResourceSet.java

tomcat/tc8.5.x/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java

Propchange: tomcat/tc8.5.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr  5 07:09:25 2017
@@ -1 +1 @@
-/tomcat/trunk:1734785,1734799,1734845,1734928,1735041,1735044,1735480,1735577,1735597,1735599-1735600,1735615,1736145,1736162,1736209,1736280,1736297,1736299,1736489,1736646,1736703,1736836,1736849,1737104-1737105,1737112,1737117,1737119-1737120,1737155,1737157,1737192,1737280,1737339,1737632,1737664,1737715,1737748,1737785,1737834,1737860,1737903,1737959,1738005,1738007,1738014-1738015,1738018,1738022,1738039,1738043,1738059-1738060,1738147,1738149,1738174-1738175,1738261,1738589,1738623-1738625,1738643,1738816,1738850,1738855,1738946-1738948,1738953-1738954,1738979,1738982,1739079-1739081,1739087,1739113,1739153,1739172,1739176,1739191,1739474,1739726,1739762,1739775,1739814,1739817-1739818,1739975,1740131,1740324,1740465,1740495,1740508-1740509,1740520,1740535,1740707,1740803,1740810,1740969,1740980,1740991,1740997,1741015,1741033,1741036,1741058,1741060,1741080,1741147,1741159,1741164,1741173,1741181,1741190,1741197,1741202,1741208,1741213,1741221,1741225,1741232,1741409,1741501
 
,1741677,1741892,1741896,1741984,1742023,1742042,1742071,1742090,1742093,1742101,1742105,1742111,1742139,1742146,1742148,1742166,1742181,1742184,1742187,1742246,1742248-1742251,1742263-1742264,1742268,1742276,1742369,1742387,1742448,1742509-1742512,1742917,1742919,1742933,1742975-1742976,1742984,1742986,1743019,1743115,1743117,1743124-1743125,1743134,1743425,1743554,1743679,1743696-1743698,1743700-1743701,1744058,1744064-1744065,1744125,1744194,1744229,1744270,1744323,1744432,1744684,1744697,1744705,1744713,1744760,1744786,1745083,1745142-1745143,1745145,1745177,1745179-1745180,1745227,1745248,1745254,1745337,1745467,1745473,1745576,1745735,1745744,1746304,1746306-1746307,1746319,1746327,1746338,1746340-1746341,1746344,1746427,1746441,1746473,1746490,1746492,1746495-1746496,1746499-1746501,1746503-1746507,1746509,1746549,1746551,1746554,1746556,1746558,1746584,1746620,1746649,1746724,1746939,1746989,1747014,1747028,1747035,1747210,1747225,1747234,1747253,1747404,1747506,1747536,1747
 
924,1747980,1747993,1748001,1748253,1748452,1748547,1748629,1748676,1748715,1749287,1749296,1749328,1749373,1749465,1749506,1749508,1749665-1749666,1749763,1749865-1749866,1749898,1749978,1749980,1750011,1750015,1750056,1750480,1750617,1750634,1750692,1750697,1750700,1750703,1750707,1750714,1750718,1750723,1750774,1750899,1750975,1750995,1751061,1751097,1751173,1751438,1751447,1751463,1751702,1752212,1752737,1752745,1753078,1753080,1753358,1753363,1754111,1754140-1754141,1754281,1754310,1754445,1754467,1754494,1754496,1754528,1754532-1754533,1754613,1754714,1754874,1754941,1754944,1754950-1754951,1755005,1755007,1755009,1755132,1755180-1755181,1755185,1755190,1755204-1755206,1755208,1755214,1755224,1755227,1755230,1755629,1755646-1755647,1755650,1755653,1755675,1755680,1755683,1755693,1755717,1755731-1755737,1755812,1755828,1755884,1755890,1755918-1755919,1755942,1755958,1755960,1755970,1755993,1756013,1756019,1756039,1756056,1756083-1756114,1756175,1756288-1756289,1756408-1756410,1
 
756778,1756798,1756878,1756898,1756939,1757123-1757124,1757126,1757128,1757132-1757133,1757136,1757145,1757167-1757168,1757175,1757180,1757182,1757195,1757271,1757278,1757347,1757353-1757354,1757363,1757374,1757399,1757406,1757408,1757485,1757495,1757499,1757527,1757578,1757684,1757722,1757727,1757790,1757799,1757813,1757853,1757883,1757903,1757976,1757997,1758000,1758058,1758072-1758075,1758078-1758079,1758223,1758257,1758261,1758276,1758292,1758369,1758378-1758383,1758421,1758423,1758425-1758427,1758430,1758443,1758448,1758459,1758483,1758486-1758487,1758499,1758525,1758556,1758580,1758582,1758584,1758588,1758842,1759019,1759212,1759224,1759227,1759252,1759274,1759513-1759516,1759611,1759757,1759785-1759790,1760005,1760022,1760109-1760110,1760135,1760200-1760201,1760227,1760300,1760397,1760446,1760454,1760640,1760648,1761057,1761422,1761491,1761498,1761500-1761501,1761550,1761553,1761572,1761574,1761625-1761626,1761628,1761682,1761740,1761752,1762051-1762053,1762123,1762168,176217
 
2,1762182,1762201-1762202,1762204,1762208,1762288,1762296,1762324,1762348,1762353,1762362,1762374,1762492,1762503,1762505,1762541,1762608,1762710,1762753,1762766,1762769,1762944,1762947,1762953,1763167,1763179,1763232,1763259,1763271-1763272,1763276-1763277,1763319-1763320,1763370,1763372,1763375,1763377,1763393,176

svn commit: r1790182 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/util/ExtensionValidator.java java/org/apache/catalina/webresources/JarWarResourceSet.java test/org/apache/catalina/webresou

2017-04-05 Thread violetagg
Author: violetagg
Date: Wed Apr  5 07:11:40 2017
New Revision: 1790182

URL: http://svn.apache.org/viewvc?rev=1790182&view=rev
Log:
add missing copyright header
ws police

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/catalina/util/ExtensionValidator.java

tomcat/tc8.0.x/trunk/java/org/apache/catalina/webresources/JarWarResourceSet.java

tomcat/tc8.0.x/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr  5 07:11:40 2017
@@ -1,2 +1,2 @@
 
/tomcat/tc8.5.x/trunk:1735042,1737966,1743139-1743140,1744151,1747537,1747925,1748002,1754614,1754643,1762124,1762183,1762203,1763792,1772948,1777014,1779719,1782037,1782240,1782386-1782387,1785669,1786845,1788249,1788324,1788905,1789216,1789335
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1637890,1637892,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886
 
,1644890,1644892,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1649973,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655351,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657
 
592,1657607,1657609,1657682,1657907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659174,1659184,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661770,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662696,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1
 
666387,1666494,1666496,1666552,1666569,1666579,137,149,1666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681699,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-168452
 
7,1684549-1684550,1685556,1685591,1685739,1685744,1685772,1685816

svn commit: r1790183 - /tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java

2017-04-05 Thread violetagg
Author: violetagg
Date: Wed Apr  5 07:20:27 2017
New Revision: 1790183

URL: http://svn.apache.org/viewvc?rev=1790183&view=rev
Log:
EOL: Windows vs. Unix.
Reported by validate-eoln.

Modified:

tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java

Modified: 
tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java?rev=1790183&r1=1790182&r2=1790183&view=diff
==
--- 
tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java 
(original)
+++ 
tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java 
Wed Apr  5 07:20:27 2017
@@ -1,56 +1,56 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.catalina.webresources;
-
-import java.io.File;
-
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-import org.apache.catalina.Context;
-import org.apache.catalina.LifecycleException;
-import org.apache.catalina.WebResource;
-import org.apache.catalina.startup.Tomcat;
-import org.apache.catalina.startup.TomcatBaseTest;
-
-public class TestJarWarResourceSet extends TomcatBaseTest {
-
-@Before
-public void register() {
-TomcatURLStreamHandlerFactory.register();
-}
-
-
-@Test
-public void testJarWarMetaInf() throws LifecycleException  {
-Tomcat tomcat = getTomcatInstance();
-
-File warFile = new File("test/webresources/war-url-connection.war");
-Context ctx = tomcat.addContext("", warFile.getAbsolutePath());
-
-tomcat.start();
-
-StandardRoot root = (StandardRoot) ctx.getResources();
-
-WebResource[] results = root.getClassLoaderResources("/META-INF");
-
-Assert.assertNotNull(results);
-Assert.assertEquals(1, results.length);
-Assert.assertNotNull(results[0].getURL());
-}
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.catalina.webresources;
+
+import java.io.File;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.apache.catalina.Context;
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.WebResource;
+import org.apache.catalina.startup.Tomcat;
+import org.apache.catalina.startup.TomcatBaseTest;
+
+public class TestJarWarResourceSet extends TomcatBaseTest {
+
+@Before
+public void register() {
+TomcatURLStreamHandlerFactory.register();
+}
+
+
+@Test
+public void testJarWarMetaInf() throws LifecycleException  {
+Tomcat tomcat = getTomcatInstance();
+
+File warFile = new File("test/webresources/war-url-connection.war");
+Context ctx = tomcat.addContext("", warFile.getAbsolutePath());
+
+tomcat.start();
+
+StandardRoot root = (StandardRoot) ctx.getResources();
+
+WebResource[] results = root.getClassLoaderResources("/META-INF");
+
+Assert.assertNotNull(results);
+Assert.assertEquals(1, results.length);
+Assert.assertNotNull(results[0].getURL());
+}
+}



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1790184 - in /tomcat/tc8.5.x/trunk: ./ test/org/apache/catalina/webresources/TestJarWarResourceSet.java

2017-04-05 Thread violetagg
Author: violetagg
Date: Wed Apr  5 07:21:57 2017
New Revision: 1790184

URL: http://svn.apache.org/viewvc?rev=1790184&view=rev
Log:
EOL: Windows vs. Unix.
Reported by validate-eoln.

Modified:
tomcat/tc8.5.x/trunk/   (props changed)

tomcat/tc8.5.x/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java

Propchange: tomcat/tc8.5.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr  5 07:21:57 2017
@@ -1 +1 @@
-/tomcat/trunk:1734785,1734799,1734845,1734928,1735041,1735044,1735480,1735577,1735597,1735599-1735600,1735615,1736145,1736162,1736209,1736280,1736297,1736299,1736489,1736646,1736703,1736836,1736849,1737104-1737105,1737112,1737117,1737119-1737120,1737155,1737157,1737192,1737280,1737339,1737632,1737664,1737715,1737748,1737785,1737834,1737860,1737903,1737959,1738005,1738007,1738014-1738015,1738018,1738022,1738039,1738043,1738059-1738060,1738147,1738149,1738174-1738175,1738261,1738589,1738623-1738625,1738643,1738816,1738850,1738855,1738946-1738948,1738953-1738954,1738979,1738982,1739079-1739081,1739087,1739113,1739153,1739172,1739176,1739191,1739474,1739726,1739762,1739775,1739814,1739817-1739818,1739975,1740131,1740324,1740465,1740495,1740508-1740509,1740520,1740535,1740707,1740803,1740810,1740969,1740980,1740991,1740997,1741015,1741033,1741036,1741058,1741060,1741080,1741147,1741159,1741164,1741173,1741181,1741190,1741197,1741202,1741208,1741213,1741221,1741225,1741232,1741409,1741501
 
,1741677,1741892,1741896,1741984,1742023,1742042,1742071,1742090,1742093,1742101,1742105,1742111,1742139,1742146,1742148,1742166,1742181,1742184,1742187,1742246,1742248-1742251,1742263-1742264,1742268,1742276,1742369,1742387,1742448,1742509-1742512,1742917,1742919,1742933,1742975-1742976,1742984,1742986,1743019,1743115,1743117,1743124-1743125,1743134,1743425,1743554,1743679,1743696-1743698,1743700-1743701,1744058,1744064-1744065,1744125,1744194,1744229,1744270,1744323,1744432,1744684,1744697,1744705,1744713,1744760,1744786,1745083,1745142-1745143,1745145,1745177,1745179-1745180,1745227,1745248,1745254,1745337,1745467,1745473,1745576,1745735,1745744,1746304,1746306-1746307,1746319,1746327,1746338,1746340-1746341,1746344,1746427,1746441,1746473,1746490,1746492,1746495-1746496,1746499-1746501,1746503-1746507,1746509,1746549,1746551,1746554,1746556,1746558,1746584,1746620,1746649,1746724,1746939,1746989,1747014,1747028,1747035,1747210,1747225,1747234,1747253,1747404,1747506,1747536,1747
 
924,1747980,1747993,1748001,1748253,1748452,1748547,1748629,1748676,1748715,1749287,1749296,1749328,1749373,1749465,1749506,1749508,1749665-1749666,1749763,1749865-1749866,1749898,1749978,1749980,1750011,1750015,1750056,1750480,1750617,1750634,1750692,1750697,1750700,1750703,1750707,1750714,1750718,1750723,1750774,1750899,1750975,1750995,1751061,1751097,1751173,1751438,1751447,1751463,1751702,1752212,1752737,1752745,1753078,1753080,1753358,1753363,1754111,1754140-1754141,1754281,1754310,1754445,1754467,1754494,1754496,1754528,1754532-1754533,1754613,1754714,1754874,1754941,1754944,1754950-1754951,1755005,1755007,1755009,1755132,1755180-1755181,1755185,1755190,1755204-1755206,1755208,1755214,1755224,1755227,1755230,1755629,1755646-1755647,1755650,1755653,1755675,1755680,1755683,1755693,1755717,1755731-1755737,1755812,1755828,1755884,1755890,1755918-1755919,1755942,1755958,1755960,1755970,1755993,1756013,1756019,1756039,1756056,1756083-1756114,1756175,1756288-1756289,1756408-1756410,1
 
756778,1756798,1756878,1756898,1756939,1757123-1757124,1757126,1757128,1757132-1757133,1757136,1757145,1757167-1757168,1757175,1757180,1757182,1757195,1757271,1757278,1757347,1757353-1757354,1757363,1757374,1757399,1757406,1757408,1757485,1757495,1757499,1757527,1757578,1757684,1757722,1757727,1757790,1757799,1757813,1757853,1757883,1757903,1757976,1757997,1758000,1758058,1758072-1758075,1758078-1758079,1758223,1758257,1758261,1758276,1758292,1758369,1758378-1758383,1758421,1758423,1758425-1758427,1758430,1758443,1758448,1758459,1758483,1758486-1758487,1758499,1758525,1758556,1758580,1758582,1758584,1758588,1758842,1759019,1759212,1759224,1759227,1759252,1759274,1759513-1759516,1759611,1759757,1759785-1759790,1760005,1760022,1760109-1760110,1760135,1760200-1760201,1760227,1760300,1760397,1760446,1760454,1760640,1760648,1761057,1761422,1761491,1761498,1761500-1761501,1761550,1761553,1761572,1761574,1761625-1761626,1761628,1761682,1761740,1761752,1762051-1762053,1762123,1762168,176217
 
2,1762182,1762201-1762202,1762204,1762208,1762288,1762296,1762324,1762348,1762353,1762362,1762374,1762492,1762503,1762505,1762541,1762608,1762710,1762753,1762766,1762769,1762944,1762947,1762953,1763167,1763179,1763232,1763259,1763271-1763272,1763276-1763277,1763319-1763320,1763370,1763372,1763375,1763377,1763393,1763412,1763430,1763450,1763462,1763505,1763511-1763512,1763516,1763518,1763520,1763529,1763559,1763565,1763568,1763574,1763619,1763634-1763635,1763718,176378

svn commit: r1790185 - in /tomcat/tc8.0.x/trunk: ./ test/org/apache/catalina/webresources/TestJarWarResourceSet.java

2017-04-05 Thread violetagg
Author: violetagg
Date: Wed Apr  5 07:22:42 2017
New Revision: 1790185

URL: http://svn.apache.org/viewvc?rev=1790185&view=rev
Log:
EOL: Windows vs. Unix.
Reported by validate-eoln.

Modified:
tomcat/tc8.0.x/trunk/   (props changed)

tomcat/tc8.0.x/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr  5 07:22:42 2017
@@ -1,2 +1,2 @@
 
/tomcat/tc8.5.x/trunk:1735042,1737966,1743139-1743140,1744151,1747537,1747925,1748002,1754614,1754643,1762124,1762183,1762203,1763792,1772948,1777014,1779719,1782037,1782240,1782386-1782387,1785669,1786845,1788249,1788324,1788905,1789216,1789335
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1637890,1637892,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886
 
,1644890,1644892,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1649973,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655351,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657
 
592,1657607,1657609,1657682,1657907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659174,1659184,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661770,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662696,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1
 
666387,1666494,1666496,1666552,1666569,1666579,137,149,1666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681699,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-168452
 
7,1684549-1684550,1685556,1685591,1685739,1685744,1685772,1685816,1685826,1685891,1687242,1687261,1687268,1687340,1687544,1687551,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,1689357,1689656,1689675-16

Re: svn commit: r1790180 - in /tomcat/trunk: java/org/apache/catalina/util/ExtensionValidator.java java/org/apache/catalina/webresources/JarWarResourceSet.java test/org/apache/catalina/webresources/Te

2017-04-05 Thread Mark Thomas

On 05/04/2017 08:06, violet...@apache.org wrote:

Author: violetagg
Date: Wed Apr  5 07:06:13 2017
New Revision: 1790180

URL: http://svn.apache.org/viewvc?rev=1790180&view=rev
Log:
add missing copyright header
ws police


Thanks. You beat me to it. For reasons I won't bore you with, I had to 
set up a temporary dev environment and I forgot some parts.


Mark



Modified:
tomcat/trunk/java/org/apache/catalina/util/ExtensionValidator.java
tomcat/trunk/java/org/apache/catalina/webresources/JarWarResourceSet.java

tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java

Modified: tomcat/trunk/java/org/apache/catalina/util/ExtensionValidator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/util/ExtensionValidator.java?rev=1790180&r1=1790179&r2=1790180&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/util/ExtensionValidator.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/util/ExtensionValidator.java Wed Apr  
5 07:06:13 2017
@@ -152,9 +152,9 @@ public final class ExtensionValidator {
 String jarName = manifestResource.getURL().toExternalForm();
 Manifest jmanifest = manifestResource.getManifest();
 if (jmanifest != null) {
-   ManifestResource mre = new ManifestResource(jarName,
-   jmanifest, ManifestResource.APPLICATION);
-   appManifestResources.add(mre);
+ManifestResource mre = new ManifestResource(jarName,
+jmanifest, ManifestResource.APPLICATION);
+appManifestResources.add(mre);
 }
 }
 }

Modified: 
tomcat/trunk/java/org/apache/catalina/webresources/JarWarResourceSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/JarWarResourceSet.java?rev=1790180&r1=1790179&r2=1790180&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/webresources/JarWarResourceSet.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/webresources/JarWarResourceSet.java 
Wed Apr  5 07:06:13 2017
@@ -109,25 +109,25 @@ public class JarWarResourceSet extends A
 JarEntry entry = jarIs.getNextJarEntry();
 boolean hasMetaInf = false;
 while (entry != null) {
-   if (!hasMetaInf && 
entry.getName().startsWith("META-INF/")) {
-   hasMetaInf = true;
-   }
+if (!hasMetaInf && 
entry.getName().startsWith("META-INF/")) {
+hasMetaInf = true;
+}
 archiveEntries.put(entry.getName(), entry);
 entry = jarIs.getNextJarEntry();
 }
 setManifest(jarIs.getManifest());
-   // Hacks to work-around JarInputStream swallowing these
+// Hacks to work-around JarInputStream swallowing these
 // entries. The attributes for these entries will be
 // incomplete. Making the attributes available would
 // require (re-)reading the stream as a ZipInputStream
 // and creating JarEntry objects from the ZipEntries.
 if (hasMetaInf) {
-   JarEntry metaInfDir = new JarEntry("META-INF/");
-   archiveEntries.put(metaInfDir.getName(), 
metaInfDir);
+JarEntry metaInfDir = new JarEntry("META-INF/");
+archiveEntries.put(metaInfDir.getName(), 
metaInfDir);
 }
 if (jarIs.getManifest() != null) {
-   JarEntry manifest = new 
JarEntry("META-INF/MANIFEST.MF");
-   archiveEntries.put(manifest.getName(), 
manifest);
+JarEntry manifest = new 
JarEntry("META-INF/MANIFEST.MF");
+archiveEntries.put(manifest.getName(), manifest);
 }
 }
 } catch (IOException ioe) {

Modified: 
tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java?rev=1790180&r1=1790179&r2=1790180&view=diff
==
--- 
tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java 
(original)
+++ 
tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java 
Wed A

buildbot failure in on tomcat-8-trunk

2017-04-05 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-8-trunk while 
building . Full details are available at:
https://ci.apache.org/builders/tomcat-8-trunk/builds/984

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-8-commit' 
triggered this build
Build Source Stamp: [branch tomcat/tc8.0.x/trunk] 1790182
Blamelist: violetagg

BUILD FAILED: failed compile_1

Sincerely,
 -The Buildbot




-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1790187 - in /tomcat/trunk/test: org/apache/jasper/compiler/TestGenerator.java webapp/WEB-INF/tags/bug43400.tag webapp/bug43nnn/ webapp/bug43nnn/bug43400.jsp

2017-04-05 Thread markt
Author: markt
Date: Wed Apr  5 07:40:52 2017
New Revision: 1790187

URL: http://svn.apache.org/viewvc?rev=1790187&view=rev
Log:
Add test to confirm behaviour observed when investigating bug 43400

Added:
tomcat/trunk/test/webapp/WEB-INF/tags/bug43400.tag   (with props)
tomcat/trunk/test/webapp/bug43nnn/
tomcat/trunk/test/webapp/bug43nnn/bug43400.jsp   (with props)
Modified:
tomcat/trunk/test/org/apache/jasper/compiler/TestGenerator.java

Modified: tomcat/trunk/test/org/apache/jasper/compiler/TestGenerator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/compiler/TestGenerator.java?rev=1790187&r1=1790186&r2=1790187&view=diff
==
--- tomcat/trunk/test/org/apache/jasper/compiler/TestGenerator.java (original)
+++ tomcat/trunk/test/org/apache/jasper/compiler/TestGenerator.java Wed Apr  5 
07:40:52 2017
@@ -281,4 +281,17 @@ public class TestGenerator extends Tomca
 assertTrue(result.startsWith("0 Hello world!\n"));
 assertTrue(result.endsWith("999 Hello world!\n"));
 }
+
+
+// https://bz.apache.org/bugzilla/show_bug.cgi?id=43400
+@Test
+public void testTagsWithEnums() throws Exception {
+getTomcatInstanceTestWebapp(false, true);
+
+ByteChunk res = getUrl("http://localhost:"; + getPort() + 
"/test/bug43nnn/bug43400.jsp");
+
+String result = res.toString();
+System.out.println(result);
+assertEcho(result, "ASYNC");
+}
 }

Added: tomcat/trunk/test/webapp/WEB-INF/tags/bug43400.tag
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/webapp/WEB-INF/tags/bug43400.tag?rev=1790187&view=auto
==
--- tomcat/trunk/test/webapp/WEB-INF/tags/bug43400.tag (added)
+++ tomcat/trunk/test/webapp/WEB-INF/tags/bug43400.tag Wed Apr  5 07:40:52 2017
@@ -0,0 +1,18 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--%><%@ tag %><%@
+attribute name="type" type="javax.servlet.DispatcherType"%><%@
+tag body-content="empty" %>${type}
\ No newline at end of file

Propchange: tomcat/trunk/test/webapp/WEB-INF/tags/bug43400.tag
--
svn:eol-style = native

Added: tomcat/trunk/test/webapp/bug43nnn/bug43400.jsp
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/webapp/bug43nnn/bug43400.jsp?rev=1790187&view=auto
==
--- tomcat/trunk/test/webapp/bug43nnn/bug43400.jsp (added)
+++ tomcat/trunk/test/webapp/bug43nnn/bug43400.jsp Wed Apr  5 07:40:52 2017
@@ -0,0 +1,24 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--%>
+<%@ taglib uri="http://tomcat.apache.org/testerFunctions"; prefix="fn" %>
+<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
+
+  Bug 46596 test case
+  
+
+  
+
\ No newline at end of file

Propchange: tomcat/trunk/test/webapp/bug43nnn/bug43400.jsp
--
svn:eol-style = native



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



buildbot success in on tomcat-8-trunk

2017-04-05 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-8-trunk while 
building . Full details are available at:
https://ci.apache.org/builders/tomcat-8-trunk/builds/985

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-8-commit' 
triggered this build
Build Source Stamp: [branch tomcat/tc8.0.x/trunk] 1790185
Blamelist: violetagg

Build succeeded!

Sincerely,
 -The Buildbot




-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



buildbot failure in on tomcat-trunk

2017-04-05 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
. Full details are available at:
https://ci.apache.org/builders/tomcat-trunk/builds/2260

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1790187
Blamelist: markt

BUILD FAILED: failed compile_1

Sincerely,
 -The Buildbot




-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1790190 - /tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java

2017-04-05 Thread kkolinko
Author: kkolinko
Date: Wed Apr  5 08:41:25 2017
New Revision: 1790190

URL: http://svn.apache.org/viewvc?rev=1790190&view=rev
Log:
Set svn:eol-style=native

Modified:

tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java   
(props changed)

Propchange: 
tomcat/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java
--
svn:eol-style = native



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1790191 - /tomcat/tc8.5.x/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java

2017-04-05 Thread kkolinko
Author: kkolinko
Date: Wed Apr  5 08:44:33 2017
New Revision: 1790191

URL: http://svn.apache.org/viewvc?rev=1790191&view=rev
Log:
Set svn:eol-style=native

Modified:

tomcat/tc8.5.x/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java
   (props changed)

Propchange: 
tomcat/tc8.5.x/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java
--
svn:eol-style = native



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1790192 - /tomcat/tc8.0.x/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java

2017-04-05 Thread kkolinko
Author: kkolinko
Date: Wed Apr  5 08:46:33 2017
New Revision: 1790192

URL: http://svn.apache.org/viewvc?rev=1790192&view=rev
Log:
Set svn:eol-style=native

Modified:

tomcat/tc8.0.x/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java
   (props changed)

Propchange: 
tomcat/tc8.0.x/trunk/test/org/apache/catalina/webresources/TestJarWarResourceSet.java
--
svn:eol-style = native



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 60955] New: on the HTML Manager the "Undeploy" button is not displayed anymore

2017-04-05 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60955

Bug ID: 60955
   Summary: on the HTML Manager the "Undeploy" button is not
displayed anymore
   Product: Tomcat 8
   Version: 8.5.13
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Manager
  Assignee: dev@tomcat.apache.org
  Reporter: si...@yahoo.com
  Target Milestone: 

Tried this on:
- Linux (CentOS Linux release 7.2.1511) 
- Windows 10
behaviour is the same on both systems:

The "Undeploy" button is NOT displayed anymore.

I traced it down to following method:
org.apache.catalina.manager.ManagerServlet.isDeployed(String name);

which ALWAYS throws following exception
(PLEASE NOTE: line numbers are not correct because I added some code to the
original source!):
"Caused by: javax.management.ServiceNotFoundException: Cannot find operation
isDeployed"



javax.management.MBeanException: Cannot find operation isDeployed
at
org.apache.tomcat.util.modeler.ManagedBean.getInvoke(ManagedBean.java:529)
at
org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:292)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at
org.apache.catalina.manager.ManagerServlet.isDeployed(ManagerServlet.java:1468)
at
org.apache.catalina.manager.HTMLManagerServlet.list(HTMLManagerServlet.java:441)
at
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:158)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at
org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at
org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:595)
at
org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:319)
at
org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:88)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341)
at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.management.ServiceNotFoundException: Cannot find operation
isDeployed

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@t

[Bug 60955] on the HTML Manager the "Undeploy" button is not displayed anymore

2017-04-05 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60955

Erich Siffert  changed:

   What|Removed |Added

 CC||si...@yahoo.com
 OS||All

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



buildbot success in on tomcat-trunk

2017-04-05 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building . Full details are available at:
https://ci.apache.org/builders/tomcat-trunk/builds/2261

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1790190
Blamelist: kkolinko

Build succeeded!

Sincerely,
 -The Buildbot




-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 60949] unable to deploy/undeploy war file using the manager

2017-04-05 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60949

Mark Thomas  changed:

   What|Removed |Added

 CC||si...@yahoo.com

--- Comment #2 from Mark Thomas  ---
*** Bug 60955 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 60955] on the HTML Manager the "Undeploy" button is not displayed anymore

2017-04-05 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60955

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #1 from Mark Thomas  ---
Same root cause, already fixed for next release.

*** This bug has been marked as a duplicate of bug 60949 ***

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 47242] request for AJP command line client

2017-04-05 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=47242

Mark Thomas  changed:

   What|Removed |Added

   Target Milestone|default |---
  Component|Connectors  |Connectors
 OS|Linux   |All
Product|Tomcat 6|Tomcat 7

--- Comment #19 from Mark Thomas  ---
Moving to Tomcat 7 during review of Tomcat 6 bugs at Tomcat 6 EOL.
Possible GSoC project?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1790202 - in /tomcat/trunk/java/org/apache/catalina: core/DefaultInstanceManager.java security/SecurityClassLoad.java

2017-04-05 Thread markt
Author: markt
Date: Wed Apr  5 10:23:03 2017
New Revision: 1790202

URL: http://svn.apache.org/viewvc?rev=1790202&view=rev
Log:
Partial fix for https://bz.apache.org/bugzilla/show_bug.cgi?id=47214
Replace explicitly referenced anonymous inner classes in DefaultInstanceManager 
with named inner classes.

Modified:
tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java
tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java

Modified: tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java?rev=1790202&r1=1790201&r2=1790202&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java Wed 
Apr  5 10:23:03 2017
@@ -475,13 +475,8 @@ public class DefaultInstanceManager impl
 Class clazz;
 if (SecurityUtil.isPackageProtectionEnabled()) {
 try {
-clazz = AccessController.doPrivileged(new 
PrivilegedExceptionAction>() {
-
-@Override
-public Class run() throws Exception {
-return loadClass(className, classLoader);
-}
-});
+clazz = AccessController.doPrivileged(
+new PrivilegedLoadClass(className, classLoader));
 } catch (PrivilegedActionException e) {
 Throwable t = e.getCause();
 if (t instanceof ClassNotFoundException) {
@@ -644,22 +639,7 @@ public class DefaultInstanceManager impl
 final AnnotationCacheEntry entry) {
 Method result = null;
 if (Globals.IS_SECURITY_ENABLED) {
-result = AccessController.doPrivileged(
-new PrivilegedAction() {
-@Override
-public Method run() {
-Method result = null;
-try {
-result = clazz.getDeclaredMethod(
-entry.getAccessibleObjectName(),
-entry.getParamTypes());
-} catch (NoSuchMethodException e) {
-// Should never happen. On that basis don't log
-// it.
-}
-return result;
-}
-});
+result = AccessController.doPrivileged(new 
PrivilegedGetMethod(clazz, entry));
 } else {
 try {
 result = clazz.getDeclaredMethod(
@@ -675,25 +655,10 @@ public class DefaultInstanceManager impl
 final AnnotationCacheEntry entry) {
 Field result = null;
 if (Globals.IS_SECURITY_ENABLED) {
-result = AccessController.doPrivileged(
-new PrivilegedAction() {
-@Override
-public Field run() {
-Field result = null;
-try {
-result = clazz.getDeclaredField(
-entry.getAccessibleObjectName());
-} catch (NoSuchFieldException e) {
-// Should never happen. On that basis don't log
-// it.
-}
-return result;
-}
-});
+result = AccessController.doPrivileged(new 
PrivilegedGetField(clazz, entry));
 } else {
 try {
-result = clazz.getDeclaredField(
-entry.getAccessibleObjectName());
+result = 
clazz.getDeclaredField(entry.getAccessibleObjectName());
 } catch (NoSuchFieldException e) {
 // Should never happen. On that basis don't log it.
 }
@@ -769,7 +734,72 @@ public class DefaultInstanceManager impl
 }
 }
 
+
 private static enum AnnotationCacheEntryType {
 FIELD, SETTER, POST_CONSTRUCT, PRE_DESTROY
 }
+
+
+private static class PrivilegedGetField implements PrivilegedAction 
{
+
+private final Class clazz;
+private final AnnotationCacheEntry entry;
+
+public PrivilegedGetField(Class clazz, AnnotationCacheEntry entry) {
+this.clazz = clazz;
+this.entry = entry;
+}
+
+@Override
+public Field run() {
+Field result = null;
+try {
+result = 
clazz.getDeclaredField(entry.getAccessibleObjectName());
+} catch (NoSuchFieldException e) {
+// Should never happen.

svn commit: r1790205 - in /tomcat/trunk/java/org/apache/catalina: security/SecurityClassLoad.java session/StandardSession.java

2017-04-05 Thread markt
Author: markt
Date: Wed Apr  5 10:37:50 2017
New Revision: 1790205

URL: http://svn.apache.org/viewvc?rev=1790205&view=rev
Log:
Partial fix for https://bz.apache.org/bugzilla/show_bug.cgi?id=47214
Replace explicitly referenced anonymous inner classes in StandardSession with 
named inner classes.

Modified:
tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java
tomcat/trunk/java/org/apache/catalina/session/StandardSession.java

Modified: tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java?rev=1790205&r1=1790204&r2=1790205&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java Wed 
Apr  5 10:37:50 2017
@@ -142,7 +142,7 @@ public final class SecurityClassLoad {
 loader.loadClass
 (basePackage + "StandardSession");
 loader.loadClass
-(basePackage + "StandardSession$1");
+(basePackage + "StandardSession$PrivilegedNewSessionFacade");
 loader.loadClass
 (basePackage + "StandardManager$PrivilegedDoUnload");
 }

Modified: tomcat/trunk/java/org/apache/catalina/session/StandardSession.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StandardSession.java?rev=1790205&r1=1790204&r2=1790205&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/session/StandardSession.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/session/StandardSession.java Wed Apr  
5 10:37:50 2017
@@ -638,23 +638,14 @@ public class StandardSession implements
  */
 @Override
 public HttpSession getSession() {
-
-if (facade == null){
-if (SecurityUtil.isPackageProtectionEnabled()){
-final StandardSession fsession = this;
-facade = AccessController.doPrivileged(
-new PrivilegedAction(){
-@Override
-public StandardSessionFacade run(){
-return new StandardSessionFacade(fsession);
-}
-});
+if (facade == null) {
+if (SecurityUtil.isPackageProtectionEnabled()) {
+facade = AccessController.doPrivileged(new 
PrivilegedNewSessionFacade(this));
 } else {
 facade = new StandardSessionFacade(this);
 }
 }
-return (facade);
-
+return facade;
 }
 
 
@@ -1851,10 +1842,23 @@ public class StandardSession implements
 (sm.getString("standardSession.attributeEvent"), t);
 }
 }
-
 }
 
 
+private static class PrivilegedNewSessionFacade implements
+PrivilegedAction {
+
+private final HttpSession session;
+
+public PrivilegedNewSessionFacade(HttpSession session) {
+this.session = session;
+}
+
+@Override
+public StandardSessionFacade run(){
+return new StandardSessionFacade(session);
+}
+}
 }
 
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1790213 - in /tomcat/trunk/java/org/apache: catalina/security/SecurityClassLoad.java coyote/http2/Stream.java

2017-04-05 Thread markt
Author: markt
Date: Wed Apr  5 10:54:40 2017
New Revision: 1790213

URL: http://svn.apache.org/viewvc?rev=1790213&view=rev
Log:
Partial fix for https://bz.apache.org/bugzilla/show_bug.cgi?id=47214
Replace explicitly referenced anonymous inner classes in Stream with named 
inner classes.

Modified:
tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java
tomcat/trunk/java/org/apache/coyote/http2/Stream.java

Modified: tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java?rev=1790213&r1=1790212&r2=1790213&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java Wed 
Apr  5 10:54:40 2017
@@ -170,7 +170,7 @@ public final class SecurityClassLoad {
 // Make sure system property is read at this point
 Class clazz = loader.loadClass(basePackage + "Constants");
 clazz.newInstance();
-loader.loadClass(basePackage + "http2.Stream$1");
+loader.loadClass(basePackage + "http2.Stream$PrivilegedPush");
 }
 
 

Modified: tomcat/trunk/java/org/apache/coyote/http2/Stream.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Stream.java?rev=1790213&r1=1790212&r2=1790213&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http2/Stream.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Stream.java Wed Apr  5 10:54:40 
2017
@@ -577,14 +577,7 @@ class Stream extends AbstractStream impl
 final Stream stream) throws IOException {
 if (org.apache.coyote.Constants.IS_SECURITY_ENABLED) {
 try {
-AccessController.doPrivileged(
-new PrivilegedExceptionAction() {
-@Override
-public Void run() throws IOException {
-handler.push(request, stream);
-return null;
-}
-});
+AccessController.doPrivileged(new PrivilegedPush(handler, 
request, stream));
 } catch (PrivilegedActionException ex) {
 Exception e = ex.getException();
 if (e instanceof IOException) {
@@ -599,6 +592,28 @@ class Stream extends AbstractStream impl
 }
 }
 
+
+private static class PrivilegedPush implements 
PrivilegedExceptionAction {
+
+private final Http2UpgradeHandler handler;
+private final Request request;
+private final Stream stream;
+
+public PrivilegedPush(Http2UpgradeHandler handler, Request request,
+Stream stream) {
+this.handler = handler;
+this.request = request;
+this.stream = stream;
+}
+
+@Override
+public Void run() throws IOException {
+handler.push(request, stream);
+return null;
+}
+}
+
+
 class StreamOutputBuffer implements OutputBuffer {
 
 private final ByteBuffer buffer = ByteBuffer.allocate(8 * 1024);



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: Host header validation

2017-04-05 Thread Mark Thomas

On 05/04/2017 07:50, Katya Todorova wrote:


Applied. Many thanks.

If you'd like to work on this further then can I suggest you take a look
at Konstantin's comments:

http://markmail.org/message/vp5voob7elspflax



I looked at the comments and it seems there are things to be clarified
before going in this direction:
- should we introduce a flag for turn on/off validation and in which cases


Currently, the validation isn't used at the point where the header is 
parsed.


I'd prefer not to add an option to disable this check. It just seems 
like the wrong thing to do.


I'm currently thinking that we could add the validation and log failures 
(rather than return a 400 response) warning that a future release will 
start rejecting the requests. That should prompt users to contact us 
with any false positives.



- zone id support in IPv6 addresses



- IPvFuture support (for this one Konstantin has already proposed to be
postponed for a while)


Looking at the spec, I think we can parse IPvFuture now. We should 
probably log any IPvFuture values with a request to report the use case 
to us so we can update the parser to handle specific instances rather 
tan the general case.



If you think this is the right time to work on the first two, let me know
and I can prepare a patch.


I think that would be great. BUT. That isn't my decision to make. One of 
the key principles of the Apache Way is that contributors choose what 
they want to work on. There isn't a project leader or a management team 
assigning tasks. If you want to work on this then absolutely, go ahead. 
If there is some other aspect you'd rather be working on then by all 
means work on that.


The Tomcat community is always willing to provide some pointers to 
suitable tasks where people new to Tomcat can get started but that 
shouldn't be see as assigning areas to work on.



Other possibilities are:


- performance improvements for the Host header validation

- improving code coverage generally for any of the HTTP parsing code

- any that attracts your interest



I'm looking at the code coverage and will take a look at host validation
performance.


Fantastic. (With the caveat of you'd rather do something else then that 
would be fantastic too.)


Kind regards,

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1790237 - in /tomcat/trunk/java/org/apache/catalina: connector/ResponseFacade.java security/SecurityClassLoad.java

2017-04-05 Thread markt
Author: markt
Date: Wed Apr  5 13:12:04 2017
New Revision: 1790237

URL: http://svn.apache.org/viewvc?rev=1790237&view=rev
Log:
Partial fix for https://bz.apache.org/bugzilla/show_bug.cgi?id=47214
Replace explicitly referenced anonymous inner classes in ResponseFacade with 
named inner classes.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/ResponseFacade.java
tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/ResponseFacade.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/ResponseFacade.java?rev=1790237&r1=1790236&r2=1790237&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/ResponseFacade.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/ResponseFacade.java Wed Apr 
 5 13:12:04 2017
@@ -40,9 +40,7 @@ import org.apache.tomcat.util.res.String
  * @author Remy Maucherat
  */
 @SuppressWarnings("deprecation")
-public class ResponseFacade
-implements HttpServletResponse {
-
+public class ResponseFacade implements HttpServletResponse {
 
 // --- DoPrivileged
 
@@ -86,8 +84,24 @@ public class ResponseFacade
 }
 }
 
-// --- Constructors
+private static class FlushBufferPrivilegedAction implements 
PrivilegedExceptionAction {
 
+private final Response response;
+
+public FlushBufferPrivilegedAction(Response response) {
+this.response = response;
+}
+
+@Override
+public Void run() throws IOException {
+response.setAppCommitted(true);
+response.flushBuffer();
+return null;
+}
+}
+
+
+// --- Constructors
 
 /**
  * Construct a wrapper for the specified response.
@@ -276,40 +290,25 @@ public class ResponseFacade
 
 
 @Override
-public void flushBuffer()
-throws IOException {
+public void flushBuffer() throws IOException {
 
 if (isFinished()) {
-//throw new IllegalStateException
-//(/*sm.getString("responseFacade.finished")*/);
 return;
 }
 
-if (SecurityUtil.isPackageProtectionEnabled()){
+if (SecurityUtil.isPackageProtectionEnabled()) {
 try{
-AccessController.doPrivileged(
-new PrivilegedExceptionAction(){
-
-@Override
-public Void run() throws IOException{
-response.setAppCommitted(true);
-
-response.flushBuffer();
-return null;
-}
-});
-} catch(PrivilegedActionException e){
+AccessController.doPrivileged(new 
FlushBufferPrivilegedAction(response));
+} catch(PrivilegedActionException e) {
 Exception ex = e.getException();
-if (ex instanceof IOException){
+if (ex instanceof IOException) {
 throw (IOException)ex;
 }
 }
 } else {
 response.setAppCommitted(true);
-
 response.flushBuffer();
 }
-
 }
 
 

Modified: tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java?rev=1790237&r1=1790236&r2=1790237&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java Wed 
Apr  5 13:12:04 2017
@@ -230,7 +230,7 @@ public final class SecurityClassLoad {
  "RequestFacade$GetSessionPrivilegedAction");
 loader.loadClass
 (basePackage +
- "ResponseFacade$1");
+ "ResponseFacade$FlushBufferPrivilegedAction");
 loader.loadClass
 (basePackage +
  "OutputBuffer$1");



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 47467] Deployment of the war file by URL when contextpath is not specified in Manager Application.

2017-04-05 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=47467

--- Comment #20 from Mark Thomas  ---
The content of attachment 25576 has been deleted for the following reason:

Attached to wrong bug

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1790273 - in /tomcat/trunk/java/org/apache/catalina: connector/OutputBuffer.java security/SecurityClassLoad.java

2017-04-05 Thread markt
Author: markt
Date: Wed Apr  5 14:15:24 2017
New Revision: 1790273

URL: http://svn.apache.org/viewvc?rev=1790273&view=rev
Log:
Partial fix for https://bz.apache.org/bugzilla/show_bug.cgi?id=47214
Replace explicitly referenced anonymous inner classes in OutputBuffer with 
named inner classes.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java
tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java?rev=1790273&r1=1790272&r2=1790273&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java Wed Apr  
5 14:15:24 2017
@@ -564,12 +564,7 @@ public class OutputBuffer extends Writer
 private static Charset getCharset(final String encoding) throws 
IOException {
 if (Globals.IS_SECURITY_ENABLED) {
 try {
-return AccessController.doPrivileged(new 
PrivilegedExceptionAction() {
-@Override
-public Charset run() throws IOException {
-return B2CConverter.getCharset(encoding);
-}
-});
+return AccessController.doPrivileged(new 
PrivilegedGetCharset(encoding));
 } catch (PrivilegedActionException ex) {
 Exception e = ex.getException();
 if (e instanceof IOException) {
@@ -587,12 +582,7 @@ public class OutputBuffer extends Writer
 private static C2BConverter createConverter(final Charset charset) throws 
IOException {
 if (Globals.IS_SECURITY_ENABLED) {
 try {
-return AccessController.doPrivileged(new 
PrivilegedExceptionAction() {
-@Override
-public C2BConverter run() throws IOException {
-return new C2BConverter(charset);
-}
-});
+return AccessController.doPrivileged(new 
PrivilegedCreateConverter(charset));
 } catch (PrivilegedActionException ex) {
 Exception e = ex.getException();
 if (e instanceof IOException) {
@@ -872,4 +862,35 @@ public class OutputBuffer extends Writer
   .position(buffer.limit())
   .limit(buffer.capacity());
 }
+
+
+private static class PrivilegedCreateConverter
+implements PrivilegedExceptionAction {
+
+private final Charset charset;
+
+public PrivilegedCreateConverter(Charset charset) {
+this.charset = charset;
+}
+
+@Override
+public C2BConverter run() throws IOException {
+return new C2BConverter(charset);
+}
+}
+
+
+private static class PrivilegedGetCharset implements 
PrivilegedExceptionAction {
+
+private final String encoding;
+
+public PrivilegedGetCharset(String encoding) {
+this.encoding = encoding;
+}
+
+@Override
+public Charset run() throws IOException {
+return B2CConverter.getCharset(encoding);
+}
+}
 }

Modified: tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java?rev=1790273&r1=1790272&r2=1790273&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java Wed 
Apr  5 14:15:24 2017
@@ -233,10 +233,10 @@ public final class SecurityClassLoad {
  "ResponseFacade$FlushBufferPrivilegedAction");
 loader.loadClass
 (basePackage +
- "OutputBuffer$1");
+ "OutputBuffer$PrivilegedCreateConverter");
 loader.loadClass
 (basePackage +
- "OutputBuffer$2");
+ "OutputBuffer$PrivilegedGetCharset");
 loader.loadClass
 (basePackage +
  "CoyoteInputStream$1");



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1790280 - /tomcat/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java

2017-04-05 Thread markt
Author: markt
Date: Wed Apr  5 14:40:05 2017
New Revision: 1790280

URL: http://svn.apache.org/viewvc?rev=1790280&view=rev
Log:
Remove unnecessary code
No need to override a method just to call the overridden super method.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java?rev=1790280&r1=1790279&r2=1790280&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java Wed 
Apr  5 14:40:05 2017
@@ -226,12 +226,6 @@ public class CoyoteInputStream extends S
 }
 
 
-@Override
-public int readLine(byte[] b, int off, int len) throws IOException {
-return super.readLine(b, off, len);
-}
-
-
 /**
  * Close the stream
  * Since we re-cycle, we can't allow the call to super.close()



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1790281 - /tomcat/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java

2017-04-05 Thread markt
Author: markt
Date: Wed Apr  5 14:45:54 2017
New Revision: 1790281

URL: http://svn.apache.org/viewvc?rev=1790281&view=rev
Log:
Simplify. Reduce code duplication.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java?rev=1790281&r1=1790280&r2=1790281&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java Wed 
Apr  5 14:45:54 2017
@@ -125,32 +125,7 @@ public class CoyoteInputStream extends S
 
 @Override
 public int read(final byte[] b) throws IOException {
-checkNonBlockingRead();
-
-if (SecurityUtil.isPackageProtectionEnabled()) {
-try {
-Integer result = AccessController
-.doPrivileged(new PrivilegedExceptionAction() 
{
-
-@Override
-public Integer run() throws IOException {
-Integer integer = Integer.valueOf(ib.read(b, 
0, b.length));
-return integer;
-}
-
-});
-return result.intValue();
-} catch (PrivilegedActionException pae) {
-Exception e = pae.getException();
-if (e instanceof IOException) {
-throw (IOException) e;
-} else {
-throw new RuntimeException(e.getMessage(), e);
-}
-}
-} else {
-return ib.read(b, 0, b.length);
-}
+return read(b, 0, b.length);
 }
 
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1790289 - in /tomcat/trunk/java/org/apache/catalina: connector/CoyoteInputStream.java security/SecurityClassLoad.java

2017-04-05 Thread markt
Author: markt
Date: Wed Apr  5 15:13:24 2017
New Revision: 1790289

URL: http://svn.apache.org/viewvc?rev=1790289&view=rev
Log:
Partial fix for https://bz.apache.org/bugzilla/show_bug.cgi?id=47214
Replace explicitly referenced anonymous inner classes in CoyoteInputStream with 
named inner classes.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java
tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java?rev=1790289&r1=1790288&r2=1790289&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteInputStream.java Wed 
Apr  5 15:13:24 2017
@@ -70,16 +70,7 @@ public class CoyoteInputStream extends S
 if (SecurityUtil.isPackageProtectionEnabled()) {
 
 try {
-Integer result = AccessController
-.doPrivileged(new PrivilegedExceptionAction() 
{
-
-@Override
-public Integer run() throws IOException {
-Integer integer = 
Integer.valueOf(ib.readByte());
-return integer;
-}
-
-});
+Integer result = AccessController.doPrivileged(new 
PrivilegedRead(ib));
 return result.intValue();
 } catch (PrivilegedActionException pae) {
 Exception e = pae.getException();
@@ -99,16 +90,7 @@ public class CoyoteInputStream extends S
 
 if (SecurityUtil.isPackageProtectionEnabled()) {
 try {
-Integer result = AccessController
-.doPrivileged(new PrivilegedExceptionAction() 
{
-
-@Override
-public Integer run() throws IOException {
-Integer integer = 
Integer.valueOf(ib.available());
-return integer;
-}
-
-});
+Integer result = AccessController.doPrivileged(new 
PrivilegedAvailable(ib));
 return result.intValue();
 } catch (PrivilegedActionException pae) {
 Exception e = pae.getException();
@@ -135,16 +117,8 @@ public class CoyoteInputStream extends S
 
 if (SecurityUtil.isPackageProtectionEnabled()) {
 try {
-Integer result = AccessController
-.doPrivileged(new PrivilegedExceptionAction() 
{
-
-@Override
-public Integer run() throws IOException {
-Integer integer = Integer.valueOf(ib.read(b, 
off, len));
-return integer;
-}
-
-});
+Integer result = AccessController.doPrivileged(
+new PrivilegedReadArray(ib, b, off, len));
 return result.intValue();
 } catch (PrivilegedActionException pae) {
 Exception e = pae.getException();
@@ -176,16 +150,7 @@ public class CoyoteInputStream extends S
 
 if (SecurityUtil.isPackageProtectionEnabled()) {
 try {
-Integer result = AccessController
-.doPrivileged(new PrivilegedExceptionAction() 
{
-
-@Override
-public Integer run() throws IOException {
-Integer integer = Integer.valueOf(ib.read(b));
-return integer;
-}
-
-});
+Integer result = AccessController.doPrivileged(new 
PrivilegedReadBuffer(ib, b));
 return result.intValue();
 } catch (PrivilegedActionException pae) {
 Exception e = pae.getException();
@@ -211,15 +176,7 @@ public class CoyoteInputStream extends S
 
 if (SecurityUtil.isPackageProtectionEnabled()) {
 try {
-AccessController.doPrivileged(new 
PrivilegedExceptionAction() {
-
-@Override
-public Void run() throws IOException {
-ib.close();
-return null;
-}
-
-});
+AccessController.doPrivileged(new PrivilegedClose(ib));
 } catch (PrivilegedActionException pae) {
 Exception e = pae.getException();
 if (e instanceof IOException) {
@@ -256,4 +213,91 @@ public class CoyoteInputStream extends S
 

svn commit: r1790292 - in /tomcat/trunk/java/org/apache/catalina: connector/InputBuffer.java security/SecurityClassLoad.java

2017-04-05 Thread markt
Author: markt
Date: Wed Apr  5 15:25:29 2017
New Revision: 1790292

URL: http://svn.apache.org/viewvc?rev=1790292&view=rev
Log:
Partial fix for https://bz.apache.org/bugzilla/show_bug.cgi?id=47214
Replace explicitly referenced anonymous inner classes in InputBuffer with named 
inner classes.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java
tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java?rev=1790292&r1=1790291&r2=1790292&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java Wed Apr  5 
15:25:29 2017
@@ -582,13 +582,7 @@ public class InputBuffer extends Reader
 private static B2CConverter createConverter(Charset charset) throws 
IOException {
 if (SecurityUtil.isPackageProtectionEnabled()) {
 try {
-return AccessController.doPrivileged(new 
PrivilegedExceptionAction() {
-
-@Override
-public B2CConverter run() throws IOException {
-return new B2CConverter(charset);
-}
-});
+return AccessController.doPrivileged(new 
PrivilegedCreateConverter(charset));
 } catch (PrivilegedActionException ex) {
 Exception e = ex.getException();
 if (e instanceof IOException) {
@@ -674,4 +668,20 @@ public class InputBuffer extends Reader
 cb = tmp;
 tmp = null;
 }
+
+
+private static class PrivilegedCreateConverter
+implements PrivilegedExceptionAction {
+
+private final Charset charset;
+
+public PrivilegedCreateConverter(Charset charset) {
+this.charset = charset;
+}
+
+@Override
+public B2CConverter run() throws IOException {
+return new B2CConverter(charset);
+}
+}
 }

Modified: tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java?rev=1790292&r1=1790291&r2=1790292&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java Wed 
Apr  5 15:25:29 2017
@@ -254,7 +254,7 @@ public final class SecurityClassLoad {
  "CoyoteInputStream$PrivilegedReadBuffer");
 loader.loadClass
 (basePackage +
- "InputBuffer$1");
+ "InputBuffer$PrivilegedCreateConverter");
 loader.loadClass
 (basePackage +
  "Response$1");



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1790294 - in /tomcat/trunk/java/org/apache/catalina: connector/Response.java security/SecurityClassLoad.java

2017-04-05 Thread markt
Author: markt
Date: Wed Apr  5 15:58:54 2017
New Revision: 1790294

URL: http://svn.apache.org/viewvc?rev=1790294&view=rev
Log:
Partial fix for https://bz.apache.org/bugzilla/show_bug.cgi?id=47214
Replace explicitly referenced anonymous inner classes in Response with named 
inner classes.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/Response.java
tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/Response.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Response.java?rev=1790294&r1=1790293&r2=1790294&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Response.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Response.java Wed Apr  5 
15:58:54 2017
@@ -982,12 +982,8 @@ public class Response implements HttpSer
 // Web application code can receive a IllegalArgumentException
 // from the generateHeader() invocation
 if (SecurityUtil.isPackageProtectionEnabled()) {
-return AccessController.doPrivileged(new 
PrivilegedAction() {
-@Override
-public String run(){
-return 
getContext().getCookieProcessor().generateHeader(cookie);
-}
-});
+return AccessController.doPrivileged(
+new PrivilegedGenerateCookieString(getContext(), cookie));
 } else {
 return getContext().getCookieProcessor().generateHeader(cookie);
 }
@@ -1492,7 +1488,6 @@ public class Response implements HttpSer
 
 // -- Protected Methods
 
-
 /**
  * Return true if the specified URL should be encoded with
  * a session identifier.  This will be true if all of the following
@@ -1535,20 +1530,16 @@ public class Response implements HttpSer
 }
 
 if (SecurityUtil.isPackageProtectionEnabled()) {
-return (
-AccessController.doPrivileged(new PrivilegedAction() {
-
-@Override
-public Boolean run(){
-return Boolean.valueOf(doIsEncodeable(hreq, session, 
location));
-}
-})).booleanValue();
+Boolean result =  AccessController.doPrivileged(
+new PrivilegedDoIsEncodable(getContext(), hreq, session, 
location));
+return result.booleanValue();
 } else {
-return doIsEncodeable(hreq, session, location);
+return doIsEncodeable(getContext(), hreq, session, location);
 }
 }
 
-private boolean doIsEncodeable(Request hreq, Session session,
+
+private static boolean doIsEncodeable(Context context, Request hreq, 
Session session,
String location) {
 // Is this a valid absolute URL?
 URL url = null;
@@ -1585,15 +1576,14 @@ public class Response implements HttpSer
 return false;
 }
 
-String contextPath = getContext().getPath();
+String contextPath = context.getPath();
 if (contextPath != null) {
 String file = url.getFile();
 if (!file.startsWith(contextPath)) {
 return false;
 }
-String tok = ";" +
-SessionConfig.getSessionUriParamName(request.getContext()) 
+
-"=" + session.getIdInternal();
+String tok = ";" + SessionConfig.getSessionUriParamName(context) + 
"=" +
+session.getIdInternal();
 if( file.indexOf(tok, contextPath.length()) >= 0 ) {
 return false;
 }
@@ -1663,17 +1653,10 @@ public class Response implements HttpSer
 String relativePath = request.getDecodedRequestURI();
 int pos = relativePath.lastIndexOf('/');
 CharChunk encodedURI = null;
-final String frelativePath = relativePath;
-final int fend = pos;
 if (SecurityUtil.isPackageProtectionEnabled() ){
 try{
 encodedURI = AccessController.doPrivileged(
-new PrivilegedExceptionAction(){
-@Override
-public CharChunk run() throws IOException{
-return 
urlEncoder.encodeURL(frelativePath, 0, fend);
-}
-   });
+new PrivilgedEncodeUrl(urlEncoder, 
relativePath, pos));
 } catch (PrivilegedActionException pae){
 IllegalArgumentException iae =
 new IllegalArgumentException(