• ■ ■ ■ ■
    commons-bootstrap/pom.xml
    skipped 3 lines
    4 4   <parent>
    5 5   <groupId>io.onedev</groupId>
    6 6   <artifactId>commons</artifactId>
    7  - <version>2.0.15</version>
     7 + <version>2.0.16</version>
    8 8   </parent>
    9 9   <artifactId>commons-bootstrap</artifactId>
    10 10  
    skipped 49 lines
  • ■ ■ ■ ■
    commons-codeassist/pom.xml
    skipped 4 lines
    5 5   <parent>
    6 6   <groupId>io.onedev</groupId>
    7 7   <artifactId>commons</artifactId>
    8  - <version>2.0.15</version>
     8 + <version>2.0.16</version>
    9 9   </parent>
    10 10   <build>
    11 11   <plugins>
    skipped 52 lines
  • ■ ■ ■ ■
    commons-jsymbol/pom.xml
    skipped 3 lines
    4 4   <parent>
    5 5   <groupId>io.onedev</groupId>
    6 6   <artifactId>commons</artifactId>
    7  - <version>2.0.15</version>
     7 + <version>2.0.16</version>
    8 8   </parent>
    9 9   <artifactId>commons-jsymbol</artifactId>
    10 10   <build>
    skipped 128 lines
  • ■ ■ ■ ■
    commons-jsyntax/pom.xml
    skipped 3 lines
    4 4   <parent>
    5 5   <groupId>io.onedev</groupId>
    6 6   <artifactId>commons</artifactId>
    7  - <version>2.0.15</version>
     7 + <version>2.0.16</version>
    8 8   </parent>
    9 9   <artifactId>commons-jsyntax</artifactId>
    10 10   <dependencies>
    skipped 26 lines
  • ■ ■ ■ ■
    commons-loader/pom.xml
    skipped 3 lines
    4 4   <parent>
    5 5   <groupId>io.onedev</groupId>
    6 6   <artifactId>commons</artifactId>
    7  - <version>2.0.15</version>
     7 + <version>2.0.16</version>
    8 8   </parent>
    9 9   <artifactId>commons-loader</artifactId>
    10 10  
    skipped 43 lines
  • ■ ■ ■ ■
    commons-utils/pom.xml
    skipped 4 lines
    5 5   <parent>
    6 6   <groupId>io.onedev</groupId>
    7 7   <artifactId>commons</artifactId>
    8  - <version>2.0.15</version>
     8 + <version>2.0.16</version>
    9 9   </parent>
    10 10   <artifactId>commons-utils</artifactId>
    11 11   <dependencies>
    skipped 64 lines
  • ■ ■ ■ ■ ■ ■
    commons-utils/src/main/java/io/onedev/commons/utils/PathUtils.java
    skipped 265 lines
    266 266   return StringUtils.isBlank(path) || FilenameUtils.normalize(path).length() == 0;
    267 267   }
    268 268  
     269 + public static boolean isSelfOrAncestor(String ancestor, String path) {
     270 + return path.equals(ancestor) || path.startsWith(ancestor+"/");
     271 + }
     272 + 
     273 + public static String substituteSelfOrAncestor(String path, String oldAncestor, String newAncestor) {
     274 + if (isSelfOrAncestor(oldAncestor, path))
     275 + return newAncestor + path.substring(oldAncestor.length());
     276 + else
     277 + return path;
     278 + }
     279 +
    269 280  }
    270 281   
  • ■ ■ ■ ■
    pom.xml
    skipped 8 lines
    9 9   <version>1.0.5</version>
    10 10   </parent>
    11 11   <artifactId>commons</artifactId>
    12  - <version>2.0.15</version>
     12 + <version>2.0.16</version>
    13 13   <packaging>pom</packaging>
    14 14   <modules>
    15 15   <module>commons-utils</module>
    skipped 285 lines
Please wait...
Page is in error, reload to recover