Sync with latest bnd code for testing purposes
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1354104 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/src/main/java/aQute/bnd/make/MakeBnd.java b/bundleplugin/src/main/java/aQute/bnd/make/MakeBnd.java
index 29e5353..3ef7076 100644
--- a/bundleplugin/src/main/java/aQute/bnd/make/MakeBnd.java
+++ b/bundleplugin/src/main/java/aQute/bnd/make/MakeBnd.java
@@ -56,8 +56,8 @@
}
}
return new JarResource(jar);
- } else
- return null;
+ }
+ return null;
}
}
diff --git a/bundleplugin/src/main/java/aQute/bnd/make/MakeCopy.java b/bundleplugin/src/main/java/aQute/bnd/make/MakeCopy.java
index 74d2921..9a6897e 100644
--- a/bundleplugin/src/main/java/aQute/bnd/make/MakeCopy.java
+++ b/bundleplugin/src/main/java/aQute/bnd/make/MakeCopy.java
@@ -20,23 +20,19 @@
if (content == null)
throw new IllegalArgumentException("No 'from' or 'content' field in copy " + argumentsOnMake);
return new EmbeddedResource(content.getBytes("UTF-8"), 0);
- } else {
-
- File f = builder.getFile(from);
- if (f.isFile())
- return new FileResource(f);
- else {
- try {
- URL url = new URL(from);
- return new URLResource(url);
- }
- catch (MalformedURLException mfue) {
- // We ignore this
- }
- throw new IllegalArgumentException("Copy source does not exist " + from + " for destination "
- + destination);
- }
}
+ File f = builder.getFile(from);
+ if (f.isFile())
+ return new FileResource(f);
+ try {
+ URL url = new URL(from);
+ return new URLResource(url);
+ }
+ catch (MalformedURLException mfue) {
+ // We ignore this
+ }
+ throw new IllegalArgumentException("Copy source does not exist " + from + " for destination "
+ + destination);
}
}
diff --git a/bundleplugin/src/main/java/aQute/bnd/make/component/ServiceComponent.java b/bundleplugin/src/main/java/aQute/bnd/make/component/ServiceComponent.java
index 653c48d..273ccbe 100644
--- a/bundleplugin/src/main/java/aQute/bnd/make/component/ServiceComponent.java
+++ b/bundleplugin/src/main/java/aQute/bnd/make/component/ServiceComponent.java
@@ -169,11 +169,11 @@
Collection<Clazz> not = analyzer.getClasses("", QUERY.NAMED.toString(), name //
);
- if (not.isEmpty())
+ if (not.isEmpty()) {
if ("*".equals(name))
return not;
- else
- error("Specified %s but could not find any class matching this pattern", name);
+ error("Specified %s but could not find any class matching this pattern", name);
+ }
for (Clazz c : not) {
if (c.getFormat().hasAnnotations())
@@ -432,7 +432,7 @@
* @param pw
* @param provides
*/
- void provide(PrintWriter pw, String provides, boolean servicefactory, String impl) {
+ void provide(PrintWriter pw, String provides, boolean servicefactory, @SuppressWarnings("unused") String impl) {
if (provides != null) {
if (!servicefactory)
pw.println(" <service>");