Repository: GoogleContainerTools/jib
File: jib-cli/src/main/java/com/google/cloud/tools/jib/cli/jar/JarModeProcessor.java (Java)

Code before:
              .map(Paths::get)
              .collect(Collectors.toList());
      List<Path> snapshotDependencies =
          allDependencies.stream().filter(isSnapshot).map(Paths::get).collect(Collectors.toList());
      Path jarParent = jarPath.getParent() == null ? Paths.get("") : jarPath.getParent();
      if (!nonSnapshotDependencies.isEmpty()) {
        FileEntriesLayer.Builder nonSnapshotDependenciesLayerBuilder =
            FileEntriesLayer.builder().setName(DEPENDENCIES);
        nonSnapshotDependencies.forEach(
            path ->
                nonSnapshotDependenciesLayerBuilder.addEntry(
                    jarParent.resolve(path),
                    APP_ROOT
                        .resolve(RelativeUnixPath.get("dependencies"))
                        .resolve(path.getFileName())));
        layers.add(nonSnapshotDependenciesLayerBuilder.build());
      }
      if (!snapshotDependencies.isEmpty()) {
        FileEntriesLayer.Builder snapshotDependenciesLayerBuilder =
            FileEntriesLayer.builder().setName(SNAPSHOT_DEPENDENCIES);
        snapshotDependencies.forEach(
            path ->
                snapshotDependenciesLayerBuilder.addEntry(
                    jarParent.resolve(path),
                    APP_ROOT
                        .resolve(RelativeUnixPath.get("dependencies"))
                        .resolve(path.getFileName())));
        layers.add(snapshotDependenciesLayerBuilder.build());
      }
    }

    // Determine class and resource files in the directory containing jar contents and create
    // FileEntriesLayer for each type of layer (classes or resources), while maintaining the
    // file's original project structure.
    Predicate<Path> isClassFile = path -> path.getFileName().toString().endsWith(".class");
    Predicate<Path> isResourceFile = isClassFile.negate();
    FileEntriesLayer classesLayer =
        addDirectoryContentsToLayer(
            CLASSES,
            localExplodedJarRoot,
            isClassFile,
            APP_ROOT.resolve(RelativeUnixPath.get("explodedJar")));
    FileEntriesLayer resourcesLayer =
        addDirectoryContentsToLayer(
            RESOURCES,
            localExplodedJarRoot,
            isResourceFile,
            APP_ROOT.resolve(RelativeUnixPath.get("explodedJar")));

    layers.add(resourcesLayer);
    layers.add(classesLayer);

Review comment (suggestion):
```suggestion
                        .resolve("dependencies")
```
and the one above tool.

Code after:
              .collect(Collectors.toList());
      List<Path> snapshotDependencies =
          allDependencies.stream().filter(isSnapshot).map(Paths::get).collect(Collectors.toList());
      Path jarParent = jarPath.getParent() == null ? Paths.get("") : jarPath.getParent();
      if (!nonSnapshotDependencies.isEmpty()) {
        FileEntriesLayer.Builder nonSnapshotDependenciesLayerBuilder =
            FileEntriesLayer.builder().setName(DEPENDENCIES);
        nonSnapshotDependencies.forEach(
            path ->
                addDependency(
                    nonSnapshotDependenciesLayerBuilder,
                    jarParent.resolve(path),
                    APP_ROOT.resolve("dependencies").resolve(path.getFileName())));
        layers.add(nonSnapshotDependenciesLayerBuilder.build());
      }
      if (!snapshotDependencies.isEmpty()) {
        FileEntriesLayer.Builder snapshotDependenciesLayerBuilder =
            FileEntriesLayer.builder().setName(SNAPSHOT_DEPENDENCIES);
        snapshotDependencies.forEach(
            path ->
                addDependency(
                    snapshotDependenciesLayerBuilder,
                    jarParent.resolve(path),
                    APP_ROOT.resolve("dependencies").resolve(path.getFileName())));
        layers.add(snapshotDependenciesLayerBuilder.build());
      }
    }

    // Determine class and resource files in the directory containing jar contents and create
    // FileEntriesLayer for each type of layer (classes or resources), while maintaining the
    // file's original project structure.
    Predicate<Path> isClassFile = path -> path.getFileName().toString().endsWith(".class");
    Predicate<Path> isResourceFile = isClassFile.negate();
    FileEntriesLayer classesLayer =
        addDirectoryContentsToLayer(
            CLASSES, localExplodedJarRoot, isClassFile, APP_ROOT.resolve("explodedJar"));
    FileEntriesLayer resourcesLayer =
        addDirectoryContentsToLayer(
            RESOURCES, localExplodedJarRoot, isResourceFile, APP_ROOT.resolve("explodedJar"));

    layers.add(resourcesLayer);
    layers.add(classesLayer);
    return layers;
  }

  /**
   * Computes the entrypoint for a standard jar in exploded mode.
   *
   * @param jarPath path to jar file
   * @return list of {@link String} representing entrypoint
   * @throws IOException if I/O error occurs when opening the jar file