| .. | .. |
|---|
| 127 | 127 | em.persist(md); |
|---|
| 128 | 128 | } |
|---|
| 129 | 129 | } |
|---|
| 130 | + LOG.info("Creating application with date: " + app.getCreationTimestamp()); |
|---|
| 130 | 131 | |
|---|
| 131 | 132 | return Response.ok(app).build(); |
|---|
| 132 | 133 | } |
|---|
| .. | .. |
|---|
| 153 | 154 | currentapp.setName(app.getName()); |
|---|
| 154 | 155 | currentapp.setDescription(app.getDescription()); |
|---|
| 155 | 156 | em.persist(currentapp); |
|---|
| 156 | | - |
|---|
| 157 | | - Set<ApplicationMetadata> newMD = app.getApplicationMetadata(); |
|---|
| 157 | + |
|---|
| 158 | + Set<ApplicationMetadata> newMD = app.getApplicationMetadata(); |
|---|
| 158 | 159 | for (ApplicationMetadata currentMd : currentapp.getApplicationMetadata()) { |
|---|
| 159 | | - if (newMD == null || !newMD.contains(currentMd)); |
|---|
| 160 | | - em.remove(currentMd); |
|---|
| 160 | + if (newMD == null || !newMD.contains(currentMd)) |
|---|
| 161 | + ; |
|---|
| 162 | + em.remove(currentMd); |
|---|
| 161 | 163 | } |
|---|
| 162 | | - |
|---|
| 164 | + |
|---|
| 163 | 165 | if (newMD != null) { |
|---|
| 164 | 166 | for (ApplicationMetadata md : newMD) { |
|---|
| 165 | 167 | md.setApplication(app); |
|---|