changeset 2559:91891157486b

RT-28344: NonNull annotation is unused and should be removed
author rbair
date Mon, 11 Feb 2013 17:50:32 -0800
parents dafee5d5fe66
children b2dfc3891302 0db334c76977
files build.gradle javafx-beans/src/com/sun/javafx/beans/annotations/NonNull.java
diffstat 2 files changed, 15 insertions(+), 51 deletions(-) [+]
line wrap: on
line diff
--- a/build.gradle	Mon Feb 11 17:46:53 2013 -0800
+++ b/build.gradle	Mon Feb 11 17:50:32 2013 -0800
@@ -1,5 +1,5 @@
 /**
- * The build script for JavaFX.
+ * The main build script for JavaFX.
  *
  * Tasks to complete:
  *  - special tasks for common needs, such as:
@@ -43,17 +43,25 @@
  *****************************************************************************/
 
 allprojects {
+    // All of our projects are java projects
     apply plugin: "java"
-    sourceCompatibility = 1.7 // NOTE: Cannot make 1.8 or testing doesn't work because ASM 4.0 used by gradle doesn't support 1.8 yet (not even in nightlies)
+    // NOTE: Cannot make 1.8 or testing doesn't work because ASM 4.0 used by
+    // gradle doesn't support 1.8 yet (not even in nightlies)
+    sourceCompatibility = 1.7
+    // The following block is a workaround for the fact that presently Gradle
+    // can't set the -XDignore.symbol.file flag, because it appears that the
+    // Javac API is lacking support for it. So what we'll do is find any Compile
+    // task and manually provide the options necessary to fire up the
+    // compiler with the right settings
     tasks.withType(Compile) { compile ->
         compile.options.compilerArgs = ["-XDignore.symbol.file"]
-        /* The following 4 lines are a workaround for the fact that presently Gradle can't set the -XDignore.symbol.file
-           flag, because it appears that the Javac API is lacking support for it */
         compile.options.debug = true
         compile.options.fork = true
         compile.options.forkOptions.executable = System.env["JAVA_HOME"] ? System.env["JAVA_HOME"] + "/bin/javac" : "javac"
         compile.options.warnings = false
     }
+    // Setup the repositories that we'll download libraries from. Maven Central is
+    // just easy for most things. The custom "ivy" repo is for downloading SWT
     repositories {
         mavenCentral()
         ivy {
@@ -65,6 +73,9 @@
     }
 }
 
+// The build-tools project contains the annotation processor that is used to generate the
+// builders, the decora compiler used for effects, and various annotations we use for FXML
+// etc. Nothing in build-tools should *ever* be shipped with the runtime.
 project(":build-tools") {
     // Workaround for lack of Antrl 3 support in Gradle. By defining a configuration,
     // we can then give it a class path and use that classpath to execute a java command
--- a/javafx-beans/src/com/sun/javafx/beans/annotations/NonNull.java	Mon Feb 11 17:46:53 2013 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2010, 2012, 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 com.sun.javafx.beans.annotations;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.CLASS;
-
-import java.lang.annotation.*;
-
-/**
- * Lombok is smart enough to translate any annotation named {@code @NonNull} or
- * {@code @NotNull} in any casing and with any package name to the return type
- * of generated getters and the parameter of generated setters and constructors,
- * as well as generate the appropriate null checks in the setter and
- * constructor.
- * 
- * You can use this annotation for the purpose, though you can also use JSR305's
- * annotation, findbugs's, pmd's, or IDEA's, or just about anyone elses. As long
- * as it is named {@code @NonNull} or {@code @NotNull}.
- */
-@Target({ FIELD, METHOD, PARAMETER, LOCAL_VARIABLE })
-@Retention(CLASS)
-@Documented
-public @interface NonNull {
-}