Changeset 6b4f665 for router


Ignore:
Timestamp:
Mar 10, 2017 6:48:48 PM (3 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
db5ab0b
Parents:
4e236fc
Message:

Add more markers and protection for xml file migration
Add error message for jetty-jmx.xml migration, don't migrate
Update non-default files jetty-rewrite.xml and jetty-jmx.xml

File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/startup/MigrateJetty.java

    r4e236fc r6b4f665  
    216216     */
    217217    private static boolean migrateToJetty9(File xmlFile) {
     218        if (xmlFile.getName().equals("jetty-jmx.xml")) {
     219            // This is lazy but nobody's using jmx, not worth the trouble
     220            System.err.println("ERROR: Migration  of " + xmlFile +
     221                               " file is not supported. Copy new file from $I2P/eepsite-jetty9/jetty-jmx.xml");
     222            return false;
     223        }
    218224        // we don't re-migrate from the template, we just add the
    219225        // necessary args for the QueuedThreadPool constructor in-place
     
    238244                if (s.endsWith("\r"))
    239245                    s = s.substring(0, s.length() - 1);
    240                 if (s.contains("org.eclipse.jetty.util.thread.QueuedThreadPool")) {
     246                if (s.contains("Modified by I2P migration script for Jetty 9.") ||
     247                    s.contains("This configuration supports Jetty 9.") ||
     248                    s.contains("http://www.eclipse.org/jetty/configure_9_0.dtd")) {
     249                    if (!modified)
     250                        break;
     251                    // else we've modified it twice?
     252                } else if (s.contains("org.eclipse.jetty.util.thread.QueuedThreadPool")) {
    241253                    foundQTP = true;
    242254                } else if (foundQTP) {
Note: See TracChangeset for help on using the changeset viewer.