test/lib/jdk/test/lib/containers/cgroup/MetricsTester.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File open Cdiff test/lib/jdk/test/lib/containers/cgroup/MetricsTester.java

test/lib/jdk/test/lib/containers/cgroup/MetricsTester.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 83,111 **** String finalPath = ""; String root = paths[0]; String mountPoint = paths[1]; if (root != null && cgroupPath != null) { if (root.equals("/")) { ! if (cgroupPath.equals("/")) { finalPath = mountPoint + cgroupPath; } else { finalPath = mountPoint; } } else { if (root.equals(cgroupPath)) { finalPath = mountPoint; } else { ! if (root.indexOf(cgroupPath) == 0) { if (cgroupPath.length() > root.length()) { String cgroupSubstr = cgroupPath.substring(root.length()); finalPath = mountPoint + cgroupSubstr; } } } } } ! subSystemPaths.put(subSystem, new String[]{finalPath}); } } } private static void createSubsystems(String[] line) { --- 83,111 ---- String finalPath = ""; String root = paths[0]; String mountPoint = paths[1]; if (root != null && cgroupPath != null) { if (root.equals("/")) { ! if (!cgroupPath.equals("/")) { finalPath = mountPoint + cgroupPath; } else { finalPath = mountPoint; } } else { if (root.equals(cgroupPath)) { finalPath = mountPoint; } else { ! if (cgroupPath.indexOf(root) == 0) { if (cgroupPath.length() > root.length()) { String cgroupSubstr = cgroupPath.substring(root.length()); finalPath = mountPoint + cgroupSubstr; } } } } } ! subSystemPaths.put(subSystem, new String[]{finalPath, mountPoint}); } } } private static void createSubsystems(String[] line) {
test/lib/jdk/test/lib/containers/cgroup/MetricsTester.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File