Skip to content

Commit

Permalink
New methods in Instrumentation in JDK9 and newer
Browse files Browse the repository at this point in the history
  • Loading branch information
dukescript committed Aug 26, 2018
1 parent c09f0fd commit 4325e6c
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 8 deletions.
Expand Up @@ -20,9 +20,11 @@
package org.netbeans.core.netigso;

import java.io.File;
import java.util.Arrays;
import java.util.HashSet;
import org.netbeans.*;
import org.netbeans.InvalidException;
import org.netbeans.MockEvents;
import org.netbeans.MockModuleInstaller;
import org.netbeans.Module;
import org.netbeans.ModuleManager;

public class NetigsoOSGiIsNotFriendTest extends NetigsoHid {
public NetigsoOSGiIsNotFriendTest(String name) {
Expand Down
Expand Up @@ -24,11 +24,14 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import org.netbeans.*;
import org.netbeans.MockEvents;
import org.netbeans.MockModuleInstaller;
import org.netbeans.Module;
import org.netbeans.ModuleManager;
import org.netbeans.Stamps;
import org.openide.filesystems.FileObject;
import org.openide.filesystems.FileUtil;
import org.openide.filesystems.LocalFileSystem;
Expand Down
Expand Up @@ -22,7 +22,11 @@
import java.io.File;
import java.util.Arrays;
import java.util.HashSet;
import org.netbeans.*;
import org.netbeans.InvalidException;
import org.netbeans.MockEvents;
import org.netbeans.MockModuleInstaller;
import org.netbeans.Module;
import org.netbeans.ModuleManager;

public class NetigsoOSGiIsNotFriendTest extends NetigsoHid {
public NetigsoOSGiIsNotFriendTest(String name) {
Expand Down
23 changes: 23 additions & 0 deletions platform/o.n.bootstrap/src/java/lang/Module.java
@@ -0,0 +1,23 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package java.lang;

/** Dummy */
public class Module {
}
12 changes: 10 additions & 2 deletions platform/o.n.bootstrap/src/org/netbeans/NbInstrumentation.java
Expand Up @@ -28,8 +28,9 @@
import java.lang.reflect.Method;
import java.security.ProtectionDomain;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.jar.JarFile;
import java.util.logging.Level;
Expand Down Expand Up @@ -183,5 +184,12 @@ public boolean isNativeMethodPrefixSupported() {
public void setNativeMethodPrefix(ClassFileTransformer transformer, String prefix) {
throw new UnsupportedOperationException();
}


public void redefineModule(java.lang.Module module, Set<java.lang.Module> extraReads, Map<String, Set<java.lang.Module>> extraExports, Map<String, Set<java.lang.Module>> extraOpens, Set<Class<?>> extraUses, Map<Class<?>, List<Class<?>>> extraProvides) {
throw new UnsupportedOperationException();
}

public boolean isModifiableModule(java.lang.Module module) {
return false;
}
}

0 comments on commit 4325e6c

Please sign in to comment.