You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by mi...@apache.org on 2015/05/31 09:20:56 UTC
olingo-odata2 git commit: [OLINGO-676] Fixed test
Repository: olingo-odata2
Updated Branches:
refs/heads/master 61d9db317 -> 19ee43581
[OLINGO-676] Fixed test
Project: http://git-wip-us.apache.org/repos/asf/olingo-odata2/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata2/commit/19ee4358
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata2/tree/19ee4358
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata2/diff/19ee4358
Branch: refs/heads/master
Commit: 19ee43581322b8bece15ba49acae2e2e5e8a0909
Parents: 61d9db3
Author: Michael Bolz <mi...@sap.com>
Authored: Fri May 29 15:39:57 2015 +0200
Committer: Michael Bolz <mi...@sap.com>
Committed: Sun May 31 09:20:07 2015 +0200
----------------------------------------------------------------------
.../data/JPAEntityParserForStaticMethodTest.java | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/19ee4358/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAEntityParserForStaticMethodTest.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAEntityParserForStaticMethodTest.java b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAEntityParserForStaticMethodTest.java
index e7d4c5f..9a18f41 100644
--- a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAEntityParserForStaticMethodTest.java
+++ b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAEntityParserForStaticMethodTest.java
@@ -24,11 +24,10 @@ import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.ByteArrayOutputStream;
-import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
+import java.io.InputStream;
import java.lang.reflect.Method;
-import java.net.URL;
import java.sql.Blob;
import java.sql.Clob;
import java.sql.SQLException;
@@ -248,7 +247,7 @@ public class JPAEntityParserForStaticMethodTest {
final String fileName = "SalesOrderProcessingMappingModels.xml";
try {
- FileInputStream fis = getFileStream(fileName);
+ InputStream fis = JPAEntityParserForStaticMethodTest.class.getClassLoader().getResourceAsStream(fileName);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
int content = fis.read();
@@ -281,17 +280,6 @@ public class JPAEntityParserForStaticMethodTest {
}
}
- private FileInputStream getFileStream(final String name) throws SerialException, FileNotFoundException {
- final String fileName = "SalesOrderProcessingMappingModels.xml";
- FileInputStream fis;
-
- URL fileURL = JPAEntityParserForStaticMethodTest.class.getClassLoader().getResource(fileName);
- fis = new FileInputStream(fileURL.getPath());
-
- return fis;
-
- }
-
public Character getCharacter() {
return new Character('A');
}