[SCM] jigsaw packaging branch, master, updated. 53df146c92e398f00bfa6dad8e72c79dcd5f427d

Guillaume Mazoyer gmazoyer-guest at alioth.debian.org
Wed Aug 24 20:07:59 UTC 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "jigsaw packaging".

The branch, master has been updated
       via  53df146c92e398f00bfa6dad8e72c79dcd5f427d (commit)
      from  5e0769ad66a55d12e62fab944c003748ac58cee6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 53df146c92e398f00bfa6dad8e72c79dcd5f427d
Author: Guillaume Mazoyer <respawneral at gmail.com>
Date:   Wed Aug 24 22:07:40 2011 +0200

    Remove file created by alanb patch.

-----------------------------------------------------------------------

Summary of changes:
 .../org/openjdk/jigsaw/ModulePathLibrary.java      |  265 --------------------
 1 files changed, 0 insertions(+), 265 deletions(-)

diff --git a/jdk/src/share/classes/org/openjdk/jigsaw/ModulePathLibrary.java b/jdk/src/share/classes/org/openjdk/jigsaw/ModulePathLibrary.java
deleted file mode 100644
index 7decae3..0000000
--- a/jdk/src/share/classes/org/openjdk/jigsaw/ModulePathLibrary.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * Copyright (c) 2011, 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.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package org.openjdk.jigsaw;
-
-import java.lang.module.*;
-import java.util.*;
-import java.net.URI;
-import java.nio.file.Files;
-import java.nio.file.*;
-import java.nio.file.attribute.BasicFileAttributes;
-import java.io.*;
-import java.security.CodeSigner;
-import java.security.SignatureException;
-
-/**
- * A simple read-only module library based on a module path as specified by the
- * -modulepath (-mp) option.
- */
-
-public final class ModulePathLibrary
-    extends Library
-{
-    private static final JigsawModuleSystem jms = JigsawModuleSystem.instance();
-    
-    private final Path root;
-    private final Library parent;
-    
-    // mid -> module-info bytes
-    private final Map<ModuleId,byte[]> modules;
-    
-    private ModulePathLibrary(String path, Library parent) throws IOException {
-        this.root = FileSystems.getDefault().getPath(path);
-        this.parent = parent;
-        this.modules = new HashMap<>();
-        
-        // preload module info for each module
-        try (DirectoryStream<Path> stream = Files.newDirectoryStream(root)) {
-            for (Path name: stream) {
-                Path mipath = name.resolve("module-info.class");
-                if (Files.exists(mipath)) { 
-                    byte[] bytes = Files.readAllBytes(mipath);        
-                    ClassInfo ci = ClassInfo.parse(bytes);
-                    ModuleId mid = jms.parseModuleId(name.getFileName().toString(), 
-                                                     ci.moduleVersion());
-                    modules.put(mid, bytes);
-                }
-            }
-        }
-    }
-    
-    static ModulePathLibrary open(String path, Library parent) throws IOException {
-        return new ModulePathLibrary(path, parent);
-    }
-    
-    @Override
-    public String name() {
-        return root.toString();
-    }
-
-    @Override
-    public Library parent() {
-        return parent;
-    }
-    
-    @Override
-    public URI location() {
-        return root.toUri();
-    }    
-    
-    @Override
-    public int majorVersion() {
-        return 1;
-    }
-    
-    @Override
-    public int minorVersion() {
-        return 0;
-    }
-    
-    @Override
-    public byte[] readLocalModuleInfoBytes(ModuleId mid) {
-        return modules.get(mid);
-    }
-    
-    @Override
-    public void gatherLocalModuleIds(String moduleName, Set<ModuleId> mids) {
-        if (moduleName == null) {
-            mids.addAll(modules.keySet());
-        } else {
-            for (ModuleId mid: modules.keySet()) {
-                if (mid.name().equals(moduleName))
-                    mids.add(mid);
-            }
-        }
-    }
-    
-    @Override
-    public byte[] readLocalClass(ModuleId mid, String className)
-        throws IOException
-    {
-        String sep = root.getFileSystem().getSeparator();
-        assert sep.length() == 1;
-        String fn = className.replace('.', sep.charAt(0)) + ".class";
-        Path file = root.resolve(mid.name()).resolve(fn);
-        return Files.readAllBytes(file);
-    }
-
-    @Override
-    public List<String> listLocalClasses(ModuleId mid, final boolean all)
-        throws IOException
-    {        
-        final Path top = root.resolve(mid.name());
-        final List<String> result = new LinkedList<>();
-        Files.walkFileTree(top, new SimpleFileVisitor<Path>() {
-            @Override
-            public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) 
-                throws IOException
-            {
-                String fn = file.getFileName().toString();
-                if (fn.endsWith(".class") && !fn.equals("module-info.class")) {
-                    ClassInfo ci = ClassInfo.read(file.toFile());
-                    if (all || ci.isPublic()) {
-                        // modules/foo/org/Foo.class => org.Foo
-                        String cn = top.relativize(file).toString();
-                        String sep = root.getFileSystem().getSeparator();
-                        cn = cn.replace(sep.charAt(0), '.');
-                        int len = cn.length() - 6;
-                        cn = cn.substring(0, len);
-                        result.add(cn);
-                    }
-                }
-                return FileVisitResult.CONTINUE;
-            }
-        });
-        return result;
-    }
-    
-    @Override
-    public byte[] readModuleInfoBytes(ModuleId mid)
-        throws IOException
-    {
-        byte[] bytes = modules.get(mid);
-        return (bytes != null) ? bytes : parent.readModuleInfoBytes(mid);
-    }    
-
-    @Override
-    public Configuration<Context> readConfiguration(ModuleId mid)
-        throws IOException
-    {
-        // configuration not stored
-        return null;
-    }            
-
-    @Override
-    public void installFromManifests(Collection<Manifest> mfs)
-        throws ConfigurationException, IOException
-    {
-        throw new UnsupportedOperationException("Can't install into module path");
-    }             
-
-    @Override
-    public void install(Collection<File> mfs, boolean verifySignature)
-        throws ConfigurationException, IOException, SignatureException
-    {
-        throw new UnsupportedOperationException("Can't install into module path");
-    }            
-
-    @Override
-    public Resolution resolve(Collection<ModuleIdQuery> midqs)
-        throws ConfigurationException, IOException
-    {
-        // only required when installing
-        throw new RuntimeException("not implemented");
-    }
-
-    @Override
-    public void install(Resolution res, boolean verifySignature)
-        throws ConfigurationException, IOException, SignatureException
-    {
-        throw new UnsupportedOperationException("Can't install into module path");
-    }            
-
-    @Override
-    public URI findLocalResource(ModuleId mid, String rn)
-        throws IOException
-    {
-        // resources be in a module path?
-        return null;
-    }            
-
-    @Override
-    public File findLocalNativeLibrary(ModuleId mid, String name)
-        throws IOException
-    {
-        // no native libraries in a module path
-        return null;
-    }            
-
-    @Override
-    public File classPath(ModuleId mid)
-        throws IOException
-    {
-        Path dir = root.resolve(mid.name());
-        return dir.toFile();
-    }
-    
-    private static class EmptyRepositoryList implements RemoteRepositoryList {
-        @Override
-        public List<RemoteRepository> repositories() throws IOException {
-            return Collections.emptyList();
-        }
-        @Override
-        public RemoteRepository firstRepository() throws IOException {
-            return null;
-        }
-        public RemoteRepository add(URI uri, int position) throws IOException {
-            throw new RuntimeException();
-        }
-        public boolean remove(RemoteRepository rr) throws IOException {
-            throw new RuntimeException();
-        }
-        public boolean areCatalogsStale() throws IOException {
-            throw new RuntimeException();
-        }
-        public boolean updateCatalogs(boolean force) throws IOException {
-            throw new RuntimeException();
-        }
-    }
-
-    @Override
-    public RemoteRepositoryList repositoryList() throws IOException {
-        return new EmptyRepositoryList();
-    }
-            
-    @Override
-    public CodeSigner[] readLocalCodeSigners(ModuleId mid)
-        throws IOException
-    {        
-        // classes in a module path are not signed
-        return null;
-    }
-}


hooks/post-receive
-- 
jigsaw packaging



More information about the pkg-java-commits mailing list