Skip to content

Commit

Permalink
cleanup deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
graemerocher committed Dec 10, 2014
1 parent 088e892 commit de82345
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,26 @@
package grails.core;

import groovy.lang.Closure;
import org.codehaus.groovy.ast.ClassNode;
import org.codehaus.groovy.ast.InnerClassNode;
import org.grails.io.support.GrailsResourceUtils;
import org.grails.io.support.Resource;
import org.grails.io.support.UrlResource;

import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Modifier;
import java.net.MalformedURLException;
import java.net.URI;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.codehaus.groovy.ast.ClassNode;
import org.codehaus.groovy.ast.InnerClassNode;
import org.grails.io.support.GrailsResourceUtils;
import org.grails.io.support.Resource;
import org.grails.io.support.UrlResource;

/**
* Adapter for the {@link grails.core.ArtefactHandler} interface
*
* @author Marc Palmer ([email protected])
* @author Graeme Rocher
* @since 1.0
*/
@SuppressWarnings( "deprecation" )
public class ArtefactHandlerAdapter implements ArtefactHandler, org.codehaus.groovy.grails.commons.ArtefactHandler {

protected String type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ public DefaultGrailsApplication(org.grails.io.support.Resource[] resources) {
*
* @see grails.core.ArtefactHandler
*/
@SuppressWarnings( "deprecation" )
protected void initArtefactHandlers() {

List<org.codehaus.groovy.grails.commons.ArtefactHandler> legacyArtefactHandlers = GrailsFactoriesLoader.loadFactories(org.codehaus.groovy.grails.commons.ArtefactHandler.class, getClassLoader());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,15 +273,15 @@ public void testToString() throws IOException {
writer.write("Hello world!");
writer.close();
//assertEquals(0, charBuffer.filledChunkCount());
String str=charBuffer.readAsString();
String str=charBuffer.toString();
assertEquals("Hello world!", str);

assertEquals(12, charBuffer.size());
}

public void testToCharArray() throws IOException {
StreamCharBuffer charBuffer = createTestInstance();
char[] result = charBuffer.readAsCharArray();
char[] result = charBuffer.toCharArray();
assertTrue(Arrays.equals(testbuffer, result));

assertEquals(testbuffer.length, charBuffer.size());
Expand Down

0 comments on commit de82345

Please sign in to comment.