throw new IOException("Problem loading graph.tg from bundle " + bundle.getSymbolicName(), e);
}
}
+
+ private static FormatHandler<TransferableGraph1> FORMAT_HANDLER = new FormatHandler<TransferableGraph1>() {
+ @Override
+ public Binding getBinding() {
+ return TransferableGraph1.BINDING;
+ }
+ @Override
+ public TransferableGraph1 process(DataContainer container) throws Exception {
+ return (TransferableGraph1) container.content.getValue(TransferableGraph1.BINDING);
+ }
+ };
@SuppressWarnings("unchecked")
private static Map<String, FormatHandler<TransferableGraph1>> handlers = ArrayMap.make(
new String[] {
- "graph:1"
+ "graph:1",
+ "sharedLibrary:1"
},
- new FormatHandler<TransferableGraph1>() {
- @Override
- public Binding getBinding() {
- return TransferableGraph1.BINDING;
- }
- @Override
- public TransferableGraph1 process(DataContainer container) throws Exception {
- return (TransferableGraph1) container.content.getValue(TransferableGraph1.BINDING);
- }
- });
+ FORMAT_HANDLER,
+ FORMAT_HANDLER);
private static TransferableGraph1 readTG(InputStream is) throws Exception {
// For an unknown reason this is totally broken when running the TestSCLOsgi