accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubbsii <...@git.apache.org>
Subject [GitHub] accumulo pull request #233: ACCUMULO-4604 Improve 'accumulo classpath' comma...
Date Thu, 23 Mar 2017 22:05:16 GMT
Github user ctubbsii commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/233#discussion_r107795526
  
    --- Diff: start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java
---
    @@ -283,16 +283,27 @@ private static File computeTopCacheDir() {
         void print(String s);
       }
     
    -  public static void printClassPath() {
    -    printClassPath(new Printer() {
    -      @Override
    -      public void print(String s) {
    -        System.out.println(s);
    -      }
    -    });
    +  public static void printClassPath(boolean debug) {
    +    printClassPath(System.out::print, debug);
    +  }
    +
    +  public static String getClassPath(boolean debug) {
    +    StringBuilder cp = new StringBuilder();
    +    printClassPath(s -> cp.append(s), debug);
    +    return cp.toString();
       }
     
    -  public static void printClassPath(Printer out) {
    +  private static void printJar(Printer out, String jarPath, boolean debug, boolean sawFirst)
{
    --- End diff --
    
    Have you verified that this still prints directories on the class path correctly? Also,
do we want this class to always print the full classpath, including what's on the VFS classloader
path (which might have URLs not parse-able by other class loaders). Might want to have an
option for depth, with the default just being the value of `System.getProperty("java.class.path")`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message