You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by jt...@apache.org on 2017/10/10 15:36:41 UTC
[1/2] incubator-netbeans-html4j git commit: Removing mycila license
plugin - we are using rat to check license headers
Repository: incubator-netbeans-html4j
Updated Branches:
refs/heads/master 40dfcca15 -> eed653ae3
Removing mycila license plugin - we are using rat to check license headers
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/b3e34686
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/b3e34686
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/b3e34686
Branch: refs/heads/master
Commit: b3e3468606dfd1ce5359adeb6b4546917e1f1fbc
Parents: 40dfcca
Author: Jaroslav Tulach <ja...@oracle.com>
Authored: Tue Oct 10 17:25:51 2017 +0200
Committer: Jaroslav Tulach <ja...@oracle.com>
Committed: Tue Oct 10 17:25:51 2017 +0200
----------------------------------------------------------------------
pom.xml | 39 ---------------------------------------
1 file changed, 39 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/b3e34686/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index ffa3b26..7309ab4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -90,47 +90,8 @@
<url>http://bits.netbeans.org/maven2/</url>
</repository>
</repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>mc-release</id>
- <name>Local Maven repository of releases</name>
- <url>http://mc-repo.googlecode.com/svn/maven2/releases</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </pluginRepository>
- </pluginRepositories>
<build>
<plugins>
- <plugin>
- <inherited>false</inherited>
- <groupId>com.mycila.maven-license-plugin</groupId>
- <artifactId>maven-license-plugin</artifactId>
- <version>1.9.0</version>
- <executions>
- <execution>
- <id>blah</id>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <aggregate>true</aggregate>
- <basedir>${basedir}</basedir>
- <header>COPYING</header>
- <strictCheck>true</strictCheck>
- <excludes>
- <exclude>**/target/**</exclude>
- <exclude>.*/**</exclude>
- <exclude>*/nb-configuration.xml</exclude>
- </excludes>
- <useDefaultExcludes>false</useDefaultExcludes>
- </configuration>
- </plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.4</version>
[2/2] incubator-netbeans-html4j git commit: NETBEANS-83: On platforms
that don't provide ClassValue class,
fallback to simple linked list based implementation
Posted by jt...@apache.org.
NETBEANS-83: On platforms that don't provide ClassValue class, fallback to simple linked list based implementation
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/eed653ae
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/eed653ae
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/eed653ae
Branch: refs/heads/master
Commit: eed653ae32ca73e0393eb133bdda5146e7769686
Parents: b3e3468
Author: Jaroslav Tulach <ja...@oracle.com>
Authored: Tue Oct 10 17:36:27 2017 +0200
Committer: Jaroslav Tulach <ja...@oracle.com>
Committed: Tue Oct 10 17:36:27 2017 +0200
----------------------------------------------------------------------
.../java/org/netbeans/html/json/impl/JSON.java | 52 ++++++++++++++++++--
1 file changed, 49 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/eed653ae/json/src/main/java/org/netbeans/html/json/impl/JSON.java
----------------------------------------------------------------------
diff --git a/json/src/main/java/org/netbeans/html/json/impl/JSON.java b/json/src/main/java/org/netbeans/html/json/impl/JSON.java
index f9cc31b..1745c0c 100644
--- a/json/src/main/java/org/netbeans/html/json/impl/JSON.java
+++ b/json/src/main/java/org/netbeans/html/json/impl/JSON.java
@@ -342,8 +342,26 @@ public final class JSON {
}
- private static final class ModelTypes extends ClassValue<Proto.Type[]> {
- static final ModelTypes MODELS = new ModelTypes();
+ private static interface ModelTypes {
+ public Proto.Type[] get(Class<?> type);
+
+ static final ModelTypes MODELS = initModelTypes();
+ }
+
+ static ModelTypes initModelTypes() {
+ try {
+ return initClassValueTypes();
+ } catch (LinkageError err) {
+ return new LinkedListTypes();
+ }
+ }
+
+ private static ModelTypes initClassValueTypes() {
+ return new ClassValueTypes();
+ }
+
+ private static final class ClassValueTypes extends ClassValue<Proto.Type[]>
+ implements ModelTypes {
@Override
protected Proto.Type[] computeValue(Class<?> type) {
@@ -351,8 +369,36 @@ public final class JSON {
}
}
+ private static final class LinkedListTypes implements ModelTypes {
+ private Item items;
+ private static final class Item {
+ final Item next;
+ final Class<?> clazz;
+ final Proto.Type<?>[] type = { null };
+
+ Item(Item next, Class<?> clazz) {
+ this.next = next;
+ this.clazz = clazz;
+ }
+ }
+
+ @Override
+ public synchronized Proto.Type[] get(Class<?> clazz) {
+ Item it = items;
+ while (it != null) {
+ if (it.clazz == clazz) {
+ return it.type;
+ }
+ it = it.next;
+ }
+ it = new Item(items, clazz);
+ items = it;
+ return it.type;
+ }
+ }
+
public static void register(Class c, Proto.Type<?> type) {
- ModelTypes.MODELS.get(c)[0]= type;
+ ModelTypes.MODELS.get(c)[0] = type;
}
public static boolean isModel(Class<?> clazz) {