Author: sebb
Date: Sun Aug 18 21:32:33 2013
New Revision: 1515227
URL: http://svn.apache.org/r1515227
Log:
Suppress generics warnings interfacing to non-generics library (Groovy)
Types confirmed with Javadoc
Modified:
commons/proper/jci/trunk/compilers/groovy/src/main/java/org/apache/commons/jci/compilers/GroovyJavaCompiler.java
Modified:
commons/proper/jci/trunk/compilers/groovy/src/main/java/org/apache/commons/jci/compilers/GroovyJavaCompiler.java
URL:
http://svn.apache.org/viewvc/commons/proper/jci/trunk/compilers/groovy/src/main/java/org/apache/commons/jci/compilers/GroovyJavaCompiler.java?rev=1515227&r1=1515226&r2=1515227&view=diff
==============================================================================
---
commons/proper/jci/trunk/compilers/groovy/src/main/java/org/apache/commons/jci/compilers/GroovyJavaCompiler.java
(original)
+++
commons/proper/jci/trunk/compilers/groovy/src/main/java/org/apache/commons/jci/compilers/GroovyJavaCompiler.java
Sun Aug 18 21:32:33 2013
@@ -85,6 +85,7 @@ public final class GroovyJavaCompiler ex
log.debug("compiling");
unit.compile(Phases.CLASS_GENERATION);
+ @SuppressWarnings("unchecked") // Groovy library is not yet generic
final List<GroovyClass> classes = unit.getClasses();
for (GroovyClass clazz : classes) {
final byte[] bytes = clazz.getBytes();
@@ -92,6 +93,7 @@ public final class GroovyJavaCompiler ex
}
} catch (final MultipleCompilationErrorsException e) {
final ErrorCollector col = e.getErrorCollector();
+ @SuppressWarnings("unchecked") // Groovy library is not yet generic
final Collection<WarningMessage> warnings = col.getWarnings();
if (warnings != null) {
for (WarningMessage warning : warnings) {
@@ -103,6 +105,7 @@ public final class GroovyJavaCompiler ex
}
}
+ @SuppressWarnings("unchecked") // Groovy library is not yet generic
final Collection<Message> errors = col.getErrors();
if (errors != null) {
for (Message message : errors) {